input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testDistanceOfEqualChromosomes ( ) { org . evosuite . ga . metaheuristics . SPEA2 < org . evosuite . ga . Chromosome > algorithm = new org . evosuite . ga . metaheuristics . SPEA2 < org . evosuite . ga . Chromosome > ( null ) ; org . evosuite . coverage . branch . BranchCoverageSuiteFitness branch = new org . evosuite ... | org . junit . Assert . assertEquals ( 0.0 , algorithm . distanceBetweenObjectives ( t1 , t2 ) , 0.0 ) |
testNothing ( ) { org . jboss . msc . service . ServiceController < ? > serviceController = this . registry . getService ( org . jboss . msc . service . ServiceName . parse ( "jboss.security.security-management" ) ) ; "<AssertPlaceHolder>" ; } parse ( java . net . URL ) { final java . util . List < org . jboss . dmr . ... | org . junit . Assert . assertNotNull ( serviceController ) |
testProperSplashScreenShutdownOnPartClose ( ) { org . uberfire . mvp . PlaceRequest oz = new org . uberfire . mvp . impl . DefaultPlaceRequest ( "oz" ) ; org . uberfire . client . workbench . panels . impl . WorkbenchScreenActivity ozActivity = mock ( org . uberfire . client . workbench . panels . impl . WorkbenchScree... | org . junit . Assert . assertTrue ( placeManager . getActiveSplashScreens ( ) . isEmpty ( ) ) |
readAtLeastOne ( ) { final org . graylog2 . shared . journal . Journal journal = new org . graylog2 . shared . journal . KafkaJournal ( journalDirectory . toPath ( ) , scheduler , com . github . joschi . jadconfig . util . Size . megabytes ( 100L ) , org . joda . time . Duration . standardHours ( 1 ) , com . github . j... | org . junit . Assert . assertEquals ( "message1" , new java . lang . String ( firstMessage . getPayload ( ) , UTF_8 ) ) |
testSampleRowKeys ( ) { java . util . List < com . google . cloud . bigtable . data . v2 . models . KeyOffset > expectedKeyOff = com . google . common . collect . ImmutableList . of ( com . google . cloud . bigtable . data . v2 . models . KeyOffset . create ( com . google . protobuf . ByteString . copyFromUtf8 ( com . ... | org . junit . Assert . assertEquals ( expectedKeyOff , keyOffSets ) |
testUpdateMarketingProductWithEmptyDesc ( ) { org . oscm . internal . vo . VOTechnicalService tp = createTechnicalProduct ( svcProv ) ; org . oscm . internal . vo . VOService product = new org . oscm . internal . vo . VOService ( ) ; product . setDescription ( "" ) ; product . setServiceId ( "modifiedProductWithEmptyDe... | org . junit . Assert . assertEquals ( product . getDescription ( ) , "" ) |
testSetArray ( ) { final org . scijava . util . IntArray array = new org . scijava . util . IntArray ( ) ; final int [ ] raw = new int [ ] { 1 , 2 , 3 , 5 , 8 , 13 , 21 } ; array . setArray ( raw ) ; "<AssertPlaceHolder>" ; } getArray ( ) { return array ; } | org . junit . Assert . assertSame ( raw , array . getArray ( ) ) |
testExactSubjectMatch ( ) { _messageBus . subscribe ( "Host" , new com . cloud . framework . messagebus . MessageSubscriber ( ) { @ com . cloud . messagebus . Override public void onPublishMessage ( final java . lang . String senderAddress , final java . lang . String subject , final java . lang . Object args ) { "<Ass... | org . junit . Assert . assertEquals ( subject , "Host" ) |
parseGpRmcTest ( ) { java . lang . String line = "$GPRMC,101134,A,5153.5205,N,00125.2184,E,003.1,194.1,010313,0,E*68" ; dk . dma . epd . common . prototype . sensor . nmea . RmcSentence sentence = new dk . dma . epd . common . prototype . sensor . nmea . RmcSentence . GpRmcSentence ( ) ; "<AssertPlaceHolder>" ; } parse... | org . junit . Assert . assertEquals ( sentence . parse ( line ) , 0 ) |
testGetSchemaWithValidEncoding ( ) { final org . apache . nifi . schema . access . SchemaAccessStrategy schemaAccessStrategy = new org . apache . nifi . schema . access . HortonworksEncodedSchemaReferenceStrategy ( schemaRegistry ) ; final int protocol = 1 ; final long schemaId = 123456 ; final int version = 2 ; try ( ... | org . junit . Assert . assertNotNull ( retrievedSchema ) |
testConceptNameFailoverToDefaultClient ( ) { org . openmrs . Concept concept = new org . openmrs . Concept ( ) ; org . openmrs . ConceptName en = makePreferred ( "name<sp>en" , ClientConceptNamer . DEFAULT ) ; org . openmrs . ConceptName enClient = makePreferred ( "name<sp>en<sp>client" , ClientConceptNamer . DEFAULT_C... | org . junit . Assert . assertEquals ( "name<sp>en<sp>client" , name ) |
deflateAndBase64Encode_emptyInput ( ) { java . lang . String encodedString = encodingUtils . encodeForRedirectBinding ( "" ) ; "<AssertPlaceHolder>" ; } encodeForRedirectBinding ( java . lang . String ) { byte [ ] deflatedInput = deflate ( input ) ; java . lang . String base64String = new java . lang . String ( org . a... | org . junit . Assert . assertEquals ( "" , encodedString ) |
testIndexer_Morphline_With_DryRun ( ) { writeHBaseRecord ( "--zk-host" 5 , com . google . common . collect . ImmutableMap . of ( "firstname" , "--morphline-id" 0 , "--zk-host" 4 , "Doe" ) ) ; indexerToolConf . set ( "--zk-host" 2 , "forcedBaz" ) ; indexerToolConf . set ( "--zk-host" 3 , "myBar" ) ; java . io . File ind... | org . junit . Assert . assertEquals ( 0 , executeSolrQuery ( "--morphline-id" 1 ) . size ( ) ) |
testMaxFeatures ( ) { org . geotools . data . Query query = new org . geotools . data . Query ( "Record" ) ; query . setMaxFeatures ( 2 ) ; org . geotools . feature . FeatureCollection records = store . getRecords ( query , Transaction . AUTO_COMMIT ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( featureCache ) != null... | org . junit . Assert . assertEquals ( 2 , records . size ( ) ) |
testCreateLogicalRouterv6Template ( ) { template = "/VM_files/createStaticRoutev6.vm" ; java . util . Map < java . lang . String , java . lang . Object > extraParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; extraParams . put ( "disabledState" , EnabledState . DISABLED . toString... | org . junit . Assert . assertEquals ( org . opennaas . core . resources . helpers . XmlHelper . formatXML ( expected ) , org . opennaas . core . resources . helpers . XmlHelper . formatXML ( message ) ) |
testSerialization ( ) { org . jfree . chart . renderer . category . LevelRenderer r1 = new org . jfree . chart . renderer . category . LevelRenderer ( ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ;... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testCites ( ) { java . lang . String citesString = "164\n" + ( ( ( ( ( ( ( "ABILITY\tGPQ\tPREPROD\tQFJ\tSEX\tCITES\tPUBS\n" + ".29\t.25\t.34\t.37\t.13\t1.0\n" 0 ) + ".29\t.25\t.34\t.37\t.13\t1.0\n" 4 ) + ".25\t.09\t1.0\n" ) + ".29\t.25\t.34\t.37\t.13\t1.0\n" 5 ) + "-.10\t.00\t.03\t.10\t1.0\n" ) + ".29\t.25\t.34\t.37\t.... | org . junit . Assert . assertEquals ( pattern , _true ) |
testRequestStatusShouldBeFailedAfterError ( ) { com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription desc1 = com . vmware . admiral . request . util . TestRequestStateFactory . createContainerDescription ( "name1" ) ; com . vmware . admiral . compute . container . ContainerD... | org . junit . Assert . assertTrue ( com . vmware . xenon . common . TaskState . isFailed ( finalStatus . taskInfo ) ) |
testGetProjectFromIndexPatternWhenUserCreated ( ) { "<AssertPlaceHolder>" ; } getProjectFromIndexPattern ( java . lang . String ) { if ( org . apache . commons . lang . StringUtils . isEmpty ( index ) ) { return io . fabric8 . elasticsearch . plugin . model . Project . EMPTY ; } java . util . regex . Matcher matcher = ... | org . junit . Assert . assertEquals ( new io . fabric8 . elasticsearch . plugin . model . Project ( "foo" , null ) , utils . getProjectFromIndexPattern ( "foo" ) ) |
scanIndexForwardFalseTest ( ) { createTable ( hashRangeTableName , createStringAttributeDefinition ( "hashCode" ) , createStringAttributeDefinition ( "rangeCode" ) ) ; { com . michelboudreau . testv2 . TestClassWithHashRangeKey c = new com . michelboudreau . testv2 . TestClassWithHashRangeKey ( ) ; c . setHashCode ( "c... | org . junit . Assert . assertEquals ( "second" , res . getStringData ( ) ) |
testRead ( ) { final java . util . Set < java . lang . String > fields = com . yahoo . ycsb . db . elasticsearch5 . ElasticsearchIntegTestBase . MOCK_DATA . keySet ( ) ; final java . util . HashMap < java . lang . String , com . yahoo . ycsb . ByteIterator > resultParam = new java . util . HashMap ( 10 ) ; final com . ... | org . junit . Assert . assertEquals ( Status . OK , result ) |
testZeroRequestWitKeyWithoutSemiColon ( ) { org . apache . pig . data . Tuple input = tupleFactory . newTuple ( 2 ) ; input . set ( 0 , "http://en.m.wikipedia.org/wiki/The_Slave_Hunters" ) ; input . set ( 1 , "zero=420-01" ) ; org . wikimedia . analytics . kraken . pig . ZeroFilterFunc zero = new org . wikimedia . anal... | org . junit . Assert . assertTrue ( zero . exec ( input ) ) |
testMemFactor ( ) { double expectedMemFactor = 1024.0 * 1024.0 ; double actualMemFactor = com . github . aureliano . evtbridge . core . profile . ProfileConstants . MEM_FACTOR ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expectedMemFactor , actualMemFactor , 0 ) |
multibyteCharacters ( ) { java . lang . String json = "{\"value\":\"這或是因\"}" ; java . util . Map < java . lang . String , java . lang . Object > obj = ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( org . glassfish . admingui . common . util . JSONUtil . jsonToJava ( json ) ) ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( "" , obj . get ( "value" ) ) |
testGetFullName_with_valid_input ( ) { instance = new com . captaindebug . name . Name ( "John" , "Stephen" , "Smith" ) ; final java . lang . String expected = "John<sp>Stephen<sp>Smith" ; java . lang . String result = instance . getFullName ( ) ; "<AssertPlaceHolder>" ; } getFullName ( ) { if ( ( ( isValidString ( fir... | org . junit . Assert . assertEquals ( expected , result ) |
testCancelCheckout2 ( ) { org . apache . chemistry . opencmis . commons . data . ObjectData ob = getObjectByPath ( "/testfolder1/testfile2" ) ; java . lang . String id = ob . getId ( ) ; org . apache . chemistry . opencmis . commons . data . Properties props = createProperties ( "dc:title" , "newtitle" ) ; byte [ ] byt... | org . junit . Assert . assertEquals ( id , ob . getId ( ) ) |
tryExtractFromMapNoMetadataSucceed ( ) { java . lang . Object metadata = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( "key1" , "value1" ) ; put ( "key2" , "value2" ) ; } } ; com . microsoft . azure . sdk . iot . deps . twin . TwinMetadata twinMetadata = mockit . Deencapsulatio... | org . junit . Assert . assertNull ( twinMetadata ) |
insert ( ) { com . dexcoder . test . model . User user = new com . dexcoder . test . model . User ( ) ; user . setLoginName ( "selfly_12" ) ; user . setPassword ( "123456" ) ; user . setEmail ( "javaer@live.com" ) ; user . setUserAge ( 18 ) ; user . setUserType ( "1" ) ; user . setGmtCreate ( new java . util . Date ( )... | org . junit . Assert . assertNotNull ( id ) |
validTrueBoolean ( ) { boolean result = org . kaazing . gateway . util . Utils . parseBoolean ( "bushells" , "true" , false ) ; "<AssertPlaceHolder>" ; } parseBoolean ( java . lang . String , java . lang . String , boolean ) { boolean result = defaultValue ; if ( value != null ) { boolean valid = true ; result = java .... | org . junit . Assert . assertEquals ( true , result ) |
current_quarter_with_java ( ) { java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . set ( Calendar . MONTH , 3 ) ; int month = cal . get ( Calendar . MONTH ) ; int quarter = 0 ; if ( month <= 3 ) { quarter = 1 ; } else if ( month <= 6 ) { quarter = 2 ; } else if ( month <= 9 ) { quarter = 3 ; ... | org . junit . Assert . assertEquals ( 1 , quarter ) |
testGetMainSchemaFromInputConnector ( ) { org . talend . components . jdbc . tjdbcoutput . TJDBCOutputProperties properties = new org . talend . components . jdbc . tjdbcoutput . TJDBCOutputProperties ( "output" ) ; properties . init ( ) ; org . apache . avro . Schema schema = org . talend . components . jdbc . CommonU... | org . junit . Assert . assertNotNull ( schema ) |
testDefaultWindowCount ( ) { "<AssertPlaceHolder>" ; } getWindowHandles ( ) { return com . google . common . collect . ImmutableList . copyOf ( windows . asStack ( ) ) ; } | org . junit . Assert . assertTrue ( ( ( driver . getWindowHandles ( ) . size ( ) ) >= 1 ) ) |
testCustomSpringMvnPlugin ( ) { com . mangofactory . swagger . configuration . SpringSwaggerConfig springSwaggerConfig = new com . mangofactory . swagger . configuration . SpringSwaggerConfig ( ) ; org . lnu . configuration . converters . CustomSwaggerSpringMvcPlugin unit = new org . lnu . configuration . converters . ... | org . junit . Assert . assertNotNull ( unit ) |
testGroovyVersionSupportsActionFalse ( ) { doReturn ( org . codehaus . gmavenplus . model . Version . parseFromString ( "1.0" ) ) . when ( generateStubsMojo . classWrangler ) . getGroovyVersion ( ) ; "<AssertPlaceHolder>" ; } groovyVersionSupportsAction ( ) { return ( ( classWrangler . getGroovyVersion ( ) ) != null ) ... | org . junit . Assert . assertFalse ( generateStubsMojo . groovyVersionSupportsAction ( ) ) |
testPointInt ( ) { final net . imglib2 . Point p = new net . imglib2 . Point ( 3 ) ; "<AssertPlaceHolder>" ; } numDimensions ( ) { return sourceInterval . numDimensions ( ) ; } | org . junit . Assert . assertEquals ( p . numDimensions ( ) , 3 ) |
keySet_toArray_withSmallTarget ( ) { org . eclipse . collections . impl . map . sorted . immutable . ImmutableTreeMap < java . lang . Integer , java . lang . String > immutableSortedMap = new org . eclipse . collections . impl . map . sorted . immutable . ImmutableTreeMap ( SortedMaps . mutable . of ( 1 , "1" , 2 , "2"... | org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 } , result ) |
parseNoWikiArticles ( ) { java . util . Hashtable < java . lang . String , org . wikireverse . commoncrawl . LinkWritable > links = createResults ( TestHelper . RESULT_1 , TestHelper . WIKI_TEXT_NO_WIKI_ARTICLES ) ; "<AssertPlaceHolder>" ; } createResults ( java . lang . String , java . lang . String ) { org . apache .... | org . junit . Assert . assertEquals ( 0 , links . size ( ) ) |
testUnlimitedQuantity ( ) { consumer . setFact ( org . candlepin . policy . js . quantity . QuantityRulesTest . SOCKET_FACT , "8" ) ; pool . getProduct ( ) . setAttribute ( org . candlepin . policy . js . quantity . QuantityRulesTest . SOCKET_ATTRIBUTE , "2" ) ; pool . setQuantity ( new java . lang . Long ( ( - 1 ) ) )... | org . junit . Assert . assertEquals ( new java . lang . Long ( 4 ) , suggested . getSuggested ( ) ) |
testJoinClauseListAsEmpty ( ) { setUp ( new java . util . ArrayList < org . apache . olingo . odata2 . jpa . processor . api . access . JPAJoinClause > ( ) ) ; org . apache . olingo . odata2 . jpa . processor . core . jpql . JPQLJoinStatementBuilder jpqlJoinStatementBuilder = new org . apache . olingo . odata2 . jpa . ... | org . junit . Assert . assertTrue ( true ) |
testChooseAlternative ( ) { org . apache . cxf . message . Message m = new org . apache . cxf . message . MessageImpl ( ) ; org . apache . cxf . ws . policy . EffectivePolicyImpl epi = new org . apache . cxf . ws . policy . EffectivePolicyImpl ( ) ; org . apache . neethi . Policy policy = new org . apache . neethi . Po... | org . junit . Assert . assertSame ( choice , alternative ) |
testAccessGetServiceWithRights ( ) { net . maritimecloud . identityregistry . model . database . entities . Service service = new net . maritimecloud . identityregistry . model . database . entities . Service ( ) ; service . setMrn ( "urn:mrn:mcl:service:instance:dma:nw-nm" ) ; service . setName ( "urn:mrn:mcl:service:... | org . junit . Assert . assertTrue ( false ) |
testIsDiscretionaryProperty ( ) { org . camunda . bpm . engine . impl . cmmn . model . CmmnActivity activity = handler . handleElement ( discretionaryItem , context ) ; java . lang . Boolean discretionary = ( ( java . lang . Boolean ) ( activity . getProperty ( org . camunda . bpm . engine . test . cmmn . handler . PRO... | org . junit . Assert . assertTrue ( discretionary ) |
test04 ( ) { javax . sql . DataSource ds = DatasourceConfig . DATA_SOURCES . get ( "-" 3 ) ; com . alibaba . otter . canal . client . adapter . es . test . sync . Common . sqlExe ( ds , "delete<sp>from<sp>role<sp>where<sp>id=1" ) ; com . alibaba . otter . canal . client . adapter . support . Dml dml = new com . alibaba... | org . junit . Assert . assertNull ( response . getSource ( ) . get ( "-" 0 ) ) |
testMBeanInterfaceCompatibility ( ) { java . util . Set < java . lang . String > expected = getDeclaredMethods ( org . jacoco . agent . rt . IAgent . class ) ; java . util . Set < java . lang . String > actual = getDeclaredMethods ( MBeanClient . IProxy . class ) ; "<AssertPlaceHolder>" ; } getDeclaredMethods ( java . ... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetRecordEngineWhenRecordEngineIsNotNull ( ) { final org . kie . workbench . common . dmn . client . editors . common . persistence . RecordEngine < org . kie . workbench . common . dmn . client . editors . common . persistence . ActiveRecordTest . Data > expectedRecordEngine = makeRecordEngine ( ) ; final org . ki... | org . junit . Assert . assertEquals ( expectedRecordEngine , actualRecordEngine ) |
testArrayPython3 ( ) { short [ ] testi = new short [ ] { 1 , 2 , 3 } ; short [ ] arrayi = ( ( short [ ] ) ( U ( "carray\n_array_reconstructor\nq | org . junit . Assert . assertArrayEquals ( testi , arrayi ) |
testSubstitute3 ( ) { cc . redberry . rings . IntegersZp domain = new cc . redberry . rings . IntegersZp ( 1321349 ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomial . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > poly = parse ( "7*a*b^3*c^5*d^5*e^4<sp>+<sp>2*a^2*c^2*d^3*e^4" ... | org . junit . Assert . assertEquals ( expected , poly . shift ( 2 , 2 ) ) |
testVarByteBuffer ( ) { com . questdb . store . MemoryFile df1 = new com . questdb . store . MemoryFile ( dataFile , 12 , JournalMode . APPEND , false ) ; com . questdb . store . MemoryFile idxFile1 = new com . questdb . store . MemoryFile ( indexFile , 12 , JournalMode . APPEND , false ) ; final com . questdb . std . ... | org . junit . Assert . assertEquals ( s , actual ) |
txnId_1 ( ) { org . apache . jena . dboe . transaction . txn . TxnId id1 = org . apache . jena . dboe . transaction . txn . TxnIdFactory . createSimple ( ) ; "<AssertPlaceHolder>" ; } createSimple ( ) { return org . apache . jena . dboe . transaction . txn . TxnIdFactory . txnIdGenSimple . generate ( ) ; } | org . junit . Assert . assertNotNull ( id1 ) |
invokeAllPropagatesExceptionWithTimeout ( ) { int numTasks = 5 ; final java . util . concurrent . atomic . AtomicInteger id = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . List < java . util . concurrent . Callable < java . lang . Void > > tasks = new java . util . ArrayList ( ) ; final java... | org . junit . Assert . assertSame ( testException , e . getCause ( ) ) |
shouldReturnBoundaryForPercent ( ) { 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 . Character . isUppe... | org . junit . Assert . assertEquals ( EntityNameCharType . BOUNDARY , type ) |
testHTTPMethodEnumStaticAccess ( ) { for ( com . digi . xbee . api . models . HTTPMethodEnum httpMethodEnum : httpMethodValues ) { "<AssertPlaceHolder>" ; } } get ( int ) { return com . digi . xbee . api . models . HTTPMethodEnum . lookupTable . get ( value ) ; } | org . junit . Assert . assertEquals ( httpMethodEnum , com . digi . xbee . api . models . HTTPMethodEnum . get ( httpMethodEnum . getValue ( ) ) ) |
testCreateWithNewIdCreatesANewIdentifier ( ) { final org . jsoar . kernel . symbols . Symbol s = org . jsoar . kernel . symbols . Symbols . create ( syms , Symbols . NEW_ID ) ; "<AssertPlaceHolder>" ; } asIdentifier ( ) { return null ; } | org . junit . Assert . assertNotNull ( s . asIdentifier ( ) ) |
testDubiousRegionGetsExcludedBecauseOfSV ( ) { final com . hartwig . hmftools . common . purple . region . FittedRegion somaticLeft = com . hartwig . hmftools . common . purple . copynumber . ExtendDiploidTest . createValidSomatic ( 1 , 10000 , 3.0 , 50 , SegmentSupport . BND ) ; final com . hartwig . hmftools . common... | org . junit . Assert . assertEquals ( 3 , result . size ( ) ) |
testShouldFindExistingMandatorySavingsAccountsForGroupsWithCompleteGroupStatusWhenCenterIsTopOfCustomerHierarchy ( ) { savingsProduct = new org . mifos . domain . builders . SavingsProductBuilder ( ) . mandatory ( ) . appliesToGroupsOnly ( ) . buildForIntegrationTests ( ) ; savingsAccount = new org . mifos . domain . b... | org . junit . Assert . assertThat ( mandatorySavingAccounts . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
sendAndReceiveWithContext ( ) { int numThreads = 5 ; int numMessages = 10 ; launcher . start ( numThreads , numMessages ) ; int receivedMessages = 0 ; try ( javax . jms . JMSContext context = factory . createContext ( ) ) { javax . jms . JMSConsumer consumer = context . createConsumer ( queue ) ; javax . jms . Message ... | org . junit . Assert . assertEquals ( ( numThreads * numMessages ) , receivedMessages ) |
testGravesLSTMForwardPassHelper ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; int nIn = 10 ; int layerSize = 15 ; int miniBatchSize = 4 ; int timeSeriesLength = 7 ; org . deeplearning4j . nn . conf . NeuralNetConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfigu... | org . junit . Assert . assertTrue ( sliceFalse . equals ( sliceTrue ) ) |
duplicateFirmwaresHashWithoutRestrictions ( ) { java . lang . String changelog = "changelog" ; java . lang . String description = "model" 0 ; java . lang . String model = "model" ; boolean modelRestricted = true ; java . net . URL onlineChangelog = new java . net . URL ( "https://secure.com/changelog" ) ; java . lang .... | org . junit . Assert . assertThat ( firmware1 . hashCode ( ) , org . hamcrest . CoreMatchers . is ( firmware2 . hashCode ( ) ) ) |
writableColumnsShouldBeInValueMap_shouldReturnTrue ( ) { com . vaadin . v7 . data . util . sqlcontainer . ColumnProperty property = new com . vaadin . v7 . data . util . sqlcontainer . ColumnProperty ( "NAME" , false , true , true , false , "Ville" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } isPersiste... | org . junit . Assert . assertTrue ( property . isPersistent ( ) ) |
getReportingUnitsShouldReturnInch ( ) { target . rawResponseListener ( "$13=1" ) ; "<AssertPlaceHolder>" ; } getReportingUnits ( ) { if ( isReportingUnits ( ) ) { if ( "0" . equals ( value ) ) { return UnitUtils . Units . MM ; } else if ( "1" . equals ( value ) ) { return UnitUtils . Units . INCH ; } } return UnitUtils... | org . junit . Assert . assertEquals ( UnitUtils . Units . INCH , target . getReportingUnits ( ) ) |
isSearchAvailable_NoUser ( ) { doReturn ( null ) . when ( bean ) . getUserFromSessionWithoutException ( ) ; config . setRestricted ( true ) ; boolean rc = bean . isSearchAvailable ( ) ; "<AssertPlaceHolder>" ; } isSearchAvailable ( ) { boolean isRestricted = getConfig ( ) . isRestricted ( ) ; if ( ! isRestricted ) { re... | org . junit . Assert . assertTrue ( rc ) |
testGetUriWithDocIdStringValidObjectId ( ) { org . restheart . handlers . RequestContext context = prepareRequestContext ( ) ; java . lang . String expResult = "/dbName/collName/54d13711c2e692941728e1d3?id_type=STRING" ; java . lang . String result ; try { result = org . restheart . utils . URLUtils . getUriWithDocId (... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetMessage ( ) { com . dianping . swallow . common . internal . message . SwallowMessage expectedMessage = com . dianping . swallow . common . internal . dao . impl . mongodb . MessageDAOImplTest . createMessage ( ) ; expectedMessage . setContent ( "content<sp>in<sp>testGetMessage" ) ; messageDAO . saveMessage ( co... | org . junit . Assert . assertTrue ( expectedMessage . equalsWithoutMessageId ( actualMessage ) ) |
validIntegerGreaterThanShouldNotCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createGreaterThanDefinition ( ToscaTypes . INTEGER . toString ( ) , 10L , "20" ) , alien4clou... | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
givenEmptyBoard_whenLevel1VsLevel3_thenLevel3WinsOrDraw ( ) { com . baeldung . algorithms . mcts . tictactoe . Board board = new com . baeldung . algorithms . mcts . tictactoe . Board ( ) ; com . baeldung . algorithms . mcts . montecarlo . MonteCarloTreeSearch mcts1 = new com . baeldung . algorithms . mcts . montecarlo... | org . junit . Assert . assertTrue ( ( ( winStatus == ( com . baeldung . algorithms . mcts . tictactoe . Board . DRAW ) ) || ( winStatus == ( com . baeldung . algorithms . mcts . tictactoe . Board . P1 ) ) ) ) |
testSetup ( ) { final org . jbpm . workbench . wi . dd . model . DeploymentDescriptorModel model = new org . jbpm . workbench . wi . dd . model . DeploymentDescriptorModel ( ) ; presenter . setup ( model ) ; "<AssertPlaceHolder>" ; verify ( remoteableClassListPresenter ) . setup ( any ( ) , any ( ) , any ( ) ) ; } getR... | org . junit . Assert . assertNotNull ( model . getRemotableClasses ( ) ) |
testHstackConcatSimple ( ) { int rows = 10 ; org . nd4j . linalg . api . ndarray . INDArray [ ] arr = new org . nd4j . linalg . api . ndarray . INDArray [ 5 ] ; for ( int i = 0 ; i < ( arr . length ) ; i ++ ) { arr [ i ] = org . nd4j . linalg . factory . Nd4j . linspace ( ( i * rows ) , ( ( ( i + 1 ) * rows ) - 1 ) , r... | org . junit . Assert . assertEquals ( expected , actual ) |
getComputationDurationForDate_shouldReturnZeroIfNoneMatched ( ) { long milliseconds = logEntryDAO . getComputationDurationForDate ( org . easyrec . store . dao . plugin . impl . LogEntryDAOMysqlImplTest . date ( "2011-02-24<sp>00:00:01" ) ) ; "<AssertPlaceHolder>" ; } date ( java . lang . String ) { try { return org . ... | org . junit . Assert . assertThat ( milliseconds , is ( 0L ) ) |
shouldNotAutomaticallyPropagateToSetMembersIfExcludingOrderSet ( ) { executeDataSet ( org . openmrs . api . OrderSetServiceTest . ORDER_SET ) ; java . util . List < org . openmrs . OrderSet > orderSets = orderSetService . getOrderSets ( false ) ; java . lang . Integer numberOfOrderSetMembers = 0 ; for ( org . openmrs .... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 4 ) , numberOfOrderSetMembers ) |
shouldReturnUndoContentsOfFile ( ) { java . io . File file = createTemporaryFileWithContent ( ( "Hello\n" + ( ( "There!\n" + "--//@UNDO\n" ) + "This<sp>is<sp>after<sp>the<sp>undo<sp>marker!\n" ) ) ) ; com . dbdeploy . scripts . ChangeScript changeScript = new com . dbdeploy . scripts . ChangeScript ( 5 , file , "UTF-8"... | org . junit . Assert . assertThat ( changeScript . getUndoContent ( ) , is ( "This<sp>is<sp>after<sp>the<sp>undo<sp>marker!\n" ) ) |
shouldMarkTransitionFromSuperadminToAnyAsInvalid ( ) { stubSecurityContextWithAuthentication ( ) ; stubRoleTransition ( com . qcadoo . security . internal . validators . ROLE_SUPERADMIN , "99anyOtherRole" ) ; final boolean isValid = userRoleValidationService . checkUserCreatingSuperadmin ( userDataDefMock , userEntityM... | org . junit . Assert . assertFalse ( isValid ) |
testEqualsIgnoreCase1 ( ) { final java . lang . String a = "FOO" ; "<AssertPlaceHolder>" ; } equalsIgnoreCase ( java . lang . String , java . lang . String ) { if ( a == b ) return true ; if ( ( a . length ( ) ) != ( b . length ( ) ) ) return false ; for ( int i = 0 ; i < ( a . length ( ) ) ; i ++ ) { if ( ( org . ecli... | org . junit . Assert . assertTrue ( org . eclipse . jgit . util . StringUtils . equalsIgnoreCase ( a , a ) ) |
testSocketReadEof ( ) { final java . lang . String TEST_PATH = new java . io . File ( org . apache . hadoop . net . unix . TestDomainSocket . sockDir . getDir ( ) , "testSocketReadEof" ) . getAbsolutePath ( ) ; final org . apache . hadoop . net . unix . DomainSocket serv = org . apache . hadoop . net . unix . DomainSoc... | org . junit . Assert . assertEquals ( ( - 1 ) , conn . getInputStream ( ) . read ( ) ) |
getHumanTaskInstances ( ) { final org . bonitasoft . engine . bpm . process . DesignProcessDefinition designProcessDef1 = org . bonitasoft . engine . test . BuildTestUtil . buildProcessDefinitionWithHumanAndAutomaticSteps ( java . util . Arrays . asList ( "initTask1" ) , java . util . Arrays . asList ( true ) ) ; final... | org . junit . Assert . assertEquals ( 1 , taskInstances . size ( ) ) |
isImageRendered_KeySet ( ) { user . getVOUserDetails ( ) . setKey ( 1234 ) ; "<AssertPlaceHolder>" ; } isImageRendered ( ) { return ! ( isCheckBoxRendered ( ) ) ; } | org . junit . Assert . assertTrue ( user . isImageRendered ( ) ) |
shouldInstrumentBranch ( ) { java . lang . String source = "var<sp>x<sp>=<sp>x<sp>||<sp>7;" ; sourceProcessor = new jscover . instrument . SourceProcessor ( config , "test.js" , source ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$... | org . junit . Assert . assertEquals ( expectedSource , instrumentedSource ) |
testOauth2ClientClientIdDeleteHandler ( ) { final com . networknt . client . Http2Client client = com . networknt . client . Http2Client . getInstance ( ) ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; final io . undertow . client . ClientConnection conne... | org . junit . Assert . assertEquals ( 200 , statusCode ) |
testGetCriterionTypes ( ) { int previous = criterionTypeDAO . list ( org . libreplan . business . resources . entities . CriterionType . class ) . size ( ) ; org . libreplan . business . resources . entities . CriterionType criterion1 = org . libreplan . business . test . resources . daos . CriterionTypeDAOTest . creat... | org . junit . Assert . assertEquals ( ( previous + 2 ) , list . size ( ) ) |
maakOfCriteria ( ) { nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriterium = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Element . PERSOON_ADRES_HUISNUMMER ) , nl . bzk . algemeenbrp . dal . domein . brp . enums . Zoekoptie . EXACT , 3 ) ; nl . bzk . brp . domain . algemeen... | org . junit . Assert . assertEquals ( 3 , metaInformatieZoekCriterium . getZoekCriteriaOrClauses ( ) . size ( ) ) |
testNotBlankMsgBlankStringShouldThrow ( ) { final java . lang . String string = "<sp>\n<sp>\t<sp>\r<sp>\n<sp>" ; try { org . apache . commons . lang3 . Validate . notBlank ( string , "Message" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( final java . lang . IllegalArgumentExce... | org . junit . Assert . assertEquals ( "Message" , e . getMessage ( ) ) |
testSendInsightMessageDoesNotAppearInS3 ( ) { net . sf . json . JSONObject imgPayload = com . streamreduce . test . service . TestUtils . createValidSampleIMGPayload ( ) ; com . streamreduce . core . model . Connection testIMGConnection = com . streamreduce . test . service . TestUtils . createIMGConnectionWithSpecific... | org . junit . Assert . assertEquals ( 0 , payloads . size ( ) ) |
testShouldFireSyncEvent ( ) { java . util . concurrent . atomic . AtomicInteger counter = com . liferay . document . library . app . service . test . DLAppServiceTestUtil . registerDLSyncEventProcessorMessageListener ( DLSyncConstants . EVENT_UPDATE ) ; com . liferay . portal . kernel . repository . model . FileEntry f... | org . junit . Assert . assertEquals ( 1 , counter . get ( ) ) |
testGetParametersWithDisabledSecurity ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long adminUnitId = 1L ; org . lnu . is . domain . admin . unit . AdminUnit adminUnit = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; adminUnit . setId ( adminUnitId ) ; java . lang . Long... | org . junit . Assert . assertEquals ( expected , actual ) |
testMergeFilteredMapsWithNoMapsAtAll ( ) { java . util . Map < java . lang . String , java . lang . String > filteredMap = systemUnderTest . mergeFilteredMaps ( null , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( filteredMap ) |
testConfigureDefaultClassFound ( ) { java . lang . System . getProperties ( ) . put ( "user.lookup.class.name" , "com.intuit.wasabi.userdirectory.impl.DefaultUserDirectory" ) ; com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( new com . intuit . wasabi . userdirectory . UserDi... | org . junit . Assert . assertNotNull ( userDirectory ) |
testPostfixFunction6 ( ) { java . lang . String expr ; double expected ; double x = 1.565 ; double y = 2.1323 ; expr = "ceil(x)<sp>+<sp>1<sp>/<sp>y<sp>*<sp>abs(1.4)" ; expected = ( java . lang . Math . Math . ceil ( x ) ) + ( ( 1 / y ) * ( java . lang . Math . Math . abs ( 1.4 ) ) ) ; net . objecthunter . exp4j . Expre... | org . junit . Assert . assertTrue ( ( expected == ( e . setVariable ( "x" , x ) . setVariable ( "y" , y ) . evaluate ( ) ) ) ) |
testLong ( ) { final long TEST_CASE = 1642146535132L ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 8 ) ; buffer = buffer . order ( ByteOrder . BIG_ENDIAN ) ; buffer . putLong ( TEST_CASE ) ; long readLong = com . nhnent . haste . common . ByteRead . getLong ( buffer . array ( ) , 0 ) ; "<Asser... | org . junit . Assert . assertEquals ( TEST_CASE , readLong ) |
shouldFailWebSocketConnectionWhenServerSendCloseFrameWithPayloadTooLong ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( ... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
testClose ( ) { java . lang . String testFileName = "testClose.csv" ; java . lang . String targetIrodsCollection = org . irods . jargon . core . pub . io . IRODSFileOutputStreamTest . testingPropertiesHelper . buildIRODSCollectionAbsolutePathFromTestProperties ( org . irods . jargon . core . pub . io . IRODSFileOutputS... | org . junit . Assert . assertTrue ( ( ( irodsFile . getFileDescriptor ( ) ) < 0 ) ) |
firstTest ( ) { com . microsoft . azure . management . compute . v2017_09_01 . ComputeTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . compute . v2017_09... | org . junit . Assert . assertNotNull ( group ) |
shouldReturnExpressionParser ( ) { org . springframework . expression . ExpressionParser expressionParser = mock ( org . springframework . expression . ExpressionParser . class ) ; when ( featureExpressionContext . getExpressionParser ( ) ) . thenReturn ( expressionParser ) ; org . springframework . expression . Expres... | org . junit . Assert . assertEquals ( expressionParser , parser ) |
testLargeSequenceInProgress ( ) { long count = 10 ; long loops = 1000 ; long total = count * loops ; java . util . concurrent . atomic . AtomicLong result = new java . util . concurrent . atomic . AtomicLong ( 0 ) ; org . opennms . core . tasks . SequenceTask task = createSequence ( ) ; task . add ( scheduler ( task , ... | org . junit . Assert . assertEquals ( ( ( total * ( total + 1 ) ) / 2 ) , result . get ( ) ) |
test18 ( ) { byte [ ] expected = new byte [ ] { ( ( byte ) ( 0 ) ) } ; java . lang . String str = new java . lang . String ( "" ) ; "<AssertPlaceHolder>" ; } build_null_str ( java . lang . String ) { byte [ ] strByte = str . getBytes ( com . openddal . server . mysql . proto . Proto . CHARSET ) ; int size = ( strByte .... | org . junit . Assert . assertArrayEquals ( expected , com . openddal . server . mysql . proto . Proto . build_null_str ( str ) ) |
testHarsdorf ( ) { java . util . List < com . graphhopper . routing . util . TestAlgoCollector . OneRun > list = new java . util . ArrayList ( ) ; list . add ( new com . graphhopper . routing . util . TestAlgoCollector . OneRun ( 50.004333 , 11.600254 , 50.044449 , 11.543434 , 6952 , 190 ) ) ; runAlgo ( testCollector ,... | org . junit . Assert . assertEquals ( testCollector . toString ( ) , 0 , testCollector . errors . size ( ) ) |
withFourSteps ( ) { "<AssertPlaceHolder>" ; } countWays ( int ) { if ( steps == 0 ) return 1 ; else if ( steps == 1 ) return 1 ; else if ( steps == 2 ) return 2 ; else if ( steps == 3 ) return 4 ; int a = 1 ; int b = 2 ; int c = 4 ; int ways = 0 ; for ( int i = 4 ; i <= steps ; i ++ ) { ways = ( a + b ) + c ; a = b ; b... | org . junit . Assert . assertEquals ( 7 , s . countWays ( 4 ) ) |
listAccessLevelsForwardsCalls ( ) { org . phenotips . data . permissions . EntityPermissionsManager internal = this . mocker . getInstance ( org . phenotips . data . permissions . EntityPermissionsManager . class ) ; java . util . List < org . phenotips . data . permissions . AccessLevel > levels = new java . util . Ar... | org . junit . Assert . assertSame ( levels , returnedLevels ) |
testSetNode ( ) { com . blinkfox . zealot . test . bean . BuildSourceTest . source . setNode ( null ) ; "<AssertPlaceHolder>" ; } getNode ( ) { return node ; } | org . junit . Assert . assertEquals ( null , com . blinkfox . zealot . test . bean . BuildSourceTest . source . getNode ( ) ) |
testBuildPkgNameRootServicePathNoEncoding ( ) { System . out . println ( ( ( ( ( getTestTraceHead ( "[NGSICKANSink.buildPkgName]" ) ) + "--------<sp>When<sp>no<sp>encoding<sp>and<sp>when<sp>using<sp>a<sp>notified/defaulted<sp>root<sp>service<sp>path,<sp>the<sp>pkg<sp>name<sp>is<sp>" ) + "--------<sp>When<sp>no<sp>encod... | org . junit . Assert . assertEquals ( expectedPkgName , builtPkgName ) |
checksUserPropertiesFileReadabilityCorrectly ( ) { com . github . marabou . helper . PathHelper pathHelperMock = mock ( com . github . marabou . helper . PathHelper . class ) ; when ( pathHelperMock . getUserPropertiesFilePath ( ) ) . thenReturn ( "this-file-does-not-exist" ) ; java . io . File f = mock ( java . io . F... | org . junit . Assert . assertTrue ( propertiesHelper . userPropertiesNotReadable ( ) ) |
verwerkenMoetAantalVerzondenAanpassen ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . AfnemersindicatiesBericht bericht = new nl . bzk . migratiebrp . bericht . model . sync . impl . AfnemersindicatiesBericht ( ) ; bericht . setAfnemersindicaties ( new nl . bzk . migratiebrp . conversie . model . l... | org . junit . Assert . assertEquals ( 2 , subject . aantalVerzonden ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.