input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
removeAll_0arg ( ) { java . util . Map < java . lang . Long , java . lang . String > data = createLSData ( 3 ) ; cache . putAll ( data ) ; cache . removeAll ( ) ; for ( java . lang . Long key : data . keySet ( ) ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertFalse ( cache . containsKey ( key ) ) |
testNegativeArgument ( ) { final java . lang . String [ ] args = new java . lang . String [ ] { "-b" , "-1" } ; final org . apache . commons . cli . CommandLine cl = parser . parse ( options , args ) ; "<AssertPlaceHolder>" ; } getOptionValue ( org . apache . commons . cli . Option ) { if ( option == null ) { return nu... | org . junit . Assert . assertEquals ( "-1" , cl . getOptionValue ( "b" ) ) |
testTwoClassesTwoExcludeWithWildcard ( ) { japicmp . cmp . JarArchiveComparatorOptions options = new japicmp . cmp . JarArchiveComparatorOptions ( ) ; options . getFilters ( ) . getExcludes ( ) . add ( new japicmp . filter . JavaDocLikeClassFilter ( "japicmp.*" ) ) ; java . util . List < japicmp . model . JApiClass > j... | org . junit . Assert . assertThat ( jApiClasses . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
testLeftOuterJoin ( ) { java . lang . String sqlText = "and<sp>C.TYPE=UPPER(A.type)\n" 0 + ( ( ( ( ( ( "FROM<sp>TABLE_A<sp>A\n" + "LEFT<sp>JOIN<sp>TABLE_B<sp>B\n" ) + "ON<sp>A.ID<sp>=<sp>B.ID\n" ) + "LEFT<sp>JOIN<sp>TABLE_C<sp>C\n" ) + "ON<sp>C.SOURCE=<sp>\'PBD_SMARTWORKS\'\n" ) + "and<sp>C.TYPE=UPPER(A.type)\n" ) + "W... | org . junit . Assert . assertEquals ( s , expected , s ) |
testMagLeverenGeenAttenderingOfSelectieDienst ( ) { org . mockito . Mockito . when ( verstrekkingsbeperkingService . heeftGeldigeVerstrekkingsbeperking ( any ( ) , any ( ) ) ) . thenReturn ( false ) ; nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatiebundel = maakAutorisatiebundel ( SoortDienst . GEEF_D... | org . junit . Assert . assertTrue ( magLeveren ) |
testComputeSpanningHierarchyReverse ( ) { com . google . devtools . depan . model . GraphNode [ ] nodeArray = com . google . devtools . depan . test . TestUtils . buildNodes ( 5 ) ; com . google . devtools . depan . model . GraphModel test = com . google . devtools . depan . test . TestUtils . buildComplete ( nodeArray... | org . junit . Assert . assertEquals ( 5 , buildAllNodes ( result ) . size ( ) ) |
qNameNoNamespace ( ) { "<AssertPlaceHolder>" ; } qName ( java . lang . String , java . lang . String ) { return annis . model . AnnisNode . qName ( namespace , name , ":" ) ; } | org . junit . Assert . assertThat ( annis . model . AnnisNode . qName ( null , "name" ) , org . hamcrest . Matchers . is ( "name" ) ) |
testEmptyPartition ( ) { reset ( _partitionFilter ) ; when ( _partitionFilter . filter ( org . mockito . Matchers . < java . lang . Iterable < com . bazaarvoice . ostrich . ServiceEndPoint > > any ( ) , any ( com . bazaarvoice . ostrich . PartitionContext . class ) ) ) . thenReturn ( com . google . common . collect . I... | org . junit . Assert . assertFalse ( called ) |
testI2os_BigInt_lengthLongerThanOctetString ( ) { java . math . BigInteger bigInt = new java . math . BigInteger ( "42" ) ; byte [ ] expectedResult = new byte [ ] { ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 42 ) ) } ; byte [ ] result = de . persosim . simulator . crypto . Tr03111Utils ... | org . junit . Assert . assertArrayEquals ( expectedResult , result ) |
testMaxInRange ( ) { parameter . setMaximumValue ( 0 ) ; parameter . configure ( org . apache . flink . api . java . utils . ParameterTool . fromArgs ( new java . lang . String [ ] { "--test" , "-1" } ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( new java . lang . Long ( ( - 1 ) ) , parameter . getValue ( ) ) |
testSingleOptionalOptionRequestMissing ( ) { final com . lexicalscope . jewel . cli . TestCliImpl . SingleOptionalOption option = new com . lexicalscope . jewel . cli . CliInterfaceImpl < com . lexicalscope . jewel . cli . TestCliImpl . SingleOptionalOption > ( com . lexicalscope . jewel . cli . TestCliImpl . SingleOpt... | org . junit . Assert . assertThat ( option . getName ( ) , equalTo ( null ) ) |
testReadChineeseChars ( ) { java . lang . String s = "" ; javax . ws . rs . ext . MessageBodyReader < java . lang . String > p = new org . apache . cxf . jaxrs . provider . PrimitiveTextProvider ( ) ; java . lang . String value = p . readFrom ( java . lang . String . class , null , new java . lang . annotation . Annota... | org . junit . Assert . assertEquals ( s , value ) |
whenDefaults ( ) { final java . lang . Class < ? > cls = org . apache . isis . core . metamodel . facets . object . domainobjectlayout . DomainObjectLayoutFactoryTest . CustomerWithDefaults . class ; facetFactory . process ( new org . apache . isis . core . metamodel . facets . FacetFactory . ProcessClassContext ( cls ... | org . junit . Assert . assertNull ( facet ) |
failFast ( ) { java . util . function . Predicate < java . lang . String > predicate1 = createPredicate ( false ) ; java . util . function . Predicate < java . lang . String > predicate2 = createPredicate ( true ) ; predicate = org . mule . runtime . core . api . util . func . CompositePredicate . of ( predicate1 , pre... | org . junit . Assert . assertThat ( predicate . test ( "" ) , org . hamcrest . CoreMatchers . is ( false ) ) |
euqal_shouldPreventAddingTwoEqualObjectsToACollection ( ) { java . util . Set < org . openmrs . CohortMembership > cohortMembershipSet = new java . util . LinkedHashSet ( ) ; final int PATIENT_ID = 12 ; org . openmrs . CohortMembership cohortMembershipOne = new org . openmrs . CohortMembership ( PATIENT_ID ) ; org . op... | org . junit . Assert . assertEquals ( cohortMembershipSet . size ( ) , 1 ) |
listTest ( ) { com . jfireframework . baseutil . collection . buffer . ByteBuf < ? > buf = com . jfireframework . baseutil . collection . buffer . HeapByteBuf . allocate ( 256 ) ; java . util . ArrayList < com . jframework . licp . test . basetest . data . BaseData > list = new java . util . ArrayList < com . jframewor... | org . junit . Assert . assertTrue ( list . equals ( result ) ) |
determinePathToJar_withSpaces ( ) { final java . net . URL jarUrl = java . net . URI . create ( "file:/home/example/with%20spaces/git-credential-manager-1.0.0.jar!/com/microsoft/alm/gitcredentialmanager/" ) . toURL ( ) ; final java . lang . String actual = com . microsoft . alm . gitcredentialmanager . Program . determ... | org . junit . Assert . assertEquals ( expected , actual ) |
testOverwriteAllowsAndDenies ( ) { discord4j . core . object . util . PermissionSet base = discord4j . core . object . util . PermissionSet . of ( discord4j . core . util . SEND_MESSAGES ) ; java . util . List < discord4j . core . object . PermissionOverwrite > roleOverwrites = java . util . Collections . emptyList ( )... | org . junit . Assert . assertEquals ( expected , actual ) |
constructorIsNullableArgumentShouldSetIsNullable ( ) { boolean isNullable = true ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withIsNullable ( isNullable ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { buildResource ( buildResourceType ( RUNTIME . type )... | org . junit . Assert . assertEquals ( isNullable , resourceEditProperty . isNullable ( ) ) |
testPoll_whenReadyAndNoEvent ( ) { watchService . setRunning ( true ) ; com . peircean . glusterfs . GlusterWatchKey mockKey = mock ( com . peircean . glusterfs . GlusterWatchKey . class ) ; watchService . getPaths ( ) . add ( mockKey ) ; doReturn ( true ) . when ( mockKey ) . isValid ( ) ; doReturn ( true ) . when ( m... | org . junit . Assert . assertEquals ( null , key ) |
testBuildWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . person . work . PersonWork context = new org . lnu . is . domain . person . work . PersonWork ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonWork<sp>e<sp>" ; org ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testEmptyChannel ( ) { try { org . apache . flink . streaming . runtime . io . BufferSpiller . SpilledBufferOrEventSequence seq = new org . apache . flink . streaming . runtime . io . BufferSpiller . SpilledBufferOrEventSequence ( tempFile , fileChannel , buffer , pageSize ) ; seq . open ( ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertNull ( seq . getNext ( ) ) |
testIndexOfKey ( ) { java . lang . String value1 = com . silverpeas . jcrutil . RandomGenerator . getRandomString ( ) ; java . lang . String value2 = com . silverpeas . jcrutil . RandomGenerator . getRandomString ( ) ; java . lang . String value3 = com . silverpeas . jcrutil . RandomGenerator . getRandomString ( ) ; co... | org . junit . Assert . assertThat ( result , is ( 1 ) ) |
serverGroup2 ( ) { org . jboss . hal . dmr . ResourceAddress input = new org . jboss . hal . dmr . ResourceAddress ( ) . add ( "server-group" , "main-server-group" ) . add ( "system-property" , "*" ) ; org . jboss . hal . dmr . ResourceAddress expected = new org . jboss . hal . dmr . ResourceAddress ( ) . add ( "server... | org . junit . Assert . assertEquals ( expected , result ) |
shouldReturnBoundaryForCloseSquareBracket ( ) { edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType type = edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( 0 , ']' , 1 ) ; "<AssertPlaceHolder>" ; } getType ( int , char , int ) { if ( java . lang . Charact... | org . junit . Assert . assertEquals ( EntityNameCharType . BOUNDARY , type ) |
getRuntimeItemByPipelineExecutionKeyExisting ( ) { org . guvnor . ala . ui . model . PipelineExecutionTraceKey traceKey = new org . guvnor . ala . ui . model . PipelineExecutionTraceKey ( org . guvnor . ala . ui . backend . service . RuntimeServiceImplTest . PIPELINE_EXECUTION_ID ) ; java . util . List < org . guvnor .... | org . junit . Assert . assertEquals ( expectedItem , result ) |
shouldSerializeDeserialize ( ) { final org . apache . tinkerpop . gremlin . structure . io . gryo . GryoMapper mapper = builder . get ( ) . create ( ) ; final org . apache . tinkerpop . shaded . kryo . Kryo kryo = mapper . createMapper ( ) ; try ( final java . io . OutputStream stream = new java . io . ByteArrayOutputS... | org . junit . Assert . assertEquals ( "no-way-this-will-ever-work" , readX . value ( "x" ) ) |
testGetObjectFactoriesOnly ( ) { org . springframework . core . io . Resource resource1 = new org . springframework . core . io . ClassPathResource ( "classpath:dummy-context.xml" ) ; org . springframework . core . io . Resource resource2 = new org . springframework . core . io . ClassPathResource ( "classpath:dummy-co... | org . junit . Assert . assertEquals ( 2 , factory . getObject ( ) . length ) |
testConvertCAROObo2Owl ( ) { org . semanticweb . owlapi . model . OWLOntology owlOnt = convertOBOFile ( "caro.obo" ) ; "<AssertPlaceHolder>" ; } convertOBOFile ( java . lang . String ) { org . semanticweb . owlapi . model . OWLOntology convert = convert ( parseOBOFile ( fn ) ) ; writeOWL ( convert ) ; return convert ; ... | org . junit . Assert . assertNotNull ( owlOnt ) |
testGetIntDefault ( ) { java . lang . String key = "SomeKey" ; int expResult = 85 ; getSettings ( ) . setString ( key , "blue" ) ; int result = getSettings ( ) . getInt ( key , expResult ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . String , int ) { int value ; try { value = java . lang . Integer . parseInt ( ge... | org . junit . Assert . assertEquals ( expResult , result ) |
jsonObject_equal2 ( ) { org . oscm . json . JsonObject jsonObject = givenJsonObject ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( org . oscm . converter . utils . Pair . getClass ( ) ) != ( o . getClass ( ) ) ) ) { return false ; } org... | org . junit . Assert . assertTrue ( jsonObject . equals ( jsonObject ) ) |
testUtf8StringCompare ( ) { org . lilyproject . hbaseindex . StringIndexFieldDefinition fieldDef = new org . lilyproject . hbaseindex . StringIndexFieldDefinition ( "foobar" ) ; byte [ ] string1 = fieldDef . asRowKey ( ) . serialize ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "être" ) ) ; byte [ ] string... | org . junit . Assert . assertTrue ( ( ( org . apache . hadoop . hbase . util . Bytes . compareTo ( string1 , string2 ) ) > 0 ) ) |
testTimerRemoval ( ) { final java . lang . String drl = ( ( ( ( ( ( ( ( ( ( ( ( ( ( "package<sp>org.drools.compiler.test\n" + "import<sp>" ) + ( java . util . concurrent . TimeUnit . class . getName ( ) ) ) + "rule<sp>TimerRule<sp>\n" 7 ) + "rule<sp>TimerRule<sp>\n" 0 ) + "global<sp>" ) + ( java . util . concurrent . C... | org . junit . Assert . assertEquals ( 0 , list . size ( ) ) |
testResumeRead_NotPaused ( ) { establishConnection ( ) ; clientChannel . resumeRead ( ) ; net . xenqtt . message . SubAckMessage msg = new net . xenqtt . message . SubAckMessage ( 1 , new net . xenqtt . message . QoS [ ] { } ) ; brokerChannel . send ( msg , blockingCommand ) ; "<AssertPlaceHolder>" ; closeConnection ( ... | org . junit . Assert . assertTrue ( readWrite ( 1 , 0 , 1000 ) ) |
testDefaultConstructor ( ) { subject = new org . zenoss . app . metricservice . api . model . RateFormatException ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( subject ) |
testGet_Args ( ) { java . lang . String result = new ninja . cero . sqltemplate . core . template . PlainText ( ) . get ( "select<sp>*<sp>from<sp>emp" , new java . lang . String [ ] { "1" , "2" } ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( "select<sp>*<sp>from<sp>emp" ) ) |
testNotInWithCorrelatedSubQueryOrAntijoin ( ) { java . sql . ResultSet rs = methodWatcher . executeQuery ( ( "select<sp>empnum<sp>from<sp>staff<sp>where<sp>empnum<sp>not<sp>in<sp>" + "(select<sp>works.empnum<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)" ) ) ; com . splicemachine . derby . impl . sql ... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
testFlatten ( ) { int [ ] [ ] [ ] test = new int [ 2 ] [ 3 ] [ 4 ] ; int [ ] expected = new int [ 24 ] ; int count = 0 ; for ( int index1 = 0 ; index1 < ( test . length ) ; index1 ++ ) { for ( int index2 = 0 ; index2 < ( test [ index1 ] . length ) ; index2 ++ ) { for ( int index3 = 0 ; index3 < ( test [ index1 ] [ inde... | org . junit . Assert . assertArrayEquals ( expected , result ) |
testBasic2 ( ) { tl . lin . data . array . ArrayListWritable < tl . lin . data . pair . PairOfInts > data = new tl . lin . data . array . ArrayListWritable < tl . lin . data . pair . PairOfInts > ( ) ; data . add ( new tl . lin . data . pair . PairOfInts ( 1 , 2 ) ) ; data . add ( new tl . lin . data . pair . PairOfInt... | org . junit . Assert . assertEquals ( data . get ( i ) , reconstructed . get ( i ) ) |
searchEmptyIndexShouldReturnNullRevision ( ) { final com . b2international . index . revision . RevisionFixtures . RevisionData revision = getRevision ( com . b2international . index . revision . MAIN , com . b2international . index . revision . RevisionFixtures . RevisionData . class , com . b2international . index . ... | org . junit . Assert . assertNull ( revision ) |
testSize ( ) { de . metanome . algorithm_helper . data_structures . PositionListIndex pli = fixture . getFirstPLI ( ) ; "<AssertPlaceHolder>" ; } getFirstPLISize ( ) { return getFirstPLI ( ) . clusters . size ( ) ; } | org . junit . Assert . assertEquals ( fixture . getFirstPLISize ( ) , pli . size ( ) ) |
testAddArtifactWithExistingMetadataButNonMatchingClassifier ( ) { artifact = org . eclipse . tycho . p2 . target . PomDependencyCollectorTest . artifactWithClassifier ( "classifier-not-in-p2-metadata" ) ; subject . addArtifactWithExistingMetadata ( artifact , org . eclipse . tycho . p2 . target . PomDependencyCollector... | org . junit . Assert . assertThat ( units . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
iterateOverPartial ( ) { consumer = new org . apache . kafka . clients . consumer . KafkaConsumer < java . lang . String , java . lang . String > ( consumerProps , new org . apache . crunch . kafka . ClusterTest . StringSerDe ( ) , new org . apache . crunch . kafka . ClusterTest . StringSerDe ( ) ) ; int loops = 10 ; i... | org . junit . Assert . assertThat ( count , org . hamcrest . core . Is . is ( ( ( startOffsets . size ( ) ) * numPerPartition ) ) ) |
UID_availability ( ) { com . mysema . rdfbean . object . ConfigurationBuilder builder = new com . mysema . rdfbean . object . ConfigurationBuilder ( ) ; builder . addClass ( com . mysema . rdfbean . object . ConfigurationBuilderTest . Person . class ) ; builder . addClass ( com . mysema . rdfbean . object . Configurati... | org . junit . Assert . assertNotNull ( mc . getUID ( ) ) |
shouldUseCustomComputerUsingMockitoAndBoundBox ( ) { final int EXPECTED_RESULT = 1 ; com . octo . android . sample . ui . HelloAndroidActivity activityUnderTest = org . robolectric . Robolectric . buildActivity ( com . octo . android . sample . ui . HelloAndroidActivity . class ) . create ( ) . get ( ) ; com . octo . a... | org . junit . Assert . assertThat ( textViewHelloString , org . hamcrest . CoreMatchers . equalTo ( java . lang . String . valueOf ( EXPECTED_RESULT ) ) ) |
resolveNonDfs ( ) { jcifs . CIFSContext context = getContext ( ) ; context = withTestNTLMCredentials ( context ) ; jcifs . DfsResolver dfs = context . getDfs ( ) ; jcifs . DfsReferralData ref = dfs . resolve ( context , getTestServer ( ) , getTestShare ( ) , "" ) ; "<AssertPlaceHolder>" ; } getTestShare ( ) { java . la... | org . junit . Assert . assertNull ( ref ) |
testAllowTapPlanTBeOptional ( ) { org . tap4j . parser . Tap13Parser parser = new org . tap4j . parser . Tap13Parser ( java . nio . charset . Charset . defaultCharset ( ) . toString ( ) , true , false ) ; org . tap4j . model . TestSet testSet = parser . parseFile ( new java . io . File ( org . tap4j . parser . issue340... | org . junit . Assert . assertEquals ( 4 , testSet . getTestResults ( ) . size ( ) ) |
testContinuousLearning ( ) { org . hawkular . datamining . forecast . ModelData rModel = org . hawkular . datamining . forecast . ModelReader . read ( "wnLowVariance" ) ; org . hawkular . datamining . forecast . models . SimpleExponentialSmoothing . SimpleExOptimizer optimizer = org . hawkular . datamining . forecast .... | org . junit . Assert . assertTrue ( ( ( continuousLearnStatistics . getMse ( ) ) > ( batchInitStatistics . getMse ( ) ) ) ) |
testToMap ( ) { java . lang . String [ ] values = new java . lang . String [ ] { "key1:value1" , "key2:value2" , "key3:value3" } ; java . lang . String separator = ":" ; java . util . Map < java . lang . String , java . lang . String > expResult = new java . util . HashMap < java . lang . String , java . lang . String ... | org . junit . Assert . assertEquals ( expResult , result ) |
testExportsTheVersionOnStaging ( ) { com . liferay . exportimport . kernel . lar . ExportImportThreadLocal . setPortletStagingInProcess ( true ) ; try { com . liferay . portal . kernel . repository . model . FileEntry fileEntry = addStagedModel ( stagingGroup , addCompanyDependencies ( ) ) ; fileEntry = addVersion ( fi... | org . junit . Assert . assertEquals ( fileEntry . getVersion ( ) , importedFileEntry . getVersion ( ) ) |
testBasic ( ) { org . apache . druid . server . router . RendezvousHasher hasher = new org . apache . druid . server . router . RendezvousHasher ( ) ; java . util . Set < java . lang . String > nodes = new java . util . HashSet ( ) ; nodes . add ( "localhost:1" ) ; nodes . add ( "localhost:2" ) ; nodes . add ( "localho... | org . junit . Assert . assertEquals ( entry . getValue ( ) , targetServer ) |
shouldWriteNameOfService ( ) { com . graphhopper . jsprit . core . problem . VehicleRoutingProblem . Builder builder = VehicleRoutingProblem . Builder . newInstance ( ) ; com . graphhopper . jsprit . core . problem . job . Service s1 = Service . Builder . newInstance ( "1" ) . setName ( "cleaning" ) . addSizeDimension ... | org . junit . Assert . assertTrue ( s1_read . getName ( ) . equals ( "cleaning" ) ) |
loadAllResellerKeysWithinPeriod_multipleOrganizations ( ) { givenOrganizationsWithRoles ( OrganizationRoleType . BROKER , OrganizationRoleType . RESELLER , OrganizationRoleType . BROKER ) ; java . util . List < java . lang . Long > resellerKeys = dao . loadAllResellerKeysWithinPeriod ( java . lang . System . currentTim... | org . junit . Assert . assertEquals ( 1 , resellerKeys . size ( ) ) |
testScalarAddNaN ( ) { org . apache . commons . math . complex . Complex x = new org . apache . commons . math . complex . Complex ( 3.0 , 4.0 ) ; double yDouble = Double . NaN ; org . apache . commons . math . complex . Complex yComplex = new org . apache . commons . math . complex . Complex ( yDouble ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( x . add ( yComplex ) , x . add ( yDouble ) ) |
test37setUserRolesByExternalID ( ) { setup ( ) ; org . apache . ranger . db . XXPortalUserRoleDao xPortalUserRoleDao = org . mockito . Mockito . mock ( org . apache . ranger . db . XXPortalUserRoleDao . class ) ; org . apache . ranger . view . VXUser vXUser = vxUser ( ) ; org . apache . ranger . view . VXPortalUser use... | org . junit . Assert . assertNotNull ( vXStringList ) |
testCanceledCase ( ) { monitor . setCanceled ( true ) ; org . eclipse . jdt . ls . core . internal . BuildWorkspaceStatus result = handler . buildWorkspace ( false , monitor ) ; "<AssertPlaceHolder>" ; } buildWorkspace ( boolean , org . eclipse . core . runtime . IProgressMonitor ) { try { if ( monitor . isCanceled ( )... | org . junit . Assert . assertEquals ( result , BuildWorkspaceStatus . CANCELLED ) |
testFindByLHINCodeOrgNameProgramName ( ) { java . lang . String orgLHINCode1 = "100" ; java . lang . String orgLHINCode2 = "200" ; java . lang . String orgName1 = "alpha" ; java . lang . String orgName2 = "bravo" ; java . lang . String programName1 = "Program1" ; java . lang . String programName2 = "Program2" ; org . o... | org . junit . Assert . assertTrue ( true ) |
testSetterWithoutGetterCreatesUngettableCollectionMethodProperty ( ) { com . codiform . moo . property . Property property = com . codiform . moo . property . PropertyFactory . createProperty ( getCollectionMethod ( "setExplicitMethod" , java . util . Set . class ) , AccessMode . METHOD ) ; "<AssertPlaceHolder>" ; } ca... | org . junit . Assert . assertFalse ( property . canGetValue ( ) ) |
test4 ( ) { java . lang . String process = align ( "|" , "|<sp>foo<sp>1<sp>|<sp>foo<sp>2\n|<sp>foo<sp>1<sp>|<sp>foo<sp>2\n" ) ; "<AssertPlaceHolder>" ; } align ( java . lang . String , java . lang . String ) { return new osmedile . intellij . stringmanip . align . ColumnAligner ( new osmedile . intellij . stringmanip .... | org . junit . Assert . assertThat ( process , org . hamcrest . CoreMatchers . is ( "|<sp>foo<sp>1<sp>|<sp>foo<sp>2\n|<sp>foo<sp>1<sp>|<sp>foo<sp>2\n" ) ) |
persistedIdsShouldStillBeCounted ( ) { org . neo4j . io . fs . StoreChannel channel = getStoreChannel ( ) ; int batchSize = 10 ; org . neo4j . kernel . impl . store . id . FreeIdKeeper keeper = new org . neo4j . kernel . impl . store . id . FreeIdKeeper ( channel , batchSize , true ) ; for ( int i = 0 ; i < batchSize ;... | org . junit . Assert . assertEquals ( ( batchSize + extraIds ) , keeper . getCount ( ) ) |
canProcessTextToSpeech ( ) { javax . sound . sampled . AudioInputStream audio = mary . generateAudio ( "some<sp>text" ) ; "<AssertPlaceHolder>" ; } generateAudio ( java . lang . String ) { verifyInputTypeIsText ( ) ; verifyOutputTypeIsAudio ( ) ; verifyVoiceIsAvailableForLocale ( ) ; marytts . datatypes . MaryData in =... | org . junit . Assert . assertNotNull ( audio ) |
testNestedTransaction ( ) { com . ctrip . platform . dal . dao . annotation . normal . BaseTransactionAnnoClass test = create ( ) ; "<AssertPlaceHolder>" ; } performNest ( ) { org . junit . Assert . assertTrue ( com . ctrip . platform . dal . dao . client . DalTransactionManager . isInTransaction ( ) ) ; org . junit . ... | org . junit . Assert . assertEquals ( DONE , test . performNest ( ) ) |
testTrim ( ) { out = new java . io . BufferedWriter ( new java . io . FileWriter ( org . apache . hadoop . conf . TestConfiguration . CONFIG ) ) ; startConfig ( ) ; java . lang . String [ ] whitespaces = new java . lang . String [ ] { "" , "<sp>" , "\n" , "\t" } ; java . lang . String [ ] name = new java . lang . Strin... | org . junit . Assert . assertEquals ( ( n + ".value" ) , conf . get ( n ) ) |
testSchedulingVertexOnlyWithBroadcast ( ) { setupDAGVertexOnlyWithBroadcast ( 30 , 1 , 1 ) ; vertexManager . onVertexStateUpdated ( new org . apache . tez . dag . api . event . VertexStateUpdate ( "v0" , org . apache . tez . dag . api . event . VertexState . CONFIGURED ) ) ; vertexManager . onVertexStateUpdated ( new o... | org . junit . Assert . assertFalse ( edgePropertiesCaptor . getValue ( ) . containsKey ( "v2" ) ) |
testGetPluginManager ( ) { org . eclipse . core . resources . IWorkspaceRoot workspaceRoot = org . eclipse . core . resources . ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ; org . eclipse . core . resources . IProject theProject = workspaceRoot . getProject ( org . eclipse . thym . core . HybridProjectTest . PROJE... | org . junit . Assert . assertNotNull ( hProject . getPluginManager ( ) ) |
testIsCopyForeignKeys ( ) { classUnderTest . setCopyForeignKeys ( true ) ; "<AssertPlaceHolder>" ; } isCopyForeignKeys ( ) { return copyForeignKeys ; } | org . junit . Assert . assertEquals ( true , classUnderTest . isCopyForeignKeys ( ) ) |
testEmptyId ( ) { "<AssertPlaceHolder>" ; } getEmptyId ( ) { return com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . idresolver . Id . EMPTY_ID ; } | org . junit . Assert . assertThat ( com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . idresolver . Id . getEmptyId ( ) . getValue ( ) , org . hamcrest . Matchers . is ( "" ) ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( kbFolders . isEmpty ( ) ) |
testSubNetworkNodeTableColumnsPropagate ( ) { defaultSetup ( ) ; sub . getDefaultNodeTable ( ) . createColumn ( "ASDFASDF" , org . cytoscape . model . subnetwork . Integer . class , true ) ; org . cytoscape . model . subnetwork . CySubNetwork sub2 = root . addSubNetwork ( ) ; "<AssertPlaceHolder>" ; } createColumn ( or... | org . junit . Assert . assertNotNull ( sub2 . getDefaultNodeTable ( ) . getColumn ( "ASDFASDF" ) ) |
output_header_quote_style ( ) { com . asakusafw . runtime . io . text . csv . CsvTextFormat format = com . asakusafw . runtime . io . text . csv . CsvTextFormat . builder ( ) . withHeaderQuoteStyle ( QuoteStyle . ALWAYS ) . build ( ) ; java . lang . String [ ] results = com . asakusafw . runtime . io . text . csv . Csv... | org . junit . Assert . assertThat ( results , org . hamcrest . CoreMatchers . is ( new java . lang . String [ ] { "Hello!" } ) ) |
emptyAutoDeletionIfSetup ( ) { jetbrains . jetpad . projectional . cell . ProjectionalPropertySynchronizerTest . AutoDeleteChild child = new jetbrains . jetpad . projectional . cell . ProjectionalPropertySynchronizerTest . AutoDeleteChild ( ) ; container . child . set ( child ) ; jetbrains . jetpad . cell . Cell childC... | org . junit . Assert . assertNull ( container . child . get ( ) ) |
willSoonExpireFalse ( ) { long expirationLong = ( java . lang . System . currentTimeMillis ( ) ) + ( ( 1000 * 60 ) * 11 ) ; java . text . SimpleDateFormat sdf = new java . text . SimpleDateFormat ( "yyyy-MM-dd<sp>HH:mm:ss" ) ; sdf . setTimeZone ( java . util . TimeZone . getTimeZone ( "GMT" ) ) ; java . lang . String e... | org . junit . Assert . assertFalse ( credentials . willSoonExpire ( ) ) |
testCreateDropRole ( ) { java . lang . String roleName = "test-drop-role" ; java . lang . String grantor = "grantor" ; long seqId = sentryStore . createRole ( org . apache . sentry . provider . db . generic . service . persistent . TestDelegateSentryStore . SEARCH , roleName , grantor ) . getSequenceId ( ) ; "<AssertPl... | org . junit . Assert . assertEquals ( ( seqId + 1 ) , sentryStore . dropRole ( org . apache . sentry . provider . db . generic . service . persistent . TestDelegateSentryStore . SEARCH , roleName , grantor ) . getSequenceId ( ) ) |
applyHandlerWithLocal ( ) { java . util . concurrent . atomic . AtomicReference < java . util . Optional < java . lang . Integer > > localValue = new java . util . concurrent . atomic . AtomicReference ( ) ; io . trane . future . Local < java . lang . Integer > l = io . trane . future . Local . apply ( ) ; l . update (... | org . junit . Assert . assertEquals ( java . util . Optional . of ( 1 ) , localValue . get ( ) ) |
test ( ) { java . lang . String str = "abcdefghijk1234567.1111<sp>(<sp>" ; System . out . println ( str ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; org . fastcatsearch . ir . io . DataOutput output = new org . apache . lucene . store . OutputStreamDataOutput ( baos ) ; outpu... | org . junit . Assert . assertTrue ( actual . equals ( str ) ) |
urlMatcherWithNumericNameTest ( ) { final com . github . wuic . util . UrlMatcher urlMatcher = com . github . wuic . util . UrlUtils . urlMatcher ( "/workflow/4000/4000/nut.js" ) ; "<AssertPlaceHolder>" ; } matches ( ) { return matches ; } | org . junit . Assert . assertFalse ( urlMatcher . matches ( ) ) |
testDSAKey ( ) { java . security . KeyPair keyPair = instance . decodePrivateKey ( "src/test/resources/dsa" , "" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( keyPair ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . dynamic . data . mapping . model . DDMStructureVersion . class , _dynamicQueryClassLoader ) ; dynamicQuer... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testGetRow ( ) { byte [ ] bytes = "row" . getBytes ( com . pentaho . big . data . bundles . impl . shim . hbase . ResultImplTest . UTF_8 ) ; when ( delegate . getRow ( ) ) . thenReturn ( bytes ) ; "<AssertPlaceHolder>" ; } getRow ( ) { return result . getRow ( ) ; } | org . junit . Assert . assertArrayEquals ( bytes , result . getRow ( ) ) |
testScalarMultipleAggregateViaSparkPath ( ) { sqlText = "select<sp>count(a2),<sp>avg(cast(b2<sp>as<sp>float)),<sp>sum(distinct<sp>c2),<sp>max(distinct<sp>d2),<sp>count(distinct<sp>e2)<sp>from<sp>t2<sp>--splice-properties<sp>useSpark=true" ; expected = "select<sp>count(distinct<sp>c2),<sp>sum(d2),<sp>count(distinct<sp>e... | org . junit . Assert . assertEquals ( ( ( ( ( ( ( "select<sp>count(distinct<sp>c2),<sp>sum(d2),<sp>count(distinct<sp>e2)<sp>from<sp>t1,<sp>t2<sp>--splice-properties<sp>useSpark=true\n<sp>where<sp>b1=b2" 1 + sqlText ) + "select<sp>count(distinct<sp>c2),<sp>sum(d2),<sp>count(distinct<sp>e2)<sp>from<sp>t1,<sp>t2<sp>--spli... |
writeFromRedisTest ( ) { com . amazon . verticles . CacheVerticleTest . LOGGER . info ( "<sp>---><sp>Testcase:<sp>writeFromRedisTest" ) ; io . vertx . core . json . JsonObject message = io . vertx . core . json . JsonObject . mapFrom ( prepareData ( ) ) ; eb . send ( Constants . CACHE_REDIS_EVENTBUS_ADDRESS , message ,... | org . junit . Assert . assertNotNull ( body ) |
addLastTest ( ) { for ( int i = 0 ; i < ( TEST_QTY ) ; i ++ ) { java . lang . String str = java . lang . Integer . toString ( i ) ; testList . addLast ( str ) ; "<AssertPlaceHolder>" ; } } getLast ( ) { T result = peekLast ( ) ; if ( result == null ) { throw new java . util . NoSuchElementException ( ) ; } return resul... | org . junit . Assert . assertEquals ( str , testList . getLast ( ) ) |
testSerializeSubtitution ( ) { com . turn . shapeshifter . NamedSchema schema = com . turn . shapeshifter . NamedSchema . of ( com . turn . shapeshifter . testing . TestProtos . Union . getDescriptor ( ) , "Union" ) . substitute ( "string_value" , "$ref" ) ; com . turn . shapeshifter . SchemaRegistry registry = new com... | org . junit . Assert . assertNotNull ( result . get ( "$ref" ) ) |
testColumnStd ( ) { org . nd4j . linalg . factory . Nd4j . MAX_ELEMENTS_PER_SLICE = Integer . MAX_VALUE ; org . nd4j . linalg . factory . Nd4j . MAX_SLICES_TO_PRINT = Integer . MAX_VALUE ; org . nd4j . linalg . api . ndarray . INDArray twoByThree = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 600 , 600 ) . res... | org . junit . Assert . assertEquals ( assertion , columnStd ) |
test_muilt_parent ( ) { org . nutz . ioc . Ioc ioc = org . nutz . ioc . json . Utils . I ( org . nutz . ioc . json . Utils . J ( "fox" , "name:'P',age:10" ) , org . nutz . ioc . json . Utils . J ( "f2" , "parent:'fox'" ) , org . nutz . ioc . json . Utils . J ( "f3" , "parent:'f2'" ) ) ; org . nutz . ioc . json . pojo .... | org . junit . Assert . assertEquals ( 10 , f3 . getAge ( ) ) |
testCreateMedicalDevicesSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . ihe . MedicalDevicesSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . ihe . builder . IHEBuilderFactory . createMedicalDevicesSectionBuilder (... | org . junit . Assert . assertNotNull ( section ) |
remoteDifferent_Operations_blocking ( ) { org . ebayopensource . turmeric . runtime . tests . service1 . sample . types1 . MyMessage msg = org . ebayopensource . turmeric . runtime . tests . common . util . TestUtils . createTestMessage ( ) ; org . ebayopensource . turmeric . runtime . sif . service . Service service =... | org . junit . Assert . assertTrue ( ( ( responseList . size ( ) ) == 2 ) ) |
testFileCloseAfterEnteringMaintenance ( ) { org . apache . hadoop . hdfs . TestMaintenanceState . LOG . info ( "Starting<sp>testFileCloseAfterEnteringMaintenance" ) ; int expirationInMs = 30 * 1000 ; int numDataNodes = 3 ; int numNameNodes = 1 ; getConf ( ) . setInt ( DFSConfigKeys . DFS_NAMENODE_REPLICATION_MIN_KEY , ... | org . junit . Assert . assertEquals ( numDataNodes , fsn . getNumLiveDataNodes ( ) ) |
testLoadPluginWithCustomizedScheduler ( ) { org . apache . hadoop . yarn . server . nodemanager . containermanager . resourceplugin . ResourcePluginManager rpm = new org . apache . hadoop . yarn . server . nodemanager . containermanager . resourceplugin . ResourcePluginManager ( ) ; org . apache . hadoop . yarn . serve... | org . junit . Assert . assertEquals ( 1 , dmm . getDevicePluginSchedulers ( ) . size ( ) ) |
testPatchFilePath ( ) { final java . lang . String patchFilePath = xenServer56SP2Resource . getPatchFilePath ( ) ; final java . lang . String patch = "scripts/vm/hypervisor/xenserver/xenserver56fp1/patch" ; "<AssertPlaceHolder>" ; } getPatchFilePath ( ) { return "scripts/vm/hypervisor/xenserver/xenserver60/patch" ; } | org . junit . Assert . assertEquals ( patch , patchFilePath ) |
initialState ( ) { book . twju . chapter_2 . Timeline timeline = book . twju . chapter_2 . Listing_3_DelegateSetup_TimelineTest . createTimeline ( ) ; "<AssertPlaceHolder>" ; } getFetchCount ( ) { return fetchCount ; } | org . junit . Assert . assertTrue ( ( ( timeline . getFetchCount ( ) ) > 0 ) ) |
testXCodeContextWithEmptyProjectName ( ) { java . util . HashMap < java . lang . String , java . lang . String > managedOptions = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; managedOptions . put ( Options . ManagedOption . PROJECT . getOptionName ( ) , "" ) ; com . sap . prd . mobile... | org . junit . Assert . assertEquals ( Options . ManagedOption . PROJECT , ex . getViolated ( ) ) |
cantZoomOutIfMinValue ( ) { pipe . actions . gui . ZoomManager zoomUI = new pipe . actions . gui . ZoomUI ( pipe . views . ZoomUITest . MIN_ZOOM , pipe . views . ZoomUITest . ZOOM_INCREMENT , pipe . views . ZoomUITest . MAX_ZOOM , pipe . views . ZoomUITest . MIN_ZOOM , null ) ; "<AssertPlaceHolder>" ; } canZoomOut ( ) ... | org . junit . Assert . assertFalse ( zoomUI . canZoomOut ( ) ) |
testNotMissingReference ( ) { com . liferay . portal . kernel . xml . Element bookmarksEntryElement = _portletDataContext . getExportDataElement ( _bookmarksEntry ) ; _portletDataContext . addReferenceElement ( _bookmarksEntry , bookmarksEntryElement , _bookmarksFolder , PortletDataContext . REFERENCE_TYPE_PARENT , fal... | org . junit . Assert . assertEquals ( missingReferenceElements . toString ( ) , 0 , missingReferenceElements . size ( ) ) |
testBetween ( ) { com . j256 . ormlite . stmt . Where < com . j256 . ormlite . stmt . Foo , java . lang . String > where = new com . j256 . ormlite . stmt . Where < com . j256 . ormlite . stmt . Foo , java . lang . String > ( createTableInfo ( ) , null , databaseType ) ; int low = 1 ; int high = 1 ; where . between ( F... | org . junit . Assert . assertEquals ( sb . toString ( ) , whereSb . toString ( ) ) |
testProcessorWorkerCountWithMultipleSegmentsWithOneThread ( ) { tokenStore . storeToken ( new org . axonframework . eventhandling . GlobalSequenceTrackingToken ( 1L ) , "test" , 0 ) ; tokenStore . storeToken ( new org . axonframework . eventhandling . GlobalSequenceTrackingToken ( 2L ) , "test" , 1 ) ; configureProcess... | org . junit . Assert . assertThat ( testSubject . activeProcessorThreads ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testIsNotRevealedWhenPartiallyOutOfRightBottomEdge ( ) { org . eclipse . swt . graphics . Point origin = new org . eclipse . swt . graphics . Point ( 0 , 0 ) ; org . eclipse . swt . graphics . Rectangle clientArea = createRectangle ( 0 , 0 , 100 , 100 ) ; org . eclipse . swt . graphics . Rectangle controlBounds = creat... | org . junit . Assert . assertFalse ( isRevealed ) |
testGrowing ( ) { final int maxSize = com . carrotsearch . randomizedtesting . RandomizedTest . between ( 10 , 20 ) ; final org . neo4j . graphalgo . core . utils . queue . IntPriorityQueue queue = org . neo4j . graphalgo . core . utils . queue . IntPriorityQueue . min ( 1 ) ; for ( int i = 0 ; i < maxSize ; i ++ ) { q... | org . junit . Assert . assertEquals ( queue . size ( ) , maxSize ) |
testGetWrappedInputStream ( ) { org . apache . hadoop . fs . Path src = getTestRootPath ( fSys , "test/hadoop/file" ) ; createFile ( src ) ; org . apache . hadoop . fs . FSDataInputStream in = fSys . open ( src ) ; java . io . InputStream is = in . getWrappedStream ( ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close... | org . junit . Assert . assertNotNull ( is ) |
testGetCountOfCommentsByTopic ( ) { int count = mockCommentServiceImpl . getCountOfCommentsByTopic ( ModuleHelper . attachType , ModuleHelper . attachId ) ; verify ( mockCommentMapper ) . countByExample ( argThat ( new com . onboard . test . exampleutils . ExampleMatcher < com . onboard . domain . mapper . model . Comm... | org . junit . Assert . assertEquals ( count , ModuleHelper . count ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.