input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetPackageName_withoutPackage ( ) { java . lang . String packageName = org . eclipse . rap . rwt . internal . lifecycle . LifeCycleAdapterUtil . getPackageName ( "Button" ) ; "<AssertPlaceHolder>" ; } getPackageName ( java . lang . String ) { int index = className . lastIndexOf ( '.' ) ; return index == ( - 1 ) ? "... | org . junit . Assert . assertEquals ( "" , packageName ) |
testSimpleInsertion ( ) { java . lang . String string = "Hello<sp>world!" ; for ( char elem : string . toCharArray ( ) ) { charQueue . put ( elem ) ; } charQueue . flushInputBuffer ( ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; while ( ! ( charQueue . isEmpty ( ) ) ) { sb . append ( charQu... | org . junit . Assert . assertEquals ( string , sb . toString ( ) ) |
defaultConstructor ( ) { com . madgag . android . listviews . ReflectiveHolderFactory < java . lang . String > factory = com . madgag . android . listviews . ReflectiveHolderFactory . reflectiveFactoryFor ( com . madgag . android . listviews . ReflectiveHolderFactoryTest . StaticViewHolder . class , ( ( java . lang . O... | org . junit . Assert . assertNotNull ( holder ) |
testSnippetContent ( ) { org . gitlab4j . api . models . Snippet snippet = createSnippet ( new org . gitlab4j . api . models . Snippet ( org . gitlab4j . api . TestSnippetsApi . TEST_SNIPPET_TITLE_1 , org . gitlab4j . api . TestSnippetsApi . TEST_SNIPPET_FILE_NAME_1 , org . gitlab4j . api . TestSnippetsApi . TEST_SNIPP... | org . junit . Assert . assertEquals ( org . gitlab4j . api . TestSnippetsApi . TEST_SNIPPET_CONTENT_1 , snippetContent ) |
testStringObjectField ( ) { info . smart_tools . smartactors . iobject . ifield . IField field = info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( info . smart_tools . smartactors . iobject . ifield . IField . class . getCanoni... | org . junit . Assert . assertEquals ( "value" , value ) |
testLengthNotImply ( ) { org . uberfire . security . authz . Permission p1 = new org . uberfire . security . impl . authz . DotNamedPermission ( "resource.read.r1" , true ) ; org . uberfire . security . authz . Permission p2 = new org . uberfire . security . impl . authz . DotNamedPermission ( "perspective.read.r2" , t... | org . junit . Assert . assertFalse ( p1 . implies ( p2 ) ) |
testDerivativePipelineAggregation ( ) { com . liferay . portal . search . aggregation . pipeline . DerivativePipelineAggregation derivativePipelineAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . derivative ( "name" , "bucketsPath" ) ; "<AssertPlaceHo... | org . junit . Assert . assertNotNull ( derivativePipelineAggregation ) |
testBatchAll ( ) { com . alibaba . otter . canal . meta . PeriodMixedMetaManager metaManager = new com . alibaba . otter . canal . meta . PeriodMixedMetaManager ( ) ; com . alibaba . otter . canal . meta . ZooKeeperMetaManager zooKeeperMetaManager = new com . alibaba . otter . canal . meta . ZooKeeperMetaManager ( ) ; ... | org . junit . Assert . assertEquals ( 0 , ranges . size ( ) ) |
testShiftOffsetByWhenBetweenBeginningAndEndOffset ( ) { final java . util . Map < org . apache . kafka . common . TopicPartition , java . lang . Long > endOffsets = new java . util . HashMap ( ) ; endOffsets . put ( topicPartition , 4L ) ; consumer . updateEndOffsets ( endOffsets ) ; final java . util . Map < org . apa... | org . junit . Assert . assertEquals ( 2 , records . count ( ) ) |
testCanSerialiseEntity ( ) { final uk . gov . gchq . gaffer . data . element . Entity entity = new uk . gov . gchq . gaffer . data . element . Entity ( uk . gov . gchq . gaffer . commonutil . TestGroups . ENTITY , "testVertex" ) ; final byte [ ] serialisedEntity = serialiser . serialise ( entity ) ; final uk . gov . gc... | org . junit . Assert . assertEquals ( entity , deserialisedEntity ) |
testGetDemographicByMyOscarUserName ( ) { org . oscarehr . common . model . Demographic entity = new org . oscarehr . common . model . Demographic ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; entity . setDemographicNo ( null ) ; entity . setMyOscarUserNa... | org . junit . Assert . assertNotNull ( dao . getDemographicByMyOscarUserName ( "marc" ) ) |
testPerLineParser ( ) { addPerLineDelimiter ( ) ; addSearch ( "text" , "(\\S*)" ) ; addValue ( "entry1" , 1 , "a<sp>line<sp>with<sp>some<sp>argy<sp>and<sp>bargy" 0 ) ; addValue ( "entry2" , 2 , "a<sp>line<sp>with<sp>some<sp>argy<sp>and<sp>bargy" 0 ) ; com . sonalake . utah . config . FileBuilder file = new com . sonala... | org . junit . Assert . assertEquals ( expectedValues , results ) |
workflowShouldBeDisabledByDefault ( ) { boolean enabled = storage . enabled ( com . spotify . styx . storage . DatastoreStorageTest . WORKFLOW_ID1 ) ; "<AssertPlaceHolder>" ; } enabled ( com . spotify . styx . model . WorkflowId ) { return com . spotify . styx . storage . DatastoreStorage . getWorkflowOpt ( datastore ,... | org . junit . Assert . assertFalse ( enabled ) |
hashCodesFromSameAbsolutePath ( ) { com . beijunyi . parallelgit . filesystem . GitPath p1 = gfs . getPath ( "/a/b/c" ) ; com . beijunyi . parallelgit . filesystem . GitPath p2 = gfs . getPath ( "/a/b/c" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( 31 * ( gfs . hashCode ( ) ) ) + ( java . util . Arrays . hashC... | org . junit . Assert . assertEquals ( p1 . hashCode ( ) , p2 . hashCode ( ) ) |
testJmsConnectionIdFromJmsConsumerId ( ) { org . apache . qpid . jms . meta . JmsConnectionId id1 = new org . apache . qpid . jms . meta . JmsConnectionId ( firstId ) ; org . apache . qpid . jms . meta . JmsSessionId sessionId = new org . apache . qpid . jms . meta . JmsSessionId ( id1 , 1 ) ; org . apache . qpid . jms... | org . junit . Assert . assertSame ( id1 . getValue ( ) , id2 . getValue ( ) ) |
shouldBeActiveWhenAnAcceptedParameterWithoutRequiredValueIsPresentAndItHasAValue ( ) { java . util . Map < java . lang . String , java . lang . String [ ] > parameters = new java . util . HashMap ( ) ; parameters . put ( "parameterWithoutValue" , ( ( java . lang . String [ ] ) ( java . util . Arrays . asList ( "anyVal"... | org . junit . Assert . assertTrue ( isActive ) |
contains_shouldReturnFalseIfParameterIsLowerThanLow ( ) { org . openmrs . util . DoubleRange r1 = new org . openmrs . util . DoubleRange ( 1.0 , 1.0 ) ; java . lang . Double d = 0.0 ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { return getSession ( ) . contains ( object ) ; } | org . junit . Assert . assertFalse ( r1 . contains ( d ) ) |
testNotEquals ( ) { org . jaitools . imageutils . ImageLayout2 il1 = new org . jaitools . imageutils . ImageLayout2 ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , null , null ) ; int [ ] z = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 } ; for ( int i = 0 ; i < 8 ; i ++ ) { int oldz = z [ i ] ; z [ i ] = 99 ; org . jaitools . imageu... | org . junit . Assert . assertFalse ( il1 . equals ( il2 ) ) |
writerTest ( ) { java . lang . String serOutFileName = "fixed.out.xml" ; java . lang . String serResultFileName = "fixed.res.xml" ; com . huawei . streaming . api . PhysicalPlan plan = create ( ) ; com . huawei . streaming . cql . LocalTaskCommons . write ( com . huawei . streaming . cql . executor . userdefined . Fixe... | org . junit . Assert . assertTrue ( compareResult ) |
testConstructor ( ) { @ com . j256 . ormlite . table . SuppressWarnings ( "rawtypes" ) java . lang . reflect . Constructor [ ] constructors = com . j256 . ormlite . table . TableUtils . class . getDeclaredConstructors ( ) ; "<AssertPlaceHolder>" ; constructors [ 0 ] . setAccessible ( true ) ; constructors [ 0 ] . newIn... | org . junit . Assert . assertEquals ( 1 , constructors . length ) |
testToKafka ( ) { io . strimzi . operator . user . model . acl . SimpleAclRule strimzi = new io . strimzi . operator . user . model . acl . SimpleAclRule ( io . strimzi . api . kafka . model . AclRuleType . ALLOW , io . strimzi . operator . user . model . acl . SimpleAclRuleTest . resource , "127.0.0.1" , io . strimzi ... | org . junit . Assert . assertEquals ( kafka , strimzi . toKafkaAcl ( io . strimzi . operator . user . model . acl . SimpleAclRuleTest . kafkaPrincipal ) ) |
anySatisfy_executionException ( ) { try { this . classUnderTest ( ) . anySatisfy ( ( each ) -> { throw new java . lang . RuntimeException ( "Execution<sp>exception" ) ; } ) ; } catch ( java . lang . RuntimeException e ) { java . util . concurrent . ExecutionException executionException = ( ( java . util . concurrent . ... | org . junit . Assert . assertEquals ( "Execution<sp>exception" , runtimeException . getMessage ( ) ) |
testSynsetRemoveObjectNull ( ) { net . sf . extjwnl . data . Synset s = new net . sf . extjwnl . data . Synset ( null , POS . NOUN ) ; net . sf . extjwnl . data . IndexWord iw = new net . sf . extjwnl . data . IndexWord ( null , "test" , POS . NOUN , s ) ; iw . getSenses ( ) . remove ( s ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertEquals ( 0 , iw . getSenses ( ) . size ( ) ) |
testMissingClosingBraceOnModify ( ) { final java . lang . String str = "package<sp>org.drools.compiler.test;\n" + ( ( ( ( ( ( "import<sp>org.drools.compiler.*\n" + "rule<sp>R1<sp>when\n" ) + "<sp>$p<sp>:<sp>Person(<sp>)" ) + "<sp>$c<sp>:<sp>Cheese(<sp>)" ) + "then\n" ) + "<sp>modify($p)<sp>{<sp>setCheese($c)<sp>;\n" ) ... | org . junit . Assert . assertTrue ( kbuilder . hasErrors ( ) ) |
testSerialization ( ) { org . jfree . chart . axis . NumberTickUnit t1 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" ) ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOut... | org . junit . Assert . assertEquals ( t1 , t2 ) |
manageActivationProcess_VSERVER_DEACTIVATION_REQUESTED_Running ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_DEACTIVATION_REQUESTED ; org . oscm . app . iaas . data . FlowState newState = null ; doReturn ( VServerStatus . RUNNING ) . when ( vServerProc... | org . junit . Assert . assertNull ( newState ) |
encodesPutWithColumnsCorrectly ( ) { final byte [ ] exp = new byte [ ] { ( ( byte ) ( 131 ) ) , 104 , 4 , 100 , 0 , 8 , 116 , 115 , 112 , 117 , 116 , 114 , 101 , 113 , 109 , 0 , 0 , 0 , 10 , 116 , 101 , 115 , 116 , 95 , 116 , 97 , 98 , 108 , 101 , 108 , 0 , 0 , 0 , 7 , 109 , 0 , 0 , 0 , 1 , 97 , 109 , 0 , 0 , 0 , 1 , 9... | org . junit . Assert . assertArrayEquals ( exp , msg ) |
getObjectWithAttr ( ) { org . json . JSONObject task = index . addObject ( new org . json . JSONObject ( ) . put ( "firstname" , "Jimmie" ) . put ( "lastname" , "Barninger" ) . put ( "followers" , 93 ) . put ( "company" , "California<sp>Paint" ) , "a/go/?" ) ; index . waitTask ( task . getLong ( "taskID" ) ) ; org . js... | org . junit . Assert . assertEquals ( "Barninger" , object . getString ( "lastname" ) ) |
t020_complete ( ) { final java . util . List < dom . todo . ToDoItem > completedItems = wrap ( toDoItems ) . complete ( ) ; "<AssertPlaceHolder>" ; } complete ( ) { java . util . List < dom . todo . ToDoItem > items = doComplete ( ) ; if ( items . isEmpty ( ) ) { getContainer ( ) . informUser ( "No<sp>to-do<sp>items<sp... | org . junit . Assert . assertThat ( completedItems . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
extract_DeleteBeforeUsageStartWithoutRole ( ) { createUsageLicenseHistory ( ModificationType . DELETE , org . oscm . test . DateTimeHandling . calculateDate ( "2013-03-31<sp>23:59:59" ) , org . oscm . billingservice . business . calculation . revenue . UserAssignmentExtractorTest . USER_KEY , org . oscm . billingservic... | org . junit . Assert . assertEquals ( 0 , userKeySet . size ( ) ) |
testUiResponds ( ) { okhttp3 . Request request = new okhttp3 . Request . Builder ( ) . url ( queryUrl ) . get ( ) . build ( ) ; try ( okhttp3 . Response response = okHttpClient . newCall ( request ) . execute ( ) ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertEquals ( 200 , response . code ( ) ) |
testSetLocalValues ( ) { final java . lang . String key1 = "foo" ; final java . lang . String key2 = "bar" ; final java . util . Map < java . lang . String , java . lang . Object > table0 = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; table0 . put ( key1 , 1 ) ; table0 . put ( key2 , ... | org . junit . Assert . assertEquals ( table . get ( name ) , value ) |
testSerialization ( ) { org . jfree . chart . block . EmptyBlock b1 = new org . jfree . chart . block . EmptyBlock ( 1.0 , 2.0 ) ; org . jfree . chart . block . EmptyBlock b2 = ( ( org . jfree . chart . block . EmptyBlock ) ( org . jfree . chart . TestUtilities . serialised ( b1 ) ) ) ; "<AssertPlaceHolder>" ; } serial... | org . junit . Assert . assertEquals ( b1 , b2 ) |
testNotExcludeAddedFile ( ) { instance . addClasses ( java . util . Arrays . asList ( de . unisb . cs . st . javalanche . mutation . javaagent . classFileTransfomer . mutationDecision . ExcludesTest . CLASS_2 ) ) ; "<AssertPlaceHolder>" ; } shouldExclude ( java . lang . String ) { return ( de . unisb . cs . st . javala... | org . junit . Assert . assertFalse ( instance . shouldExclude ( de . unisb . cs . st . javalanche . mutation . javaagent . classFileTransfomer . mutationDecision . ExcludesTest . CLASS_2 ) ) |
testConvertInvalid ( ) { com . box . l10n . mojito . cli . command . AssetMappingConverter assetMappingConverter = new com . box . l10n . mojito . cli . command . AssetMappingConverter ( ) ; java . util . Map < java . lang . String , java . lang . String > convert = assetMappingConverter . convert ( "dsafdsf" ) ; "<Ass... | org . junit . Assert . assertEquals ( 0 , convert . size ( ) ) |
testInvalidExampleMediaTypeValidator ( ) { com . ibm . ws . microprofile . openapi . impl . model . media . EncodingImpl encoding = new com . ibm . ws . microprofile . openapi . impl . model . media . EncodingImpl ( ) ; encoding . setContentType ( "text/plain" ) ; java . util . Map < java . lang . String , org . eclips... | org . junit . Assert . assertEquals ( 1 , validationHelper . getEventsSize ( ) ) |
testSetGetTrainingData ( ) { org . neuroph . core . data . DataSet trainingSet = new org . neuroph . core . data . DataSet ( 0 ) ; testableLearningRule . setTrainingSet ( trainingSet ) ; "<AssertPlaceHolder>" ; } getTrainingSet ( ) { return dataSet ; } | org . junit . Assert . assertEquals ( testableLearningRule . getTrainingSet ( ) , trainingSet ) |
signatureProfileShouldBeSetProperlyForBDocTS ( ) { org . digidoc4j . Signature signature = createBDocSignatureWithProfile ( SignatureProfile . LT ) ; "<AssertPlaceHolder>" ; } getProfile ( ) { return m_profile ; } | org . junit . Assert . assertEquals ( SignatureProfile . LT , signature . getProfile ( ) ) |
testDeleteID ( ) { handler . deleteID ( uuid . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "Flag<sp>[id=" + ( id ) ) + ",<sp>icon=" ) + ( icon ) ) + ",<sp>listener=" ) + ( listener ) ) + ",<sp>type=" ) + ( type ) ) + ",<sp>defaultSetting=" ) + ( setting ) ) + ",<sp>def... | org . junit . Assert . assertTrue ( record . exists ( ) ) |
testIsProjectIdAvailable_emptyString ( ) { projectSelector . setProjects ( com . google . cloud . tools . eclipse . projectselector . ProjectSelectorTest . getUnsortedProjectList ( ) ) ; "<AssertPlaceHolder>" ; } isProjectIdAvailable ( java . lang . String ) { for ( java . lang . Object o : input ) { com . google . clo... | org . junit . Assert . assertFalse ( projectSelector . isProjectIdAvailable ( "" ) ) |
purgeBranchWithSingleRevision ( ) { indexRevision ( com . b2international . index . revision . MAIN , new com . b2international . index . revision . RevisionFixtures . RevisionData ( STORAGE_KEY1 , "field1" , "field2" ) ) ; index ( ) . purge ( com . b2international . index . revision . MAIN , Purge . ALL ) ; "<AssertPl... | org . junit . Assert . assertNotNull ( getRevision ( com . b2international . index . revision . MAIN , com . b2international . index . revision . RevisionFixtures . RevisionData . class , com . b2international . index . revision . STORAGE_KEY1 ) ) |
shouldConnectCreateConnection ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( org . neo4j . driver . v1 . GraphDatabase . class ) ; org . mockito . Mockito . when ( org . neo4j . driver . v1 . GraphDatabase . driver ( org . mockito . Mockito . eq ( org . neo4j . jdbc . bolt . BoltNeo4jDriverTest . B... | org . junit . Assert . assertNotNull ( connection ) |
testGetRootCause ( ) { org . pentaho . platform . api . util . PentahoCheckedChainedException exception = new org . pentaho . platform . api . util . PentahoCheckedChainedExceptionTest . CheckedException ( org . pentaho . platform . api . util . PentahoCheckedChainedExceptionTest . CAUSE ) ; java . lang . Throwable roo... | org . junit . Assert . assertEquals ( org . pentaho . platform . api . util . PentahoCheckedChainedExceptionTest . CAUSE , rootCause ) |
equalsSelf ( ) { com . vaadin . flow . dom . Element e = com . vaadin . flow . dom . ElementFactory . createDiv ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj instanceof com . vaadin . flow . data . provider . DataCommunicatorTest . Item ) { com . vaadin . flow . data . provider . DataCommun... | org . junit . Assert . assertTrue ( e . equals ( e ) ) |
canExecute_normal_sim ( ) { com . asakusafw . runtime . core . context . RuntimeContext context = RuntimeContext . DEFAULT . mode ( ExecutionMode . SIMULATION ) ; "<AssertPlaceHolder>" ; } canExecute ( java . lang . Object ) { if ( object == null ) { throw new java . lang . IllegalArgumentException ( "object<sp>must<sp... | org . junit . Assert . assertThat ( context . canExecute ( new java . lang . Object ( ) ) , is ( false ) ) |
testToByteArray ( ) { byte [ ] in = "Hello<sp>World" . getBytes ( ) ; org . apache . mina . core . buffer . IoBuffer bb = org . apache . mina . core . buffer . IoBuffer . wrap ( in ) ; byte [ ] out = org . apache . camel . component . mina2 . Mina2Converter . toByteArray ( bb ) ; for ( int i = 0 ; i < ( out . length ) ... | org . junit . Assert . assertEquals ( in [ i ] , out [ i ] ) |
hasDomainPermissions_emptyAsAuthenticated ( ) { final com . acciente . oacc . Resource accessorResource = generateUnauthenticatableResource ( ) ; final java . lang . String domainName = generateDomain ( ) ; generateResourceAndAuthenticate ( ) ; grantQueryPermission ( accessControlContext . getSessionResource ( ) , acce... | org . junit . Assert . assertThat ( allDomainPermissions . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
closeShouldWaitAllOperationToFinish ( ) { clientA . acquireShared ( LockTracer . NONE , org . neo4j . kernel . impl . locking . ResourceTypes . NODE , 1L ) ; clientA . acquireShared ( LockTracer . NONE , org . neo4j . kernel . impl . locking . ResourceTypes . NODE , 3L ) ; clientB . acquireShared ( LockTracer . NONE , ... | org . junit . Assert . assertEquals ( 0 , lockCountVisitor . getLockCount ( ) ) |
testRemoveAttribute_removesExistingAttribute ( ) { uiSession . setAttribute ( "name" , new java . lang . Object ( ) ) ; uiSession . removeAttribute ( "name" ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { org . eclipse . rap . rwt . internal . util . ParamCheck . notNull ( name , "name" ) ; return... | org . junit . Assert . assertNull ( uiSession . getAttribute ( "name" ) ) |
testGetDirectAnnotationForMethod ( ) { io . joynr . util . AnnotationUtilTest . DirectAnnotation result = io . joynr . util . AnnotationUtil . getAnnotation ( getMethodWithAnnotation ( ) , io . joynr . util . AnnotationUtilTest . DirectAnnotation . class ) ; "<AssertPlaceHolder>" ; } getMethodWithAnnotation ( ) { retur... | org . junit . Assert . assertNotNull ( result ) |
encryptDecryptString ( ) { final int ptSize = 1000000 ; final java . lang . String plaintextString = com . amazonaws . encryptionsdk . internal . TestIOUtils . generateRandomString ( ptSize ) ; final java . util . Map < java . lang . String , java . lang . String > encryptionContext = new java . util . HashMap < java .... | org . junit . Assert . assertEquals ( plaintextString , decryptedText ) |
test21 ( ) { byte [ ] expected = new byte [ ] { ( ( byte ) ( 97 ) ) , ( ( byte ) ( 98 ) ) , ( ( byte ) ( 99 ) ) } ; java . lang . String str = new java . lang . String ( "abc" ) ; "<AssertPlaceHolder>" ; } build_fixed_str ( long , java . lang . String ) { return com . github . mpjct . jmpjct . mysql . proto . Proto . b... | org . junit . Assert . assertArrayEquals ( expected , com . github . mpjct . jmpjct . mysql . proto . Proto . build_fixed_str ( 3 , str ) ) |
testWFS11Delete ( ) { org . geoserver . wfs . WFSException tmpEx = new org . geoserver . wfs . WFSException ( new org . geoserver . wfs . request . Delete . WFS11 ( deleteElementType1 ) , "test" ) ; "<AssertPlaceHolder>" ; } getLocator ( ) { return locator ; } | org . junit . Assert . assertNull ( tmpEx . getLocator ( ) ) |
testAutomaticallyDelete ( ) { this . hostnameRepository . addEntry ( kieker . test . analysisteetime . HostnameRepositoryTest . EXAMPLE_TRACE_ID , kieker . test . analysisteetime . HostnameRepositoryTest . EXAMPLE_HOSTNAME ) ; this . hostnameRepository . inc ( kieker . test . analysisteetime . HostnameRepositoryTest . ... | org . junit . Assert . assertNull ( hostname ) |
testCompareTo ( ) { com . alicloud . openservices . tablestore . model . PrimaryKey primaryKey = com . alicloud . openservices . tablestore . model . PrimaryKeyBuilder . createPrimaryKeyBuilder ( ) . addPrimaryKeyColumn ( "PK0" , com . alicloud . openservices . tablestore . model . PrimaryKeyValue . fromLong ( 1912 ) )... | org . junit . Assert . assertTrue ( ( ( rowChange . compareTo ( rowChange2 ) ) == 0 ) ) |
testIndentInFrontOfTwoExpr ( ) { java . lang . String templates = ( ( ( "list(a,b)<sp>::=<sp><<" + "<sp><a><b>" ) + ( newline ) ) + "a" 0 ) + ( newline ) ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroupFile ( ( ( ( tmpdir ) + "/" ) + "t.s... | org . junit . Assert . assertEquals ( expecting , t . render ( ) ) |
listUsers ( ) { java . util . List < java . lang . String > users = com . google . common . collect . Lists . newArrayList ( "u1" , "u2" , "u3" ) ; when ( userStore . listUsers ( ) ) . thenReturn ( users ) ; "<AssertPlaceHolder>" ; } listUsers ( ) { java . util . List < java . lang . String > users = com . google . com... | org . junit . Assert . assertEquals ( users , de . blizzy . documentr . web . Functions . listUsers ( ) ) |
getVirtualAidFlag ( ) { "<AssertPlaceHolder>" ; } getVirtualAidFlag ( ) { return fVirtualAidFlag ; } | org . junit . Assert . assertFalse ( msg . getVirtualAidFlag ( ) ) |
testWALRecordReaderActiveArchiveTolerance ( ) { final org . apache . hadoop . hbase . wal . WALFactory walfactory = new org . apache . hadoop . hbase . wal . WALFactory ( org . apache . hadoop . hbase . mapreduce . TestWALRecordReader . conf , org . apache . hadoop . hbase . mapreduce . TestWALRecordReader . getName ( ... | org . junit . Assert . assertEquals ( 1 , splits . size ( ) ) |
testGetForSQLType ( ) { for ( org . geotools . geometry . jts . Geometries type : org . geotools . geometry . jts . Geometries . values ( ) ) { int sqlType = type . getSQLType ( ) ; "<AssertPlaceHolder>" ; } } getForSQLType ( int ) { for ( org . geotools . geometry . jts . Geometries gt : org . geotools . geometry . jt... | org . junit . Assert . assertEquals ( type , org . geotools . geometry . jts . Geometries . getForSQLType ( sqlType ) ) |
testSerializeDeserialize ( ) { io . protostuff . runtime . RuntimeSchema < io . protostuff . runtime . RuntimeSchemaTagTest . A6 > schema = io . protostuff . runtime . RuntimeSchema . createFrom ( io . protostuff . runtime . RuntimeSchemaTagTest . A6 . class ) ; io . protostuff . runtime . RuntimeSchemaTagTest . A6 sou... | org . junit . Assert . assertEquals ( source , newMessage ) |
testImportDirectoryTool ( ) { org . apache . rya . accumulo . mr . merge . CopyToolTest . log . info ( "" ) ; org . apache . rya . accumulo . mr . merge . CopyToolTest . log . info ( "Setting<sp>up<sp>initial<sp>state<sp>of<sp>parent<sp>before<sp>importing<sp>directory<sp>to<sp>child..." ) ; org . apache . rya . accumu... | org . junit . Assert . assertEquals ( 20 , count ) |
testFail ( ) { com . alibaba . dubbo . common . URL url = com . alibaba . dubbo . common . URL . valueOf ( "test://test" ) ; url = url . addParameter ( Constants . INTERFACE_KEY , "com.alibaba.dubbo.rpc.file.TpsService" ) ; url = url . addParameter ( Constants . TPS_LIMIT_RATE_KEY , 5 ) ; com . alibaba . dubbo . rpc . ... | org . junit . Assert . assertTrue ( ( i >= 5 ) ) |
testBuildWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . publicactivity . PublicActivity context = new org . lnu . is . domain . publicactivity . PublicActivity ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PublicActivity<sp... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testUnsubscribeWhileConnClosing ( ) { try ( io . nats . streaming . NatsStreamingTestServer srv = new io . nats . streaming . NatsStreamingTestServer ( io . nats . streaming . SubscribeTests . clusterName , false ) ) { io . nats . streaming . Options opts = new io . nats . streaming . Options . Builder ( ) . natsUrl ( ... | org . junit . Assert . assertNotNull ( sc ) |
deserializeJsonObjectEmpty ( ) { org . spincast . core . json . JsonObject jsonObj = getJsonManager ( ) . fromString ( "{}" ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { if ( contentTypeString == null ) { return null ; } contentTypeString = contentTypeString . toLowerCase ( ) ; for ( org . spincas... | org . junit . Assert . assertNotNull ( jsonObj ) |
testFindTypeFromRequestClass ( ) { for ( org . sagebionetworks . repo . model . dbo . asynch . AsynchJobType t : org . sagebionetworks . repo . model . dbo . asynch . AsynchJobType . values ( ) ) { org . sagebionetworks . repo . model . dbo . asynch . AsynchJobType type = org . sagebionetworks . repo . model . dbo . as... | org . junit . Assert . assertEquals ( t , type ) |
testMultipleTermsPerField ( ) { java . lang . String candidate = "Berlin" ; java . util . List < org . aksw . agdistis . util . Triple > type = index . search ( null , null , candidate ) ; "<AssertPlaceHolder>" ; for ( org . aksw . agdistis . util . Triple t : type ) { log . debug ( t . toString ( ) ) ; } } search ( ja... | org . junit . Assert . assertTrue ( ( ( type . size ( ) ) > 1 ) ) |
testAll ( ) { final java . util . Collection < org . drools . verifier . core . index . select . SelectExactMatcherTest . Item > all = select . all ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , all . size ( ) ) |
dialogShouldBeShow ( ) { com . google . gwt . user . client . rpc . AsyncCallback < org . eclipse . che . security . oauth . OAuthStatus > callback = getCallBack ( ) ; gitHubAuthenticator . authenticate ( null , callback ) ; verify ( view ) . showDialog ( ) ; "<AssertPlaceHolder>" ; } showDialog ( ) { show ( ) ; } | org . junit . Assert . assertThat ( gitHubAuthenticator . callback , org . hamcrest . core . Is . is ( callback ) ) |
testValidateLocalFilePath ( ) { properties . localFilePath . setValue ( "" ) ; testRuntime . initialize ( container , properties ) ; "<AssertPlaceHolder>" ; } validatePutProperties ( org . talend . components . google . drive . put . GoogleDrivePutProperties ) { org . talend . daikon . properties . ValidationResultMuta... | org . junit . Assert . assertEquals ( Result . ERROR , testRuntime . validatePutProperties ( properties ) . getStatus ( ) ) |
testSplitForQueue ( ) { org . apache . beam . sdk . io . jms . JmsIO . Read read = org . apache . beam . sdk . io . jms . JmsIO . read ( ) . withQueue ( org . apache . beam . sdk . io . jms . JmsIOTest . QUEUE ) ; org . apache . beam . sdk . options . PipelineOptions pipelineOptions = org . apache . beam . sdk . option... | org . junit . Assert . assertEquals ( desiredNumSplits , splits . size ( ) ) |
testBuildWithDisabledStautsConstaint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . studyplan . cycle . StudyPlanCycle context = new org . lnu . is . domain . studyplan . cycle . StudyPlanCycle ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>StudyPlanCycle<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testGetTimestampsForQuery ( ) { java . util . List < java . lang . Long > expectedTimestamps = new java . util . ArrayList < java . lang . Long > ( ) ; expectedTimestamps . add ( 1363707480L ) ; expectedTimestamps . add ( 1363707540L ) ; expectedTimestamps . add ( 1363707600L ) ; expectedTimestamps . add ( 1363707660L ... | org . junit . Assert . assertEquals ( expectedTimestamps , actualTimestamps ) |
testFindPersonByName ( ) { org . junit . Assume . assumeTrue ( ( ! ( org . sculptor . framework . accessimpl . jpa . JpaHelper . isJpaProviderDataNucleus ( getEntityManager ( ) ) ) ) ) ; java . util . List < org . sculptor . examples . library . person . domain . Person > persons = personService . findPersonByName ( ge... | org . junit . Assert . assertEquals ( 2 , persons . size ( ) ) |
testShuffleAndBroadcast ( ) { for ( org . apache . flink . api . common . ExecutionMode mode : org . apache . flink . api . common . ExecutionMode . values ( ) ) { "<AssertPlaceHolder>" ; } } getForShuffleOrBroadcast ( org . apache . flink . api . common . ExecutionMode ) { return org . apache . flink . runtime . io . ... | org . junit . Assert . assertNotNull ( org . apache . flink . runtime . io . network . DataExchangeMode . getForShuffleOrBroadcast ( mode ) ) |
testMarkFailed ( ) { when ( cache . getDocumentById ( id1 ) ) . thenReturn ( doc1 ) ; when ( writer . markFailed ( doc1 , "tag" ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; verify ( cache , times ( 1 ) ) . remove ( id1 ) ; verify ( writer , times ( 1 ) ) . markFailed ( doc1 , "tag" ) ; verify ( doc1 , times ( 1 ... | org . junit . Assert . assertTrue ( io . markFailed ( doc1 , "tag" ) ) |
testMalformedToPublisher ( ) { com . netflix . hystrix . HystrixCommand < java . io . InputStream > command = new org . talend . dataprep . command . CommandHelperTest . MalformedInputStreamTestCommand ( ) ; final org . reactivestreams . Publisher < org . talend . dataprep . command . CommandHelperTestData > publisher ... | org . junit . Assert . assertTrue ( receivedData . isEmpty ( ) ) |
testUnique ( ) { org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 3 , 4 , 3 , 1 , 3 , 0 , 2 , 4 , 2 , 4 } ) ; org . nd4j . linalg . api . ndarray . INDArray expUnique = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 3 , 4 , 1 , 0 , 2 ... | org . junit . Assert . assertNull ( err ) |
testStringVanafExact ( ) { final nl . bzk . brp . domain . element . AttribuutElement attribuutElement = getAttribuutElement ( Element . PERSOON_GESLACHTSNAAMCOMPONENT_STAM ) ; final nl . bzk . brp . service . bevraging . zoekpersoongeneriek . AbstractZoekPersoonVerzoek bevragingVerzoek = maakBevragingVerzoek ( attribu... | org . junit . Assert . assertTrue ( meldingen . isEmpty ( ) ) |
testConvert ( ) { java . lang . String name = "MarkScaleN" ; java . lang . String abbrName = "AN" ; org . lnu . is . domain . mark . scale . type . MarkScaleType source = new org . lnu . is . domain . mark . scale . type . MarkScaleType ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; org . lnu . i... | org . junit . Assert . assertEquals ( expected , actual ) |
loadFromSPI ( org . apache . servicecomb . serviceregistry . discovery . DiscoveryFilter , org . apache . servicecomb . serviceregistry . discovery . DiscoveryFilter ) { java . lang . Class < ? extends org . apache . servicecomb . serviceregistry . discovery . DiscoveryFilter > cls = org . apache . servicecomb . servic... | org . junit . Assert . assertThat ( filters , org . hamcrest . Matchers . contains ( f1 , f2 ) ) |
testExecuteGetFieldMappingIndexRequest ( ) { java . lang . String mappingName = "testGetFieldMapping" ; java . lang . String mappingSource = "{\"properties\":{\"testField\":{\"type\":\"keyword\"},<sp>" + "\"otherTestField\":{\"type\":\"keyword\"}}}" ; _putMapping ( mappingName , mappingSource ) ; java . lang . String [... | org . junit . Assert . assertTrue ( fieldMappings . contains ( mappingSource ) ) |
floatValue ( ) { final org . jboss . msc . value . Value < java . lang . Class < ? extends java . lang . Float > > value = new org . jboss . msc . value . ClassOfValue < java . lang . Float > ( new org . jboss . msc . value . ImmediateValue < java . lang . Float > ( 0.4F ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { r... | org . junit . Assert . assertSame ( org . jboss . msc . value . Float . class , value . getValue ( ) ) |
testServerStartInvalidPortHigh ( ) { int port = 65536 ; org . simplesockets . server . SimpleServer server = new org . simplesockets . server . SimpleServer ( port , org . simplesockets . unittests . SimpleSocketsTest . emptyProtocol ) ; server . startServer ( ) ; java . lang . Thread . sleep ( 200 ) ; "<AssertPlaceHol... | org . junit . Assert . assertFalse ( server . isAlive ( ) ) |
OneMessageTransferPosTest ( ) { java . nio . ByteBuffer byteBuffer = java . nio . ByteBuffer . allocate ( 20 ) ; byteBuffer . putInt ( 20 ) ; org . apache . rocketmq . store . SelectMappedBufferResult selectMappedBufferResult = new org . apache . rocketmq . store . SelectMappedBufferResult ( 0 , byteBuffer , 20 , new o... | org . junit . Assert . assertEquals ( manyMessageTransfer . position ( ) , 8 ) |
unsetDefaultValueProperty ( ) { configure ( ( ( ch . qos . logback . classic . sift . SiftingAppenderTest . SIFT_FOLDER_PREFIX ) + "unsetDefaultValueProperty.xml" ) ) ; logger . debug ( "hello" ) ; ch . qos . logback . classic . sift . SiftingAppender sa = ( ( ch . qos . logback . classic . sift . SiftingAppender ) ( r... | org . junit . Assert . assertFalse ( sa . isStarted ( ) ) |
testOkVerhuizendNaarGba ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht blokkeringInfoAntwoord = new nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht ( ) ; blokkeringInfoAntwoord . setStatus ( StatusType . OK ) ; blokkeringInfoAntw... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testStringCoercion ( ) { final java . lang . String drl = ( ( ( ( ( ( ( ( ( ( ( "package<sp>org.drools.compiler.test;\n" + "<sp>then\n<sp>end\n" 1 ) + ( org . drools . compiler . Person . class . getCanonicalName ( ) ) ) + "<sp>then\n<sp>end\n" 0 ) + "<sp>rule<sp>R1<sp>when\n" ) + "<sp>Person(name<sp>==<sp>\"12\")\n" )... | org . junit . Assert . assertEquals ( 2 , kieSession . fireAllRules ( ) ) |
testSimpleMembers ( ) { java . util . List < org . biopax . paxtools . pattern . Match > list = org . biopax . paxtools . pattern . Searcher . search ( model . getByID ( "http://pid.nci.nih.gov/biopaxpid_35409" ) , new org . biopax . paxtools . pattern . Pattern ( org . biopax . paxtools . pattern . constraint . Comple... | org . junit . Assert . assertTrue ( ( ( list . size ( ) ) == 4 ) ) |
testSetProfileConfiguration ( ) { subject . setProfileConfiguration ( "P1" , org . eclipse . tycho . core . ee . ExecutionEnvironmentConfigurationTest . DUMMY_ORIGIN ) ; subject . setProfileConfiguration ( "P2" , org . eclipse . tycho . core . ee . ExecutionEnvironmentConfigurationTest . DUMMY_ORIGIN ) ; "<AssertPlaceH... | org . junit . Assert . assertThat ( subject . getProfileName ( ) , org . hamcrest . CoreMatchers . is ( "P2" ) ) |
testSetMeasurement ( ) { org . drugis . addis . entities . Study study = new org . drugis . addis . entities . Study ( "X" , new org . drugis . addis . entities . Indication ( 0L , "" ) ) ; org . drugis . addis . ExampleData . addDefaultEpochs ( study ) ; org . drugis . addis . entities . Endpoint endpoint = new org . ... | org . junit . Assert . assertEquals ( m , study . getMeasurement ( study . getOutcomeMeasures ( ) . iterator ( ) . next ( ) , study . getArms ( ) . get ( 0 ) ) ) |
uriTest ( ) { com . b2international . snowowl . fhir . core . model . dt . Uri uri = new com . b2international . snowowl . fhir . core . model . dt . Uri ( "value" ) ; printPrettyJson ( uri ) ; java . lang . String expectedJson = "\"value\"" ; "<AssertPlaceHolder>" ; } printPrettyJson ( java . lang . Object ) { java . ... | org . junit . Assert . assertEquals ( expectedJson , objectMapper . writeValueAsString ( uri ) ) |
getContext_wrong_context_to_lookfor ( ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity r = new ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity ( ) ; r . setId ( java . lang . Integer . valueOf ( 1 ) ) ; ch . puzzle . itc . mobiliar . busines... | org . junit . Assert . assertNull ( contextResult ) |
constructorSetsFields ( ) { io . motown . domain . api . chargingstation . MakeChargingStationNotReservableCommand command = new io . motown . domain . api . chargingstation . MakeChargingStationNotReservableCommand ( CHARGING_STATION_ID , ROOT_IDENTITY_CONTEXT ) ; "<AssertPlaceHolder>" ; } getChargingStationId ( ) { r... | org . junit . Assert . assertEquals ( io . motown . domain . api . chargingstation . CHARGING_STATION_ID , command . getChargingStationId ( ) ) |
getOrderByUsername_shouldFindEmptyListForNonExistingUsername ( ) { java . util . List < org . mybatis . jpetstore . domain . Order > orders = orderDao . getOrdersByUsername ( "NON_EXISTING_USERNAME" ) ; "<AssertPlaceHolder>" ; } getOrdersByUsername ( java . lang . String ) { checkNotNull ( emptyToNull ( username ) , "A... | org . junit . Assert . assertThat ( orders . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
testJAXBObjectRepresentation ( ) { initiateWebApplication ( com . sun . jersey . impl . entity . EntityTypesTest . JAXBObjectResolver . class , com . sun . jersey . impl . entity . EntityTypesTest . JAXBObjectResource . class ) ; com . sun . jersey . api . client . WebResource r = resource ( "/" ) ; java . lang . Objec... | org . junit . Assert . assertEquals ( in , out ) |
TestIdsStr2Iterable ( ) { final java . lang . String ids = "1,2,3,4,5" ; java . util . List < java . lang . Long > expected = new java . util . ArrayList ( ) ; expected . add ( 1L ) ; expected . add ( 2L ) ; expected . add ( 3L ) ; expected . add ( 4L ) ; expected . add ( 5L ) ; java . util . List < java . lang . Long ... | org . junit . Assert . assertEquals ( expected , actual ) |
combineUtf16 ( ) { java . lang . String letter = "A" ; java . lang . String [ ] accents = new java . lang . String [ ] { "acute" } ; java . lang . String expect = "́A"" ; java . lang . String actual = gov . uspto . patent . doc . xml . BraceCode2UnicodeTest . braceCodeUTF8 . combineUtf16 ( letter , accents ) ; ""<Asser... | org . junit . Assert . assertEquals ( expect , actual ) |
givenGeoShapeData_whenExecutedGeoShapeQuery_thenResultNonEmpty ( ) { java . lang . String jsonObject = "{\"name\":\"Agra\",\"region\":{\"type\":\"envelope\",\"coordinates\":[[75,30.2],[80.1,<sp>25]]}}" ; org . elasticsearch . action . index . IndexResponse response = client . prepareIndex ( com . baeldung . elasticsear... | org . junit . Assert . assertTrue ( ids . contains ( tajMahalId ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.