input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testScriptDereferencing ( ) { java . util . Map < java . lang . String , java . lang . Object > johndoe = new java . util . HashMap ( ) ; johndoe . put ( "fullName" , "John<sp>Doe" ) ; com . effektif . workflow . api . workflow . ExecutableWorkflow workflow = new com . effektif . workflow . api . workflow . ExecutableW... | org . junit . Assert . assertEquals ( "John<sp>Doe" , workflowInstance . getVariableValue ( "name" ) ) |
testSerializable ( ) { @ com . vaadin . flow . internal . SuppressWarnings ( "unchecked" ) java . lang . Class < ? extends com . vaadin . flow . internal . nodefeature . NodeFeature > [ ] features = new java . lang . Class [ ] { com . vaadin . flow . internal . nodefeature . ElementChildrenList . class , com . vaadin .... | org . junit . Assert . assertNotNull ( d1 ) |
testRegistrationWithoutHealthCheck ( ) { final com . spotify . helios . agent . TaskConfig taskConfig = com . spotify . helios . agent . TaskConfig . builder ( ) . namespace ( "test" ) . host ( com . spotify . helios . agent . TaskConfigTest . HOST ) . job ( com . spotify . helios . agent . TaskConfigTest . JOB ) . bui... | org . junit . Assert . assertNull ( endpoint . getHealthCheck ( ) ) |
testGetFragmentSize ( ) { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer target = sp . parseSmiles ( "C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\... | org . junit . Assert . assertEquals ( score , smsd1 . getFragmentSize ( 0 ) ) |
testMultipleStmtEPL ( ) { java . lang . String EPL1 = "<sp>select<sp>*<sp>from<sp>TestEvent;<sp>" + ( "<sp>Select<sp>timemillis<sp>from<sp>TestEvent;<sp>" + "<sp>@OutputTo(\"omc\")<sp>select<sp>*<sp>from<sp>TestEvent;<sp>" ) ; com . ebay . jetstream . event . processor . esper . EPL epl = new com . ebay . jetstream . e... | org . junit . Assert . assertTrue ( proc . compileEPL ( epl ) ) |
testBuildNumber ( ) { com . exigeninsurance . x4j . analytic . model . Attribute a = new com . exigeninsurance . x4j . analytic . model . Attribute ( ) ; a . setName ( ReportMetadata . VERSION ) ; a . setValue ( "1" ) ; java . util . List < com . exigeninsurance . x4j . analytic . model . Attribute > list = new java . ... | org . junit . Assert . assertEquals ( "1" , metadata . getBuildNumber ( ) ) |
testeableConnectionProvider ( ) { org . mule . runtime . api . meta . model . connection . ConnectionProviderModel connectionProviderModel = veganExtension . getConfigurationModel ( org . mule . runtime . module . extension . internal . loader . BANANA ) . map ( ( c ) -> c . getConnectionProviders ( ) . get ( 0 ) ) . g... | org . junit . Assert . assertThat ( connectionProviderModel . supportsConnectivityTesting ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testResolvedItems_300PreloadedItems ( ) { tree = new org . eclipse . swt . widgets . Tree ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; tree . setData ( RWT . PRELOADED_ITEMS , java . lang . Integer . valueOf ( 300 ) ) ; tree . setSize ( 100 , 100 ) ; tree . setItemCount ( 200 ) ; org . eclipse . swt . widgets . Tr... | org . junit . Assert . assertEquals ( 200 , org . eclipse . swt . widgets . Tree_Test . countResolvedItems ( tree ) ) |
getOrCreateCache_Same ( ) { java . lang . String name = "c1" ; javax . cache . CacheManager cacheManager = getCacheManager ( ) ; cacheManager . createCache ( name , new javax . cache . configuration . MutableConfiguration ( ) ) ; javax . cache . Cache cache = cacheManager . getCache ( name ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertSame ( cache , cacheManager . getCache ( name ) ) |
whenMultipleValues_sort ( ) { java . util . List < java . lang . String > values = java . util . Arrays . asList ( "v3beta1" 0 , "foo1" , "v3beta2" , "v2" , "v1" , "v3beta1" , "v11alpha2" , "v10beta3" , "v10" , "foo10" , "v12alpha1" ) ; java . util . List < oracle . kubernetes . operator . helpers . ResourceVersion > r... | org . junit . Assert . assertEquals ( expected , actual ) |
test_zh_CN_from_file ( ) { java . io . Reader reader = org . nutz . lang . Streams . fileInr ( "org/nutz/json/zh_CN.txt" ) ; java . util . Map < java . lang . String , java . lang . String > map = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( org . nutz . json . Json . fromJson ( reader ) ) ... | org . junit . Assert . assertEquals ( "" , map . get ( "name" ) ) |
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . modifiers . FifoPutPostProcessorGui instance = new kg . apc . jmeter . modifiers . FifoPutPostProcessorGui ( ) ; java . lang . String result = instance . getLabelResource ( ) ; "<AssertPlaceHolder>" ; } getLabelResource ( ) {... | org . junit . Assert . assertNotNull ( result ) |
testWildcardFilter ( ) { thredds . server . catalog . ConfigCatalog cat = thredds . server . catalog . TestConfigCatalogBuilder . getFromResource ( "thredds/server/catalog/TestDatasetScan.xml" ) ; thredds . client . catalog . Dataset ds = cat . findDatasetByID ( "testGridScan" ) ; assert ds != null ; assert ds instance... | org . junit . Assert . assertEquals ( 3 , root . getDatasets ( ) . size ( ) ) |
convertFromString ( ) { org . xwiki . instance . InstanceId id = this . mocker . getComponentUnderTest ( ) . convertToType ( org . xwiki . instance . InstanceId . class , "b6ad6165-daaf-41a1-8a3f-9aa81451c402" ) ; "<AssertPlaceHolder>" ; } getInstanceId ( ) { return instanceIdManager . getInstanceId ( ) ; } | org . junit . Assert . assertEquals ( "b6ad6165-daaf-41a1-8a3f-9aa81451c402" , id . getInstanceId ( ) ) |
testMapStringIntegerValueWithoutListMarshallers ( ) { net . openhft . chronicle . map . ChronicleMapBuilder < java . lang . String , net . openhft . chronicle . map . Map < java . lang . String , java . lang . Integer > > builder = net . openhft . chronicle . map . ChronicleMapBuilder . of ( java . lang . String . clas... | org . junit . Assert . assertEquals ( net . openhft . chronicle . map . CHMUseCasesTest . mapOf ( "two" , 2 ) , map . get ( "2" ) ) |
testGetTreeWithParentElements ( ) { java . lang . String relPath = ( org . apache . jackrabbit . oak . commons . PathUtils . relativize ( PathUtils . ROOT_PATH , child . getPath ( ) ) ) + "/.." ; org . apache . jackrabbit . oak . api . Tree t = org . apache . jackrabbit . oak . plugins . tree . TreeUtil . getTree ( roo... | org . junit . Assert . assertEquals ( child . getParent ( ) . getPath ( ) , t . getPath ( ) ) |
testConcentric ( ) { double h = ( org . apache . commons . math . util . FastMath . sqrt ( 3.0 ) ) / 2.0 ; org . apache . commons . math . geometry . euclidean . twod . Vector2D [ ] [ ] vertices1 = new org . apache . commons . math . geometry . euclidean . twod . Vector2D [ ] [ ] { new org . apache . commons . math . g... | org . junit . Assert . assertTrue ( set2 . contains ( set1 ) ) |
test_Servlet7 ( ) { java . lang . String expected = "a" ; java . lang . String actual ; org . osgi . framework . Bundle bundle = installBundle ( org . eclipse . equinox . http . servlet . tests . TEST_BUNDLE_1 ) ; try { bundle . start ( ) ; actual = requestAdvisor . request ( "TestServlet7/a" ) ; } finally { uninstallB... | org . junit . Assert . assertEquals ( expected , actual ) |
testHasTitle ( ) { com . eclipsesource . tabris . ui . ActionConfiguration configuration = new com . eclipsesource . tabris . ui . ActionConfiguration ( "foo" , com . eclipsesource . tabris . internal . ui . TestAction . class ) . setTitle ( "bar" ) ; java . lang . String title = configuration . getTitle ( ) ; "<Assert... | org . junit . Assert . assertEquals ( "bar" , title ) |
testFindMetric ( ) { org . ebayopensource . turmeric . monitoring . model . MetricDef metricDef = new org . ebayopensource . turmeric . monitoring . model . MetricDef ( "metric1" , org . ebayopensource . turmeric . monitoring . model . MetricCategory . TIMING , org . ebayopensource . turmeric . monitoring . model . Mon... | org . junit . Assert . assertNotNull ( savedMetric ) |
testAnnotationWithNoMetadataContainer ( ) { org . obeonetwork . graal . System system = loadRoot ( "AnnotationWithNoMetadataContainer.graal" , org . obeonetwork . graal . System . class ) ; org . obeonetwork . graal . DomainClass domainClass = query ( ( ) -> { return ( ( org . obeonetwork . graal . DomainClass ) ( syst... | org . junit . Assert . assertEquals ( "" , getPhysicalSize ( domainClass ) ) |
testGetEncryptionKeyProviderUri ( ) { java . lang . String keyProvider = "kms://http@localhost:16000/kms" ; org . apache . ambari . view . cluster . Cluster cluster = createNiceMock ( org . apache . ambari . view . cluster . Cluster . class ) ; expect ( cluster . getConfigurationValue ( "hdfs-site" , "dfs.encryption.ke... | org . junit . Assert . assertEquals ( encryptionKeyProviderUri , keyProvider ) |
testFast ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
voidObs_shouldSetVoidedBitOnGivenObs ( ) { org . openmrs . api . ObsService obsService = org . openmrs . api . context . Context . getObsService ( ) ; org . openmrs . Obs obs = obsService . getObs ( 7 ) ; obsService . voidObs ( obs , "testing<sp>void<sp>function" ) ; "<AssertPlaceHolder>" ; } getVoided ( ) { return voi... | org . junit . Assert . assertTrue ( obs . getVoided ( ) ) |
testHasField ( ) { java . lang . String name = "" ; boolean result = fixture . hasField ( name ) ; "<AssertPlaceHolder>" ; } hasField ( java . lang . String ) { return fFields . containsKey ( fieldTag ) ; } | org . junit . Assert . assertEquals ( false , result ) |
testCallWithNewReadTransactionAndCloseReadSuccessfully ( ) { org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . binding . rev140701 . two . level . list . TopLevelList data = newTestDataObject ( ) ; managedNewTransactionRunner . callWithNewWriteOnlyTransactionAndSubmit... | org . junit . Assert . assertEquals ( data , managedNewTransactionRunner . applyWithNewReadOnlyTransactionAndClose ( org . opendaylight . mdsal . binding . util . Datastore . OPERATIONAL , ( tx ) -> tx . read ( org . opendaylight . mdsal . binding . util . ManagedNewTransactionRunnerImplTest . TEST_PATH ) ) . get ( ) .... |
testGet2 ( ) { int breakInterval = 3 ; com . google . common . base . Supplier < java . lang . Integer > supplier = new com . rhythm . louie . cache . LoadingSupplierTest . FaultTestSupplier2 ( new com . rhythm . louie . cache . LoadingSupplierTest . FaultySupplier ( breakInterval ) ) ; for ( int i = 1 ; i <= 10 ; i ++... | org . junit . Assert . assertEquals ( value , java . lang . Integer . valueOf ( testValue ) ) |
deadLetterQueueTTLPromptExpiry ( ) { com . rabbitmq . client . test . functional . Map < java . lang . String , java . lang . Object > args = new com . rabbitmq . client . test . functional . HashMap ( ) ; args . put ( "x-message-ttl" , com . rabbitmq . client . test . functional . DeadLetterExchange . TTL ) ; declareQ... | org . junit . Assert . assertNotNull ( body ) |
testGetPasswordEncoder_ClassNotFound ( ) { config = new org . pentaho . platform . config . SpringSecurityHibernateConfig ( document ) ; org . dom4j . Node node = mock ( org . dom4j . Node . class ) ; when ( node . getText ( ) ) . thenReturn ( "org.pentaho.ClassNotFoundEncoder" ) ; when ( document . selectSingleNode ( ... | org . junit . Assert . assertNull ( passwordEncoder ) |
testRemoveGenomeAssemblyFromSampleSuccess ( ) { ca . corefacility . bioinformatics . irida . model . sample . Sample s = sampleService . read ( 1L ) ; "<AssertPlaceHolder>" ; sampleService . removeGenomeAssemblyFromSample ( s , 1L ) ; try { sampleService . getGenomeAssemblyForSample ( s , 1L ) ; } catch ( ca . corefaci... | org . junit . Assert . assertNotNull ( sampleService . getGenomeAssemblyForSample ( s , 1L ) ) |
testListMatchingCategoryQueries ( ) { System . out . println ( "listMatchingCategoryQueries" ) ; org . netbeans . modules . profiler . oql . repository . api . OQLQueryCategory category = instance . listCategories ( ) . get ( 0 ) ; java . util . List result = instance . listQueries ( category , ".+?allocated.*" ) ; "<A... | org . junit . Assert . assertEquals ( 2 , result . size ( ) ) |
testReverseInsertNoNormalizationNecessaryOneBaseFirst ( ) { de . charite . compbio . jannovar . reference . TranscriptPosition txPos = new de . charite . compbio . jannovar . reference . TranscriptPosition ( infoReverse , 0 , PositionType . ZERO_BASED ) ; de . charite . compbio . jannovar . reference . GenomePosition g... | org . junit . Assert . assertEquals ( change , updatedChange ) |
testSetTableName ( ) { org . pentaho . hbase . shim . api . HBaseValueMeta hbMeta = getHBaseValueMeta ( ) ; hbMeta . setTableName ( "test" ) ; "<AssertPlaceHolder>" ; } setTableName ( java . lang . String ) { m_tableName = tableName ; } | org . junit . Assert . assertEquals ( "test" , hbMeta . m_tableName ) |
testSolutionRightSide ( ) { org . hipparchus . analysis . UnivariateFunction f = new org . hipparchus . analysis . function . Sin ( ) ; org . hipparchus . analysis . solvers . UnivariateSolver solver = getSolver ( ) ; double left = - 1.5 ; double right = 0.05 ; for ( int i = 0 ; i < 10 ; i ++ ) { double solution = getS... | org . junit . Assert . assertTrue ( ( solution >= 0.0 ) ) |
testPlatypus ( ) { java . lang . String headerLines = PLATYPUS_HEADER ; java . lang . String vcfLine = "1\t17452\t.\tA\tG\t388\tPASS\tFR=1.0;MMLQ=27.0;TCR=7;HP=1;WE=14938;" + ( ( "Source=Platypus;WS=14920;PP=388.0;TR=17;NF=10;TCF=10;NR=7;TC=17;MGOF=29;SbPval=0.59;MQ=46.59;" + "QD=24.8688948557;SC=ACAGAATTACAAGGTGCTGGC;... | org . junit . Assert . assertEquals ( SupportedVarCaller . PLATYPUS , de . charite . compbio . jannovar . filter . impl . gt . SupportedVarCaller . guessFromGenotype ( gt ) ) |
invalidIntegerGreaterOrEqualShouldCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createGreaterOrEqualDefinition ( ToscaTypes . INTEGER . toString ( ) , 10L , "5" ) , alien4... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
setStyleAttributeMultipleTimes ( ) { com . vaadin . flow . dom . Element e = com . vaadin . flow . dom . ElementFactory . createDiv ( ) ; e . setAttribute ( "style" , "width:12em" ) ; e . setAttribute ( "style" , "height:12em" ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return sessionAttribute... | org . junit . Assert . assertEquals ( "height:12em" , e . getAttribute ( "style" ) ) |
init_clone ( ) { V v = newValidatorFor_AbstractCompositeValidatorTests ( ) ; com . alibaba . citrus . service . form . Validator v1 = com . alibaba . citrus . service . form . impl . validation . composite . AbstractCompositeValidatorTests . createMock ( com . alibaba . citrus . service . form . Validator . class ) ; c... | org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { v1copy , v2copy } , validatorsCopy . toArray ( ) ) |
giveBlackFromCache ( ) { pv . giveBlack ( nl . jqno . equalsverifier . internal . prefabvalues . PrefabValuesTest . STRING_TAG ) ; "<AssertPlaceHolder>" ; } giveBlack ( nl . jqno . equalsverifier . internal . prefabvalues . TypeTag ) { return this . < T > giveTuple ( tag ) . getBlack ( ) ; } | org . junit . Assert . assertEquals ( "b" , pv . giveBlack ( nl . jqno . equalsverifier . internal . prefabvalues . PrefabValuesTest . STRING_TAG ) ) |
testDelete ( ) { org . apache . ibatis . session . SqlSession tdhsSession = getTDHSSession ( ) ; int insert = tdhsSession . getMapper ( com . taobao . tdhs . jdbc . test . mybatis . mapper . OrderMapper . class ) . delete ( ) ; "<AssertPlaceHolder>" ; tdhsSession . close ( ) ; } delete ( ) { return statement . delete (... | org . junit . Assert . assertEquals ( 3 , insert ) |
shouldReturnNullIfResourceEditRelationListIsEmpty ( ) { java . util . List < ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditRelation > relations = java . util . Collections . < ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditRelation > emptyList ( ) ; java . lang . S... | org . junit . Assert . assertEquals ( StringUtils . EMPTY , actual ) |
shouldNotRegisterAlreadyRegisteredPlayer ( ) { java . lang . String name = "jonah" ; given ( dataSource . isAuthAvailable ( name ) ) . willReturn ( true ) ; boolean result = api . registerPlayer ( name , "pass" ) ; "<AssertPlaceHolder>" ; verify ( dataSource , only ( ) ) . isAuthAvailable ( name ) ; verifyZeroInteracti... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( false ) ) |
testPersistence ( ) { System . out . println ( "persistence" ) ; fd = new de . waldheinz . fs . util . FileDisk ( f , true ) ; final java . nio . ByteBuffer read = java . nio . ByteBuffer . allocate ( de . waldheinz . fs . util . FileDiskTest . SIZE ) ; fd . read ( 0 , read ) ; reference . rewind ( ) ; read . rewind ( ... | org . junit . Assert . assertEquals ( reference , read ) |
testMovePackageToParent ( ) { enableSilentOperation ( VcsConfiguration . StandardConfirmation . ADD ) ; final com . intellij . openapi . vfs . VirtualFile child = createDirInCommand ( myWorkingCopyDir , "child" ) ; final com . intellij . openapi . vfs . VirtualFile grandChild = createDirInCommand ( child , "grandChild"... | org . junit . Assert . assertEquals ( listToString ( changes ) , 2 , changes . size ( ) ) |
testBigDecimalEquality ( ) { org . teiid . query . processor . eval . CompareCriteria crit = new org . teiid . query . processor . eval . CompareCriteria ( new org . teiid . query . sql . symbol . Constant ( new java . math . BigDecimal ( "3.10" ) ) , CompareCriteria . EQ , new org . teiid . query . sql . symbol . Cons... | org . junit . Assert . assertTrue ( org . teiid . query . eval . Evaluator . evaluate ( crit ) ) |
testLastTimeStepLayer ( ) { int nIn = 3 ; int nOut = 5 ; int tsLength = 4 ; int layerSize = 8 ; java . util . Random r = new java . util . Random ( 12345 ) ; for ( int mb : new int [ ] { 1 , 3 } ) { for ( boolean inputMask : new boolean [ ] { false , true } ) { for ( boolean simple : new boolean [ ] { false , true } ) ... | org . junit . Assert . assertTrue ( name , gradOK ) |
applyMaterieelFormeelGeldigHistorieVormGeen_PeilmomentNaVerval_AfnemerInd ( ) { nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder groepBuilder = new nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder ( null ) ; groepBuilder . metGroepElement ( Element . PERSOON_AFNEMERINDICATIE_STANDAARD . getId ... | org . junit . Assert . assertThat ( apply , org . hamcrest . core . Is . is ( false ) ) |
splitFolderTestAFolderEmptyFL ( ) { java . util . Set < org . talend . dataprep . qa . dto . Folder > result = folderUtil . splitFolder ( aPathF , emptyFList ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( ( ( org . apache . commons . lang3 . StringUtils . isEmpty ( title ) ) && ( org . apache . commons . lang3 ... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testIdFieldNameQuery ( ) { com . github . jmkgreen . morphia . TestQuery . PhotoWithKeywords pwk = new com . github . jmkgreen . morphia . TestQuery . PhotoWithKeywords ( "scott" , "hernandez" ) ; ds . save ( pwk ) ; com . github . jmkgreen . morphia . TestQuery . PhotoWithKeywords pwkLoaded = ds . find ( com . github ... | org . junit . Assert . assertNotNull ( pwkLoaded ) |
mapTest ( ) { com . navercorp . pinpoint . collector . mapper . thrift . stat . TFResponseTimeMapper mapper = new com . navercorp . pinpoint . collector . mapper . thrift . stat . TFResponseTimeMapper ( ) ; com . navercorp . pinpoint . common . server . bo . stat . ResponseTimeBo responseTimeBo = new com . navercorp . ... | org . junit . Assert . assertEquals ( tFResponseTime . getAvg ( ) , 50 ) |
testAddNewContainerToGroupingRequest ( ) { java . lang . String groupLeaderContainerId = "container_1" ; java . lang . String newAffectedContainerId = "container_11" ; underTest . addOrModifyGroupingRequest ( groupLeaderContainerId , com . google . common . collect . ImmutableSet . of ( oper1 ) ) ; underTest . addNewCo... | org . junit . Assert . assertTrue ( request . getAffectedContainers ( ) . contains ( newAffectedContainerId ) ) |
deactivateTokenTest ( ) { final net . violet . platform . dataobjects . UserData theUser = net . violet . platform . dataobjects . UserData . getData ( getKowalskyUser ( ) ) ; theUser . generateToken ( ) ; final net . violet . platform . datamodel . Application theApplication = new net . violet . platform . datamodel .... | org . junit . Assert . assertNull ( theResult ) |
InterfaceForTemplates004 ( ) { java . lang . String code = "class<sp>A{isA<sp>T1;}<sp>interface<sp>I{}<sp>trait<sp>T<X<sp>isA<sp>I>{}<sp>trait<sp>T1{<sp>isA<sp>T<X=B>;}" ; cruise . umple . compiler . UmpleModel model = getModel ( code ) ; boolean happened = false ; try { model . run ( ) ; } catch ( java . lang . Except... | org . junit . Assert . assertTrue ( happened ) |
hashCode_equals ( ) { java . security . PrivateKey privateKey = com . google . auth . oauth2 . ServiceAccountCredentials . privateKeyFromPkcs8 ( com . google . auth . oauth2 . ServiceAccountJwtAccessCredentialsTest . SA_PRIVATE_KEY_PKCS8 ) ; com . google . auth . oauth2 . ServiceAccountJwtAccessCredentials credentials ... | org . junit . Assert . assertEquals ( credentials . hashCode ( ) , otherCredentials . hashCode ( ) ) |
testIfDerived_MavenPath_2 ( ) { final org . eclipse . xtext . generator . OutputConfiguration output = new org . eclipse . xtext . generator . OutputConfiguration ( "TEST" ) ; output . setOutputDirectory ( "xtend_gen" ) ; this . classNameValidator . getContext ( ) . put ( "ProjectAwareUniqueClassNameValidator.outputCon... | org . junit . Assert . assertFalse ( this . classNameValidator . isDerived ( file ) ) |
testTake ( ) { java . nio . file . WatchKey mockKey = mock ( java . nio . file . WatchKey . class ) ; doReturn ( null ) . doReturn ( mockKey ) . when ( watchService ) . poll ( ) ; org . powermock . api . mockito . PowerMockito . spy ( com . peircean . glusterfs . Thread . class ) ; org . powermock . api . mockito . Pow... | org . junit . Assert . assertEquals ( mockKey , key ) |
testTestClassWithoutCleaningErrorLog ( ) { org . eclipse . core . runtime . ILog log = org . eclipse . core . runtime . Platform . getLog ( org . eclipse . core . runtime . Platform . getBundle ( Activator . PLUGIN_ID ) ) ; log . log ( new org . eclipse . core . runtime . Status ( org . eclipse . core . runtime . IStat... | org . junit . Assert . assertFalse ( new org . eclipse . reddeer . eclipse . ui . views . log . LogView ( ) . getErrorMessages ( ) . isEmpty ( ) ) |
bindEnumSetsInitialValue ( ) { final org . tessell . model . values . SetValue < org . tessell . model . dsl . Color > v = new org . tessell . model . values . SetValue < org . tessell . model . dsl . Color > ( "v" , org . tessell . model . dsl . Color . GREEN ) ; final org . tessell . tests . model . dsl . EnumPropert... | org . junit . Assert . assertThat ( box . getSelectedIndex ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
sum_A$_Int_containsNull ( ) { com . m3 . scalaflavor4j . IndexedSeq < java . lang . Integer > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( 1 , 2 , null , 3 ) ; com . m3 . scalaflavor4j . SNum actual = seq . sum ( ) ; "<AssertPlaceHolder>" ; } toInt ( ) { return value . intValue ( ) ; } | org . junit . Assert . assertThat ( actual . toInt ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 6 ) ) ) |
testWithNoHeader ( ) { java . util . Properties props = new java . util . Properties ( ) ; props . put ( "commentChar" , "#" ) ; props . put ( "fileExtension" , ".txt" ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( ( "jdbc:relique:csv:" + ( org . relique . jdbc . csv . TestCsvDriver . f... | org . junit . Assert . assertFalse ( results . next ( ) ) |
testConvertUrlWithUserinfo ( ) { org . apache . hadoop . fs . Path expectedPath = new org . apache . hadoop . fs . Path ( "foo://username:password@example.com:8042" ) ; org . apache . hadoop . yarn . api . records . URL url = org . apache . hadoop . yarn . api . records . URL . fromPath ( expectedPath ) ; org . apache ... | org . junit . Assert . assertEquals ( expectedPath , actualPath ) |
testTimeout ( ) { final java . util . concurrent . Future < java . lang . Boolean > future = getFutureAsync ( ) . timeout ( ) ; "<AssertPlaceHolder>" ; org . junit . Assert . fail ( java . lang . String . valueOf ( future . get ( ) ) ) ; } timeout ( ) { java . lang . Thread . sleep ( 1000 ) ; return com . github . vbau... | org . junit . Assert . assertNotNull ( future ) |
testJaspiAuthContextThrowsAuthenticationException ( ) { com . ibm . ws . security . jaspi . JaspiServiceImplTest . TestDoubleJaspiServiceImpl jaspiService = new com . ibm . ws . security . jaspi . JaspiServiceImplTest . TestDoubleJaspiServiceImpl ( ) ; mock . checking ( new org . jmock . Expectations ( ) { { allowing (... | org . junit . Assert . assertNotNull ( jac ) |
test_getSerialiser_for_string_successful ( ) { java . util . HashMap < java . lang . Class , com . esotericsoftware . kryo . Serializer > serialisers = new java . util . HashMap < java . lang . Class , com . esotericsoftware . kryo . Serializer > ( ) ; serialisers . put ( java . io . File . class , new org . ikasan . s... | org . junit . Assert . assertTrue ( restored . equals ( str ) ) |
testGetYesterdayDate ( ) { java . util . Calendar cal = new java . util . GregorianCalendar ( ) ; cal . roll ( Calendar . DATE , false ) ; java . util . Date expected = cal . getTime ( ) ; java . util . Date actual = info . michaelkohler . helpertools . date . DateHelper . yesterdayDate ( ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertTrue ( compareDatesToTheMinutes ( actual , expected ) ) |
tagAbiPairComparisionWhenEqual ( ) { org . arquillian . droidium . container . configuration . target . TagAbiPair tagAbiPair1 = new org . arquillian . droidium . container . configuration . target . TagAbiPair ( org . arquillian . droidium . container . configuration . target . TAG . DEFAULT , org . arquillian . droid... | org . junit . Assert . assertEquals ( 0 , tagAbiPair1 . compareTo ( tagAbiPair2 ) ) |
testUndoTaskAssignmentByDocumentIdAndUserId ( ) { qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestTaskAssignmentResourceFacadeImp . entityManager . getTransaction ( ) . begin ( ) ; int result = qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestTaskAssignmentResourceFacadeImp . taskAssign... | org . junit . Assert . assertEquals ( 1 , result ) |
testCreateBizkeeperCommand ( ) { com . netflix . hystrix . strategy . HystrixPlugins . reset ( ) ; org . apache . servicecomb . bizkeeper . ProviderBizkeeperHanlder providerBizkeeperHanlder = new org . apache . servicecomb . bizkeeper . ProviderBizkeeperHanlder ( ) ; org . apache . servicecomb . core . Invocation invoc... | org . junit . Assert . assertNotNull ( command ) |
validateErrorSituationOutput ( ) { nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester uaa = nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester . newBuilder ( ) . hideMatcherLoadStats ( ) . delayInitialization ( ) . dropTests ( ) . build ( ) ; uaa . setShowMatcherStats ( true ) ; uaa . keep... | org . junit . Assert . assertFalse ( uaa . runTests ( false , true ) ) |
testHasNext_NotEnoughPayload ( ) { final java . nio . ByteBuffer buf = java . nio . ByteBuffer . allocate ( MessageUtils . HEADER_LEN ) ; buf . putInt ( 20 ) ; this . it = new com . taobao . metamorphosis . consumer . MessageIterator ( "test" , buf . array ( ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return it . has... | org . junit . Assert . assertFalse ( this . it . hasNext ( ) ) |
testDependentInstanceDestroyedDuringShutdown ( ) { Foo . DESTROYED . set ( false ) ; try ( org . jboss . weld . environment . se . WeldContainer container = new org . jboss . weld . environment . se . Weld ( ) . disableDiscovery ( ) . beanClasses ( org . jboss . weld . environment . se . test . container . instance . F... | org . junit . Assert . assertTrue ( Foo . DESTROYED . get ( ) ) |
getResultSetShouldNotReturnNull ( ) { org . neo4j . jdbc . bolt . BoltNeo4jStatement statement = mock ( org . neo4j . jdbc . bolt . BoltNeo4jStatement . class ) ; when ( statement . isClosed ( ) ) . thenReturn ( false ) ; when ( statement . getResultSet ( ) ) . thenCallRealMethod ( ) ; org . powermock . reflect . White... | org . junit . Assert . assertTrue ( ( ( statement . getResultSet ( ) ) != null ) ) |
testGetIntegerWithoutConversionMask ( ) { java . lang . String value = "100.56" ; org . pentaho . di . core . row . ValueMetaInterface stringValueMeta = new org . pentaho . di . core . row . value . ValueMetaString ( "test" ) ; java . lang . Long expected = 100L ; java . lang . Long result = stringValueMeta . getIntege... | org . junit . Assert . assertEquals ( expected , result ) |
testParseDummyOptions ( ) { org . jboss . arquillian . drone . webdriver . factory . CapabilitiesDummyOptionsMapperTest . DummyBrowserOptions dummyBrowserOptions = new org . jboss . arquillian . drone . webdriver . factory . CapabilitiesDummyOptionsMapperTest . DummyBrowserOptions ( ) ; org . jboss . arquillian . drone... | org . junit . Assert . assertEquals ( expectedDummyBrowserOptions , dummyBrowserOptions ) |
contraintPKAdjustedNotNullBoth ( ) { java . lang . String sql = "CREATE<sp>TABLE<sp>t1<sp>(c1<sp>int,<sp>c2<sp>varchar(32),<sp>PRIMARY<sp>KEY(c1,c2))" ; makeSeparateAIS ( ) ; com . foundationdb . sql . aisddl . TableDDLTest . dropTable = com . foundationdb . ais . model . TableName . create ( com . foundationdb . sql .... | org . junit . Assert . assertTrue ( ( stmt instanceof com . foundationdb . sql . parser . CreateTableNode ) ) |
testAddSegmentInt ( ) { org . pb . x12 . X12Simple x12 = new org . pb . x12 . X12Simple ( new org . pb . x12 . Context ( '~' , '*' , ':' ) ) ; x12 . addSegment ( "ISA*ISA01*ISA02*ISA03" ) ; x12 . addSegment ( "ST*ST01*ST02*ST03" ) ; org . pb . x12 . Segment s = x12 . addSegment ( 1 ) ; s . addElements ( "GS*GS01*GS02*G... | org . junit . Assert . assertEquals ( "GS*GS01*GS02*GS03" , x12 . getSegment ( 1 ) . toString ( ) ) |
canConvertPrimitiveInts ( ) { com . sjl . dsl4xml . support . convert . PrimitiveIntStringConverter _c = new com . sjl . dsl4xml . support . convert . PrimitiveIntStringConverter ( ) ; "<AssertPlaceHolder>" ; } canConvertTo ( java . lang . Class ) { return aClass . isAssignableFrom ( Long . TYPE ) ; } | org . junit . Assert . assertTrue ( _c . canConvertTo ( Integer . TYPE ) ) |
dataConversionTest ( ) { org . kaaproject . kaa . common . dto . credentials . EndpointRegistrationDto endpointRegistrationDto = new org . kaaproject . kaa . common . dto . credentials . EndpointRegistrationDto ( "1" , "2" , "3" , 42 , "test" ) ; org . kaaproject . kaa . server . common . nosql . mongo . dao . model . ... | org . junit . Assert . assertEquals ( endpointRegistrationDto , mongoEndpointRegistration . toDto ( ) ) |
test_ ( ) { cfvbaibai . cardfantasy . test . func . SkillTestContext context = prepare ( 50 , 50 , "+" , "+" ) ; context . addToField ( 0 , 0 ) ; cfvbaibai . cardfantasy . engine . CardInfo c = context . addToField ( 1 , 1 ) ; c . setBasicHP ( 1000 ) ; context . startGame ( ) ; context . proceedOneRound ( ) ; "<AssertP... | org . junit . Assert . assertTrue ( c . isDead ( ) ) |
test_WithOnlyCookieNameMismatch ( ) { ctx . request ( ) . addCookie ( randomCookie ) ; extension . activate ( configWithCookie ) ; boolean actual = extension . accepts ( ctx . request ( ) , null , extension . getAllowedKeyValues ( ) ) ; "<AssertPlaceHolder>" ; } activate ( java . util . Map ) { this . listRoot = org . ... | org . junit . Assert . assertFalse ( actual ) |
testTypeParPlain ( ) { org . drools . decisiontable . parser . LhsBuilder builder = new org . drools . decisiontable . parser . LhsBuilder ( 9 , 1 , null ) ; builder . addTemplate ( 10 , 1 , "Type()" ) ; builder . addCellValue ( 11 , 1 , "x" ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; } | org . junit . Assert . assertEquals ( "Type()" , builder . getResult ( ) ) |
testGetLayerGroups ( ) { if ( ! ( enabled ( ) ) ) { return ; } java . util . List < java . lang . String > groups = reader . getLayerGroups ( ) . getNames ( ) ; it . geosolutions . geoserver . rest . GeoServerRESTClassTest . LOGGER . info ( ( ( "Found<sp>" + ( groups . size ( ) ) ) + "<sp>layerGroups" ) ) ; for ( java ... | org . junit . Assert . assertNotNull ( group . getPublishedList ( ) ) |
testConnectionClosed ( ) { java . sql . Connection conn = createMock ( java . sql . Connection . class ) ; conn . setAutoCommit ( true ) ; expect ( conn . isClosed ( ) ) . andReturn ( true ) ; java . sql . Driver driver = createMock ( java . sql . Driver . class ) ; java . lang . String url = "jdbc:bar:baz" ; expect ( ... | org . junit . Assert . assertNotNull ( sds . getReadOnlyConnection ( null ) ) |
setDevToolsPort ( ) { int devPort = 7777 ; com . openfin . desktop . RuntimeConfiguration configuration = com . openfin . desktop . RuntimeConfigTest . getDefaultRuntimeConfiguration ( ) ; configuration . setDevToolsPort ( devPort ) ; com . openfin . desktop . DesktopConnection conn = com . openfin . desktop . TestUtil... | org . junit . Assert . assertTrue ( com . openfin . desktop . RuntimeConfigTest . serverListening ( devPort ) ) |
shouldReadExampleBsonStream ( ) { byte [ ] bytes = new byte [ ] { 22 , 0 , 0 , 0 , 2 , 104 , 101 , 108 , 108 , 111 , 0 , 6 , 0 , 0 , 0 , 119 , 111 , 114 , 108 , 100 , 0 , 0 } ; output = reader . read ( new java . io . ByteArrayInputStream ( bytes ) ) ; java . lang . String json = org . modeshape . schematic . document ... | org . junit . Assert . assertEquals ( expected , json ) |
verifyEvaluation_SSO_IDP_TRUSTSTORE_PASSWORD_Null ( ) { addEntry ( "SSO_IDP_TRUSTSTORE_PASSWORD" , null ) ; query . execute ( ) ; "<AssertPlaceHolder>" ; } getIDPTruststorePassword ( ) { return idpTruststorePasswd ; } | org . junit . Assert . assertEquals ( "" , query . getIDPTruststorePassword ( ) ) |
testIncludeExtensionReferenceAsRecurse ( ) { ca . uhn . fhir . jpa . dao . r4 . SearchParameter attendingSp = new ca . uhn . fhir . jpa . dao . r4 . SearchParameter ( ) ; attendingSp . addBase ( "Patient" ) ; attendingSp . setCode ( "attending" ) ; attendingSp . setType ( org . hl7 . fhir . r4 . model . Enumerations . ... | org . junit . Assert . assertThat ( foundResources , contains ( appId . getValue ( ) , p2id . getValue ( ) , p1id . getValue ( ) ) ) |
testTokens_ignore__fieldsMiddle ( ) { java . util . List < org . apache . ambari . server . api . predicate . Token > listTokens = new java . util . ArrayList ( ) ; listTokens . add ( new org . apache . ambari . server . api . predicate . Token ( Token . TYPE . RELATIONAL_OPERATOR , "=" ) ) ; listTokens . add ( new org... | org . junit . Assert . assertArrayEquals ( listTokens . toArray ( new org . apache . ambari . server . api . predicate . Token [ listTokens . size ( ) ] ) , tokens ) |
testCountEitherMobileOrZeroDomainZero ( ) { org . apache . pig . data . Tuple input = tupleFactory . newTuple ( 2 ) ; input . set ( 0 , "http://en.zero.wikipedia.org/wiki/James_Ingram" ) ; input . set ( 1 , "zero-saudi-telecom.tab" ) ; org . wikimedia . analytics . kraken . pig . ZeroFilterFunc zero = new org . wikimed... | org . junit . Assert . assertTrue ( zero . exec ( input ) ) |
resetWithoutMarkReturnsToStart ( ) { final byte [ ] data = new byte [ ] { 1 , 2 , 3 , 4 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . BigDecoder fixture = new com . flagstone . transform . coder . BigDecoder ( stream ) ; f... | org . junit . Assert . assertEquals ( 1 , fixture . readByte ( ) ) |
testGetRefundInvalidPaymentValue ( ) { org . oscarehr . common . dao . BillingONPaymentDao paymentDao = ( ( org . oscarehr . common . dao . BillingONPaymentDao ) ( org . oscarehr . util . SpringUtils . getBean ( org . oscarehr . common . dao . BillingONPaymentDao . class ) ) ) ; org . oscarehr . common . model . Billin... | org . junit . Assert . assertEquals ( new java . math . BigDecimal ( "0.00" ) , refund ) |
search_direct_deep ( ) { touch ( "a.csv" ) ; touch ( "a/a.csv" ) ; touch ( "a/a/a.csv" ) ; touch ( "a/a/a/a.csv" ) ; org . apache . hadoop . fs . FileSystem fs = getTempFileSystem ( ) ; java . util . List < org . apache . hadoop . fs . FileStatus > results = com . asakusafw . runtime . directio . hadoop . HadoopDataSou... | org . junit . Assert . assertThat ( normalize ( results ) , is ( path ( "a/a/a.csv" ) ) ) |
testShuffle ( ) { RandomUtil . random = new com . liferay . portal . kernel . security . RandomUtilTest . PredictableRandom ( com . liferay . portal . kernel . security . RandomUtilTest . _NUMBERS ) ; java . lang . String inputString = "abcdefghij" ; java . lang . String shutffledString = com . liferay . portal . kerne... | org . junit . Assert . assertEquals ( inputString , new java . lang . String ( shutffledChars ) ) |
testHasDisabledFeaturesNot ( ) { java . lang . String version = "2.15" ; when ( gerritServerOne . getGerritVersion ( ) ) . thenReturn ( version ) ; listener . checkGerritVersionFeatures ( ) ; "<AssertPlaceHolder>" ; } hasDisabledFeatures ( ) { if ( ( ( gerritConnectionListener ) != null ) && ( gerritConnectionListener ... | org . junit . Assert . assertFalse ( gerritServerOne . hasDisabledFeatures ( ) ) |
analyzeTest ( ) { org . sonar . plugins . delphi . antlr . analyzer . LexerMetrics [ ] metrics = new org . sonar . plugins . delphi . antlr . analyzer . LexerMetrics [ ] { org . sonar . plugins . delphi . antlr . analyzer . LexerMetrics . PUBLIC , org . sonar . plugins . delphi . antlr . analyzer . LexerMetrics . PUBLI... | org . junit . Assert . assertEquals ( metrics [ ( i ++ ) ] , visibility ) |
testStackedAssignments ( ) { spoon . reflect . declaration . CtType < spoon . test . variable . testclasses . StackedAssignmentSample > type = spoon . testing . utils . ModelUtils . buildClass ( spoon . test . variable . testclasses . StackedAssignmentSample . class ) ; java . util . List < spoon . reflect . code . CtA... | org . junit . Assert . assertEquals ( 3 , l . size ( ) ) |
testGetOsName ( ) { final java . lang . String expected = "Windows<sp>Me" ; com . vmware . xenon . common . SystemHostInfo systemHostInfo = new com . vmware . xenon . common . SystemHostInfo ( ) ; systemHostInfo . properties . put ( SystemHostInfo . PROPERTY_NAME_OS_NAME , expected ) ; "<AssertPlaceHolder>" ; } getOsNa... | org . junit . Assert . assertEquals ( expected , systemHostInfo . getOsName ( ) ) |
metadataCheck ( ) { org . easydevelop . business . domain . User order = new org . easydevelop . business . domain . User ( ) ; order . setUserId ( 1 ) ; keyTest . metadataCheck ( order ) ; "<AssertPlaceHolder>" ; } metadataCheck ( org . easydevelop . business . domain . User ) { return testUser . getName ( ) ; } | org . junit . Assert . assertTrue ( order . getName ( ) . equals ( "1" ) ) |
testDateLookupInMessage ( ) { final java . lang . String template = "${date:YYYY-MM-dd}" ; context . getLogger ( org . apache . logging . log4j . core . layout . PatternLayoutNoLookupDateTest . class . getName ( ) ) . info ( template ) ; final org . apache . logging . log4j . test . appender . ListAppender listAppender... | org . junit . Assert . assertTrue ( string , string . contains ( template ) ) |
getIpAddress_NIC3 ( ) { parameters . put ( VMPropertyHandler . TS_NIC1_IP_ADDRESS , new org . oscm . app . v2_0 . data . Setting ( VMPropertyHandler . TS_NIC1_IP_ADDRESS , "ip<sp>address<sp>1" ) ) ; parameters . put ( VMPropertyHandler . TS_NIC2_IP_ADDRESS , new org . oscm . app . v2_0 . data . Setting ( VMPropertyHand... | org . junit . Assert . assertEquals ( "ip<sp>address<sp>3" , ipAddress ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.