input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
isCountable ( ) { org . optaplanner . core . impl . heuristic . selector . entity . decorator . ShufflingEntitySelector selector = new org . optaplanner . core . impl . heuristic . selector . entity . decorator . ShufflingEntitySelector ( mock ( org . optaplanner . core . impl . heuristic . selector . entity . EntitySe... | org . junit . Assert . assertEquals ( true , selector . isCountable ( ) ) |
getMatchingLinesOfTextShouldFindTheLinesInSequence ( ) { final java . util . List < net . usikkert . kouchat . android . util . Line > lines = net . usikkert . kouchat . android . util . RobotiumTestUtils . getMatchingLinesOfText ( "http://kouchat.googlecode<sp>http://kouchat.googlecode.com" , java . util . Arrays . as... | org . junit . Assert . assertEquals ( 3 , lines . size ( ) ) |
listTest1 ( ) { java . util . List < java . lang . Integer > agTest1 = agTest . listTest1 ( ) ; "<AssertPlaceHolder>" ; } listTest1 ( ) { return 1 ; } | org . junit . Assert . assertTrue ( ( ( agTest1 . size ( ) ) == 2 ) ) |
shouldReturnNotEqualWhenCommitTreeAndTree ( ) { org . eclipse . egit . ui . internal . synchronize . model . GitModelObject left = new org . eclipse . egit . ui . internal . synchronize . model . GitModelCommit ( createModelRepository ( ) , lookupRepository ( leftRepoFile ) , getCommit ( leftRepoFile , org . eclipse . ... | org . junit . Assert . assertFalse ( actual ) |
testContains_IAtom ( ) { org . openscience . cdk . interfaces . ILonePair lp = ( ( org . openscience . cdk . interfaces . ILonePair ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IAtom atom = lp . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "N" ) ; lp . setA... | org . junit . Assert . assertTrue ( lp . contains ( atom ) ) |
testIsMapFieldMapOfStringSets_EmptySets ( ) { java . util . Map < java . lang . String , java . util . Set < java . lang . String > > roleMap = new java . util . HashMap ( ) ; roleMap . put ( "role1" , new java . util . HashSet ( ) ) ; roleMap . put ( "role2" , new java . util . HashSet ( ) ) ; org . eclipse . sw360 . ... | org . junit . Assert . assertThat ( b , org . hamcrest . core . Is . is ( false ) ) |
testRecoverBackupCopy_WithoutResult ( ) { fr . gouv . vitam . common . thread . VitamThreadUtils . getVitamSession ( ) . setTenantId ( fr . gouv . vitam . storage . engine . client . RestoreBackupIT . TENANT_ID ) ; java . util . Optional < fr . gouv . vitam . functional . administration . common . CollectionBackupModel... | org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , collectionBackup ) |
whenGetEnclosingInstanceIsCalledWith3rdLevelInstance_2ndLevelInstanceIsReturned ( ) { de . bechte . junit . stubs . Class1stLevel class1stLevel = new de . bechte . junit . stubs . Class1stLevel ( ) ; de . bechte . junit . stubs . Class1stLevel . Class2ndLevel class2ndLevel = class1stLevel . new2ndLevel ( ) ; de . becht... | org . junit . Assert . assertThat ( enclosingInstance , is ( equalTo ( ( ( java . lang . Object ) ( class2ndLevel ) ) ) ) ) |
testGetTableNameFromVariable_whenVariableValueExists ( ) { java . lang . String expectedTableName = "hbweblogs" ; transMeta . setVariable ( "hb_weblogs" , "hbweblogs" ) ; java . lang . String tableName = org . pentaho . big . data . kettle . plugins . hbase . mapping . MappingAdmin . getTableNameFromVariable ( stepMeta... | org . junit . Assert . assertEquals ( expectedTableName , tableName ) |
testGetDefaultSize ( ) { com . archimatetool . editor . ui . factory . IGraphicalObjectUIProvider provider = ( ( com . archimatetool . editor . ui . factory . IGraphicalObjectUIProvider ) ( ObjectUIFactory . INSTANCE . getProvider ( abstractFigure . getDiagramModelObject ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getUserDef... | org . junit . Assert . assertEquals ( provider . getUserDefaultSize ( ) , abstractFigure . getDefaultSize ( ) ) |
shouldReadFirstFromTwoRecordDynamicLongArray ( ) { java . lang . Long expectedId = 12L ; long [ ] ids = new long [ ] { expectedId , 1L , 2L , 3L , 4L , 5L , 6L , 7L , 8L , 9L , 10L , 11L } ; org . neo4j . kernel . impl . store . record . DynamicRecord firstRecord = new org . neo4j . kernel . impl . store . record . Dyn... | org . junit . Assert . assertEquals ( expectedId , firstId ) |
testInvalidAllValuesFrom ( ) { com . github . anno4j . Anno4j anno4j = new com . github . anno4j . Anno4j ( ) ; com . github . anno4j . ValidatedTransaction transaction = anno4j . createValidatedTransaction ( ) ; transaction . begin ( ) ; com . github . anno4j . transaction . ValidatedTransactionTest . TestResource res... | org . junit . Assert . assertTrue ( exceptionThrown ) |
givenInstanceMethod_whenSortingEntitiesByName_thenCorrectlySorted ( ) { final java . util . List < com . baeldung . java8 . entity . Human > humans = com . google . common . collect . Lists . newArrayList ( new com . baeldung . java8 . entity . Human ( "Sarah" , 10 ) , new com . baeldung . java8 . entity . Human ( "Jac... | org . junit . Assert . assertThat ( humans . get ( 0 ) , org . hamcrest . Matchers . equalTo ( new com . baeldung . java8 . entity . Human ( "Jack" , 12 ) ) ) |
testResolvePrimitiveWrapperTypeForLong ( ) { "<AssertPlaceHolder>" ; } resolvePrimitiveWrapperType ( java . lang . Class ) { org . axonframework . common . Assert . notNull ( primitiveType , ( ) -> "primitiveType<sp>may<sp>not<sp>be<sp>null" ) ; org . axonframework . common . Assert . isTrue ( primitiveType . isPrimiti... | org . junit . Assert . assertEquals ( org . axonframework . common . Long . class , resolvePrimitiveWrapperType ( long . class ) ) |
testLookup ( ) { final tlc2 . util . ContextTest . DummySymbolNode name = new tlc2 . util . ContextTest . DummySymbolNode ( "ctx1" ) ; final java . lang . Object value = "value1" ; final tlc2 . util . Context ctx1 = Context . Empty . cons ( name , value ) ; final tlc2 . util . Context branch = tlc2 . util . Context . b... | org . junit . Assert . assertEquals ( value , ctx3 . lookup ( name ) ) |
testFromXmlWithNull ( ) { "<AssertPlaceHolder>" ; } fromXml ( java . lang . String ) { if ( xml != null ) { return new org . esa . snap . core . gpf . annotations . ParameterBlockConverter ( ) . convertXmlToObject ( xml , new com . bc . calvalus . production . ProductionRequest ( ) ) ; } return null ; } | org . junit . Assert . assertNull ( com . bc . calvalus . production . ProductionRequest . fromXml ( null ) ) |
testGetDemographicExt ( ) { org . oscarehr . common . model . DemographicExt entity = new org . oscarehr . common . model . DemographicExt ( ) ; entity = ( ( org . oscarehr . common . model . DemographicExt ) ( org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ) ) ; ... | org . junit . Assert . assertEquals ( entity , foundEntity ) |
testSimpleCNN ( ) { com . github . neuralnetworks . tensor . Tensor seqResult = testSimpleCNN ( Runtime . CPU_SEQ ) ; com . github . neuralnetworks . tensor . Tensor openclResult = testSimpleCNN ( Runtime . OPENCL ) ; "<AssertPlaceHolder>" ; } isEqual ( com . github . neuralnetworks . tensor . Tensor , com . github . n... | org . junit . Assert . assertTrue ( isEqual ( seqResult , openclResult ) ) |
testVertices ( ) { java . util . Set < java . lang . String > expected = com . google . common . collect . Sets . newHashSet ( "A" , "B" , "C" , "D" , "E" , "F" ) ; "<AssertPlaceHolder>" ; } vertices ( ) { return com . google . common . collect . Sets . union ( com . google . common . collect . Sets . union ( graphTabl... | org . junit . Assert . assertEquals ( expected , graph . vertices ( ) ) |
testRegexpTimeoutMsInSystemConfiguration ( ) { com . chikli . hudson . plugin . naginator . NaginatorPublisher . DescriptorImpl d = ( ( com . chikli . hudson . plugin . naginator . NaginatorPublisher . DescriptorImpl ) ( com . chikli . hudson . plugin . naginator . NaginatorPublisherTest . j . jenkins . getDescriptor (... | org . junit . Assert . assertEquals ( 1000 , d . getRegexpTimeoutMs ( ) ) |
shouldLaunchSynchronizationFromGitRepositories ( ) { bot . menu ( "Window" ) . menu ( "Show<sp>View" ) . menu ( "Other..." ) . click ( ) ; bot . shell ( "Show<sp>View" ) . bot ( ) . tree ( ) . expandNode ( "Git" ) . getNode ( "Git<sp>Repositories" ) . doubleClick ( ) ; org . eclipse . swtbot . swt . finder . widgets . ... | org . junit . Assert . assertEquals ( 8 , syncViewTree . getAllItems ( ) . length ) |
testUnregisterComponent ( ) { org . xwiki . component . embed . EmbeddableComponentManager ecm = new org . xwiki . component . embed . EmbeddableComponentManager ( ) ; org . xwiki . component . descriptor . DefaultComponentDescriptor < org . xwiki . component . embed . EmbeddableComponentManagerTest . Role > d1 = new o... | org . junit . Assert . assertSame ( org . xwiki . component . embed . EmbeddableComponentManagerTest . RoleImpl . class , ecm . getInstance ( org . xwiki . component . embed . EmbeddableComponentManagerTest . Role . class ) . getClass ( ) ) |
shouldHaveDefaultCtorAndWithName ( ) { com . threewks . thundr . http . Cookie cookie = new com . threewks . thundr . http . Cookie . CookieBuilder ( ) . withName ( "name" ) . build ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertThat ( cookie . getName ( ) , is ( "name" ) ) |
piplineWithError ( ) { redis . clients . jedis . Pipeline p = jedis . pipelined ( ) ; p . set ( "foo" , "bar" ) ; redis . clients . jedis . Response < java . util . Set < java . lang . String > > error = p . smembers ( "foo" ) ; redis . clients . jedis . Response < java . lang . String > r = p . get ( "foo" ) ; p . syn... | org . junit . Assert . assertEquals ( r . get ( ) , "bar" ) |
testDetectUser ( ) { java . util . List < java . lang . Class > detected = new org . apache . streams . twitter . converter . TwitterDocumentClassifier ( ) . detectClasses ( user ) ; "<AssertPlaceHolder>" ; java . lang . Class result = detected . get ( 0 ) ; if ( ! ( result . equals ( org . apache . streams . twitter .... | org . junit . Assert . assertTrue ( ( ( detected . size ( ) ) == 1 ) ) |
testErrorWriteOnReplica ( ) { try ( java . sql . Connection connection = getNewConnection ( false ) ) { java . sql . Statement stmt = connection . createStatement ( ) ; stmt . execute ( ( "drop<sp>table<sp>if<sp>exists<sp>auroraDelete" + ( jobId ) ) ) ; stmt . execute ( ( ( "create<sp>table<sp>auroraDelete" + ( jobId )... | org . junit . Assert . assertTrue ( connection . isReadOnly ( ) ) |
testRemoveStatTreeRoot ( ) { org . eclipse . tracecompass . internal . tmf . ui . viewers . statistics . model . TmfStatisticsTreeManager . removeStatTreeRoot ( fDataKey1 ) ; "<AssertPlaceHolder>" ; try { org . eclipse . tracecompass . internal . tmf . ui . viewers . statistics . model . TmfStatisticsTreeManager . remo... | org . junit . Assert . assertNull ( "removeStatTreeRoot" , org . eclipse . tracecompass . internal . tmf . ui . viewers . statistics . model . TmfStatisticsTreeManager . getStatTree ( fDataKey1 ) ) |
testGetMaxId ( ) { org . oscarehr . common . model . EChart entity = new org . oscarehr . common . model . EChart ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; java . lang . Integer id = dao . getMaxIdForDemographic ( entity . g... | org . junit . Assert . assertNotNull ( id ) |
testConvertToRuleActionOut ( ) { org . hawkular . apm . api . model . config . instrumentation . jvm . InstrumentComponent im = new org . hawkular . apm . api . model . config . instrumentation . jvm . InstrumentComponent ( ) ; im . setComponentTypeExpression ( "\"MyComponent\"" ) ; im . setOperationExpression ( "\"MyO... | org . junit . Assert . assertEquals ( expected , transformed ) |
whenAddStackThatWeCanGetItbyIndex ( ) { ru . szhernovoy . linkedlist . StackLinkedList < java . lang . Integer > dlink = new ru . szhernovoy . linkedlist . StackLinkedList ( ) ; dlink . push ( 4 ) ; dlink . push ( 12 ) ; dlink . push ( ( - 7 ) ) ; int control = dlink . get ( 2 ) ; "<AssertPlaceHolder>" ; } get ( java .... | org . junit . Assert . assertThat ( control , org . hamcrest . core . Is . is ( ( - 7 ) ) ) |
testGetOrCreateFromCache ( ) { org . aeonbits . owner . cache . CacheConfigTest . MyConfig first = org . aeonbits . owner . ConfigCache . getOrCreate ( org . aeonbits . owner . cache . CacheConfigTest . MyConfig . class ) ; org . aeonbits . owner . cache . CacheConfigTest . MyConfig second = org . aeonbits . owner . Co... | org . junit . Assert . assertSame ( first , second ) |
testTwoPointersToSameInstanceOrderedCollection ( ) { com . cedarsoftware . util . TestGraphComparator . Node X = new com . cedarsoftware . util . TestGraphComparator . Node ( "X" ) ; com . cedarsoftware . util . TestGraphComparator . Node Y = new com . cedarsoftware . util . TestGraphComparator . Node ( "Y" ) ; com . c... | org . junit . Assert . assertEquals ( 2 , deltas . size ( ) ) |
shouldReturnExitValueOfCommand ( ) { java . net . URL url = new java . net . URL ( "http" , "localhost" , 80 , "/foo" ) ; com . oracle . bedrock . runtime . remote . winrm . SoapConnection connection = mock ( com . oracle . bedrock . runtime . remote . winrm . SoapConnection . class ) ; com . oracle . bedrock . runtime... | org . junit . Assert . assertThat ( session . exitValue ( ) , org . hamcrest . CoreMatchers . is ( 99 ) ) |
testFromHL7Null ( ) { "<AssertPlaceHolder>" ; } fromHL7 ( org . openehealth . ipf . commons . ihe . xds . core . transform . hl7 . List ) { if ( ( hl7PID == null ) || ( hl7PID . isEmpty ( ) ) ) { return null ; } org . openehealth . ipf . commons . ihe . xds . core . metadata . PatientInfo patientInfo = new org . openeh... | org . junit . Assert . assertNull ( transformer . fromHL7 ( null ) ) |
test_equals_otherClass ( ) { org . threeten . extra . Seconds test5 = org . threeten . extra . Seconds . of ( 5 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == otherAmount ) { return true ; } if ( otherAmount instanceof org . threeten . extra . Seconds ) { org . threeten . extra . Secon... | org . junit . Assert . assertEquals ( false , test5 . equals ( "" ) ) |
selectionExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Sequence ( Property ( "foo" ) , Selection ( Property ( "bar" ) ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "foo[?bar]" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { ... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
testMatchingNibbleLength7 ( ) { byte [ ] a = new byte [ 0 ] ; byte [ ] b = new byte [ ] { 0 } ; int result = org . ethereum . util . ByteUtil . matchingNibbleLength ( a , b ) ; "<AssertPlaceHolder>" ; } matchingNibbleLength ( byte [ ] , byte [ ] ) { int i = 0 ; int length = ( ( a . length ) < ( b . length ) ) ? a . len... | org . junit . Assert . assertEquals ( 0 , result ) |
zero_should_be_zero ( ) { int value = fr . inria . lille . examples . bool . constant . Neg . neg ( 0 ) ; "<AssertPlaceHolder>" ; } neg ( int ) { if ( value < 0 ) { return ( - 1 ) * value ; } else { return value ; } } | org . junit . Assert . assertEquals ( 0 , value ) |
givenObservableWithNoEvents_whenSingle_thenThrowException ( ) { rx . Observable . range ( 1 , 3 ) . single ( ) . onErrorReturn ( ( e ) -> receivedTotal += 10 ) . subscribe ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( ( receivedTotal ) == 10 ) ) |
testCreatePreviewCellAtMax ( ) { java . lang . String input = org . sagebionetworks . repo . manager . file . preview . TabCsvTextPreviewTest . createStringOfLength ( TabCsvPreviewGenerator . MAX_CELL_CHARACTER_COUNT ) ; java . lang . String result = org . sagebionetworks . repo . manager . file . preview . TabCsvPrevi... | org . junit . Assert . assertEquals ( input , result ) |
shouldClear ( ) { com . oracle . bedrock . runtime . PropertiesBuilder builder = new com . oracle . bedrock . runtime . PropertiesBuilder ( ) ; builder . setProperty ( "Key-1" , "Value-1" ) ; builder . setProperty ( "Key-2" , "Value-2" ) ; builder . clear ( ) ; java . util . Properties properties = builder . realize ( ... | org . junit . Assert . assertThat ( properties . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
singletons ( ) { org . mapdb . elsa . ElsaSerializerPojo s = new org . mapdb . elsa . ElsaMaker ( ) . singletons ( org . mapdb . elsa . ElsaSerializerBaseTest . singleton ) . make ( ) ; "<AssertPlaceHolder>" ; } clonePojo ( E , org . mapdb . elsa . ElsaSerializerBase ) { org . mapdb . elsa . ByteArrayOutputStream out =... | org . junit . Assert . assertTrue ( ( ( org . mapdb . elsa . ElsaSerializerBaseTest . singleton ) == ( org . mapdb . elsa . ElsaSerializerBaseTest . clonePojo ( org . mapdb . elsa . ElsaSerializerBaseTest . singleton , s ) ) ) ) |
testSetFocusItemByIndex2 ( ) { viewMock . display ( de . lessvoid . nifty . controls . listbox . ListBoxTestTool . buildValues ( o2 , o3 ) , 1 , de . lessvoid . nifty . controls . listbox . ListBoxTestTool . buildValuesSelection ( ) ) ; viewMock . scrollTo ( 1 ) ; replay ( viewMock ) ; listBox . setFocusItemByIndex ( 2... | org . junit . Assert . assertEquals ( 2 , listBox . getFocusItemIndex ( ) ) |
testExecuteWithInvalidTOSPromptInterval ( ) { javax . persistence . Query q = getEntityManager ( ) . createQuery ( "FROM<sp>SystemSettings" ) ; java . util . List < org . eurekastreams . server . domain . SystemSettings > results = q . getResultList ( ) ; "<AssertPlaceHolder>" ; org . eurekastreams . server . domain . ... | org . junit . Assert . assertTrue ( ( ( results . size ( ) ) == 1 ) ) |
shouldAllowMissingSelectorColumnsInQOM ( ) { javax . jcr . Node node = session . getRootNode ( ) . addNode ( "test" , "modetest:simpleType" ) ; node . setProperty ( "fieldA" , "A_value" ) ; session . save ( ) ; java . lang . String sql = "SELECT<sp>*<sp>FROM<sp>[nt:base]<sp>AS<sp>node<sp>WHERE<sp>node.fieldA<sp>=<sp>'A... | org . junit . Assert . assertThat ( query . getStatement ( ) , org . hamcrest . core . Is . is ( sql ) ) |
whenApplyDistinct_thenRemoveDuplicatesFromStream ( ) { java . util . List < java . lang . Integer > intList = java . util . Arrays . asList ( 2 , 5 , 3 , 2 , 4 , 3 ) ; java . util . List < java . lang . Integer > distinctIntList = intList . stream ( ) . distinct ( ) . collect ( java . util . stream . Collectors . toLis... | org . junit . Assert . assertEquals ( distinctIntList , java . util . Arrays . asList ( 2 , 5 , 3 , 4 ) ) |
testWriteLockFailsOnLocalContention ( ) { expect ( lockState . has ( defaultTx , defaultLockID ) ) . andReturn ( false ) ; recordFailedLocalLock ( ) ; ctrl . replay ( ) ; com . thinkaurelius . titan . diskstorage . locking . PermanentLockingException le = null ; try { locker . writeLock ( defaultLockID , defaultTx ) ; ... | org . junit . Assert . assertNotNull ( le ) |
isPresent_returnsFalseWhenValuePresent ( ) { final com . eccyan . optional . Optional < java . lang . Integer > actual = com . eccyan . optional . Optional . ofNullable ( null ) ; "<AssertPlaceHolder>" ; } isPresent ( ) { return ! ( this . observable . isEmpty ( ) . toBlocking ( ) . single ( ) ) ; } | org . junit . Assert . assertFalse ( actual . isPresent ( ) ) |
testAnnotatorDescriptor ( ) { org . apache . uima . fit . testing . util . HideOutput hider = new org . apache . uima . fit . testing . util . HideOutput ( ) ; org . cleartk . examples . pos . BuildTestExamplePosModel . main ( ) ; hider . restoreOutput ( ) ; java . lang . String modelFileName = org . cleartk . ml . jar... | org . junit . Assert . assertEquals ( modelFileName , classifierJar ) |
saveAndLoad ( ) { try { java . io . File savedFile = folder . newFile ( "matrix.txt" ) ; cc . mallet . types . MatrixOps . savetxt ( cc . mallet . types . tests . TestMatrixOps . matrix , savedFile ) ; double [ ] [ ] loadedMatrix = cc . mallet . types . MatrixOps . loadtxt ( savedFile ) ; cc . mallet . types . MatrixOp... | org . junit . Assert . assertEquals ( 0.0 , diff , 0.0 ) |
testToString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "FinishedMessage:" ) ; sb . append ( "\n<sp>Verify<sp>Data:<sp>" ) . append ( "null" ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "... | org . junit . Assert . assertEquals ( message . toString ( ) , sb . toString ( ) ) |
writeJSONAddsSex ( ) { doReturn ( new org . phenotips . data . SimpleValuePatientData ( org . phenotips . data . internal . controller . SexControllerTest . DATA_NAME , org . phenotips . data . internal . controller . SexControllerTest . SEX_FEMALE ) ) . when ( this . patient ) . getData ( org . phenotips . data . inte... | org . junit . Assert . assertEquals ( org . phenotips . data . internal . controller . SexControllerTest . SEX_FEMALE , json . get ( org . phenotips . data . internal . controller . SexControllerTest . DATA_NAME ) ) |
testGetFingerprint ( ) { org . apache . nifi . authorization . User user1 = new org . apache . nifi . authorization . User . Builder ( ) . identifier ( "user-id-1" ) . identity ( "user-1" ) . build ( ) ; org . apache . nifi . authorization . User user2 = new org . apache . nifi . authorization . User . Builder ( ) . id... | org . junit . Assert . assertEquals ( authorizer1 . getFingerprint ( ) , authorizer2 . getFingerprint ( ) ) |
testBuild ( ) { java . lang . Long group1 = 1L ; java . lang . Long group2 = 2L ; java . util . List < java . lang . Long > context = java . util . Arrays . asList ( group1 , group2 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>UserGroupView<sp>e<sp>WHERE<sp>(<sp>e.groupId<sp>IN<sp>(:groupIds))<sp>AN... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
addAndCompress ( ) { org . roaringbitmap . RunContainer container = new org . roaringbitmap . RunContainer ( ) ; container . add ( ( ( short ) ( 0 ) ) ) ; container . add ( ( ( short ) ( 99 ) ) ) ; container . add ( ( ( short ) ( 98 ) ) ) ; "<AssertPlaceHolder>" ; } getSizeInBytes ( ) { return ( ( int ) ( getLongSizeIn... | org . junit . Assert . assertEquals ( 12 , container . getSizeInBytes ( ) ) |
hasLinkWhenLinkTest ( ) { javax . ws . rs . core . Response response = org . jboss . resteasy . test . response . ResponseTest . client . target ( generateURL ( "/link" ) ) . request ( ) . post ( javax . ws . rs . client . Entity . text ( "path" ) ) ; "<AssertPlaceHolder>" ; response . close ( ) ; } hasLink ( java . la... | org . junit . Assert . assertTrue ( response . hasLink ( "path" ) ) |
testConfigurationHandling_convertOldStyle ( ) { org . revapi . AnalysisContextTest . Dummy . schema = "{\"type\":<sp>\"integer\"}" ; org . revapi . AnalysisContextTest . Dummy . extensionId = "ext" ; java . lang . String oldCfg = "{\"ext\":<sp>1}" ; org . jboss . dmr . ModelNode newCfg = org . jboss . dmr . ModelNode .... | org . junit . Assert . assertEquals ( newCfg , ctx . getConfiguration ( ) ) |
testGetStatusWaitingReason ( ) { ( ( com . openshift . internal . restclient . model . Pod ) ( pod ) ) . getNode ( ) . get ( "status" , "containerStatuses" ) . asList ( ) . get ( 0 ) . get ( "state" ) . set ( "waiting" , new org . jboss . dmr . ModelNode ( ) . set ( "reason" , "ReasonNotToWork" ) ) ; "<AssertPlaceHolde... | org . junit . Assert . assertEquals ( pod . getStatus ( ) , "ReasonNotToWork" ) |
testLockAndLoadSingleEntityByClassAndIdRevertsPropertyChange ( ) { org . candlepin . model . Owner owner = this . createOwner ( "owner_key-1" , "owner-1" ) ; owner . setDisplayName ( "changed_name" ) ; this . testOwnerCurator . lockAndLoadById ( org . candlepin . model . Owner . class , owner . getId ( ) ) ; "<AssertPl... | org . junit . Assert . assertEquals ( "owner-1" , owner . getDisplayName ( ) ) |
updateWithoutInsertFailure ( ) { try { com . rhwayfun . springboot . mybatis . shardingjdbc . entity . UserEntity user = new com . rhwayfun . springboot . mybatis . shardingjdbc . entity . UserEntity ( ) ; user . setCityId ( 1 ) ; user . setUserName ( "insertTest" ) ; user . setAge ( 10 ) ; user . setBirth ( new java .... | org . junit . Assert . assertEquals ( "insertTest" , one . getUserName ( ) ) |
condition16Test ( ) { model . Record record = new model . Record ( null ) ; record . put ( "hoi" , new model . datafield . DataFieldInt ( 10 ) ) ; java . lang . String expression = "COL(hoi)<sp>+<sp>10<sp>=<sp>10" ; analyze . condition . Condition condition = new analyze . condition . Condition ( expression ) ; "<Asser... | org . junit . Assert . assertEquals ( false , condition . evaluateWithRecord ( record ) ) |
testSimplify ( ) { org . opengis . filter . Filter isCoverage = org . geotools . coverage . util . IsCoverageTest . FF . equals ( org . geotools . coverage . util . IsCoverageTest . FF . function ( "isCoverage" ) , org . geotools . coverage . util . IsCoverageTest . FF . literal ( "true" ) ) ; org . geotools . filter .... | org . junit . Assert . assertEquals ( isCoverage , result ) |
testNonDurableMessageOnDurableQueue ( ) { boolean durable = true ; org . apache . activemq . artemis . api . core . SimpleString address = org . apache . activemq . artemis . utils . RandomUtil . randomSimpleString ( ) ; org . apache . activemq . artemis . api . core . SimpleString queue = org . apache . activemq . art... | org . junit . Assert . assertNull ( consumer . receiveImmediate ( ) ) |
testFailNoTransportForProtocol ( ) { javax . jms . BytesMessage message = org . jsoftware . javamail . JMS2JavaMailTest . bytesMessageFor ( source , new javax . mail . Address [ ] { new javax . mail . internet . InternetAddress ( "to@server.nowhere" ) } ) ; java . lang . Exception exception = new javax . mail . NoSuchP... | org . junit . Assert . assertEquals ( exception , exceptionArgumentCaptor . getValue ( ) ) |
testStableChildren ( ) { com . gistlabs . mechanize . document . json . node . impl . ObjectNodeImpl element = new com . gistlabs . mechanize . document . json . node . impl . ObjectNodeImpl ( parseJson ( "{<sp>\"one\"<sp>:<sp>2,<sp>\"b\"<sp>:<sp>2.2<sp>}" ) ) ; "<AssertPlaceHolder>" ; } getChild ( java . lang . String... | org . junit . Assert . assertEquals ( element . getChild ( "b" ) , element . getChild ( "b" ) ) |
testDropLocalIndexShouldDeleteDataFromLocalIndexTable ( ) { java . lang . String tableName = ( ( schemaName ) + "." ) + ( generateUniqueName ( ) ) ; java . lang . String indexName = "IDX_" + ( generateUniqueName ( ) ) ; createBaseTable ( tableName , null , "('e','i','o')" ) ; java . sql . Connection conn1 = java . sql ... | org . junit . Assert . assertEquals ( 0 , count ) |
buildMessageShouldReturnSameData ( ) { final byte [ ] input = "testText" . getBytes ( java . nio . charset . Charset . forName ( "UTF-8" ) ) ; com . zanox . rabbiteasy . Message message = com . zanox . rabbiteasy . cdi . EventPublisher . buildMessage ( com . zanox . rabbiteasy . cdi . EventPublisherTest . TEST_CONFIGUR... | org . junit . Assert . assertArrayEquals ( input , output ) |
testDeleteAFileQuotesInLongerFileName ( ) { java . lang . String testFileName = "oobie<sp>doobie<sp>ooobie<sp>doobie<sp>do-wah<sp>do-wah<sp>do-wah<sp>quote<sp>'<sp>infilename1.txt" ; java . lang . String absPath = org . irods . jargon . core . pub . io . IRODSFileImplTest . scratchFileUtils . createAndReturnAbsoluteScr... | org . junit . Assert . assertFalse ( targetIRODSFile . exists ( ) ) |
testExercise15reduce ( ) { System . out . println ( "-----------<sp>testExercise15<sp>reduce<sp>----------------" ) ; learnrxjava . types . ComposableList < java . lang . Integer > slr = learnrxjava . ComposableListSolutions . of ( 1 , 2 , 3 ) . reduce ( 1 , ( s , i ) -> s + i ) ; slr . forEach ( System . out :: printl... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 7 ) , slr ) |
testCopyOfIterator ( ) { java . lang . Iterable < java . lang . String > iterable = new org . kocakosm . pitaya . collection . HashBag < java . lang . String > ( "Hello" ) ; org . kocakosm . pitaya . collection . Bag < java . lang . String > bag = org . kocakosm . pitaya . collection . ImmutableBag . copyOf ( iterable ... | org . junit . Assert . assertEquals ( iterable , bag ) |
testValidateFunctionWithThreeArguments ( ) { net . objecthunter . exp4j . Expression exp = new net . objecthunter . exp4j . ExpressionBuilder ( "gamma(x,<sp>y,<sp>z)" ) . variables ( "x" , "y" , "z" ) . functions ( gamma ) . build ( ) ; net . objecthunter . exp4j . ValidationResult result = exp . validate ( false ) ; "... | org . junit . Assert . assertTrue ( result . isValid ( ) ) |
sparsePrintTest ( ) { alluxio . job . util . TimeSeries timeSeries = new alluxio . job . util . TimeSeries ( ) ; timeSeries . record ( mBase ) ; timeSeries . record ( ( ( mBase ) + ( 8L * ( alluxio . Constants . SECOND_NANO ) ) ) ) ; java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream... | org . junit . Assert . assertEquals ( sb . toString ( ) , outputStream . toString ( ) ) |
testTouchableDependencyWithComponentKeyParameter ( ) { container . addComponent ( com . picocontainer . testmodel . AlternativeTouchable . class ) ; container . addComponent ( com . picocontainer . testmodel . DecoratedTouchable . class , com . picocontainer . testmodel . DecoratedTouchable . class , new com . picocont... | org . junit . Assert . assertNotNull ( t ) |
testSerialization ( ) { org . jfree . data . xy . XYDataItem i1 = new org . jfree . data . xy . XYDataItem ( 1.0 , 1.1 ) ; org . jfree . data . xy . XYDataItem i2 = ( ( org . jfree . data . xy . XYDataItem ) ( org . jfree . chart . TestUtils . serialised ( i1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang .... | org . junit . Assert . assertEquals ( i1 , i2 ) |
testGetText_AfterSet ( ) { org . eclipse . nebula . widgets . grid . GridItem item = new org . eclipse . nebula . widgets . grid . GridItem ( grid , org . eclipse . swt . SWT . NONE ) ; item . setText ( "foo" ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; } | org . junit . Assert . assertEquals ( "foo" , item . getText ( ) ) |
non_specimen_type_request_returns_no_specimen ( ) { java . lang . Object result = this . setBuilder . create ( "string" , null ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object , com . flextrade . jfixture . SpecimenContext ) { if ( ! ( request instanceof com . flextrade . jfixture . utility . SpecimenType ) ... | org . junit . Assert . assertEquals ( new com . flextrade . jfixture . NoSpecimen ( ) , result ) |
testShouldReturnEmptyListWhenNoVoluntarySavingsAccountsForClientsOrGroupsWithCompleteGroupStatusExist ( ) { java . util . List < org . mifos . application . servicefacade . CollectionSheetCustomerSavingDto > mandatorySavingAccounts = savingsDao . findAllVoluntarySavingAccountsForClientsAndGroupsWithCompleteGroupStatusF... | org . junit . Assert . assertTrue ( mandatorySavingAccounts . isEmpty ( ) ) |
testGetAllUserTokensProjectServerNull ( ) { com . kylenicholls . stash . parameterizedbuilds . ciserver . Server globalServer = new com . kylenicholls . stash . parameterizedbuilds . ciserver . Server ( "globalUrl" , null , "globaluser" , "globaltoken" , false , false ) ; java . lang . String newProjectKey = "newkey" ;... | org . junit . Assert . assertEquals ( 1 , actual . size ( ) ) |
testMultiLineMacros ( ) { net . sourceforge . pmd . cpd . Tokens tokens = parse ( net . sourceforge . pmd . cpd . CPPTokenizerTest . TEST1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . size ( ) ; } | org . junit . Assert . assertEquals ( 7 , tokens . size ( ) ) |
post_A$String$Map ( ) { java . util . Map < java . lang . String , java . lang . Object > formParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; formParams . put ( "name" , "Andy" ) ; com . m3 . curly . com . m3 . curly . Response response = com . m3 . curly . com . m3 . curly . HT... | org . junit . Assert . assertThat ( response . getStatus ( ) , is ( 200 ) ) |
findByUsernameIn ( ) { java . util . List < java . lang . String > usernameList = org . assertj . core . util . Lists . newArrayList ( "admin" , "user" ) ; java . util . List < com . xkcoding . rbac . security . model . User > userList = userDao . findByUsernameIn ( usernameList ) ; "<AssertPlaceHolder>" ; log . info (... | org . junit . Assert . assertEquals ( 2 , userList . size ( ) ) |
testCreateWithExceptionsNotAuthorized ( ) { try { java . lang . String nodeName = "EvaluationPermissionsManagerImplAutowiredTest.testCreateWithExceptions" ; java . lang . String nodeId = createNode ( nodeName , EntityType . project , adminUserInfo ) ; java . lang . String evalName = nodeName ; java . lang . String eval... | org . junit . Assert . assertTrue ( true ) |
shouldContainExistingField ( ) { final cs . bilkent . joker . operator . Tuple tuple = cs . bilkent . joker . operator . Tuple . of ( "field" , "value" ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { final int index = schema . getFieldIndex ( key ) ; if ( index != ( FIELD_NOT_FOUND ) ) { return ( valu... | org . junit . Assert . assertTrue ( tuple . contains ( "field" ) ) |
emptyConstructorShouldSetTheSmppConfiguration ( ) { "<AssertPlaceHolder>" ; } getConfiguration ( ) { return configuration ; } | org . junit . Assert . assertNotNull ( binding . getConfiguration ( ) ) |
shouldValidateTrackingRecordIfTrackingRecordTreatmentIsSetToDuringProduction ( ) { given ( order . getStringField ( "trackingRecordTreatment" ) ) . willReturn ( "01duringProduction" ) ; given ( order . getStringField ( "state" ) ) . willReturn ( "03inProgress" ) ; boolean isTrackingRecordValid = trackingForOrdersModelV... | org . junit . Assert . assertTrue ( isTrackingRecordValid ) |
canReadAddedQueries ( ) { final org . apache . rya . streams . api . queries . QueryRepository queries = new org . apache . rya . streams . api . queries . InMemoryQueryRepository ( new org . apache . rya . streams . api . queries . InMemoryQueryChangeLog ( ) , org . apache . rya . streams . api . queries . InMemoryQue... | org . junit . Assert . assertEquals ( expected , stored ) |
testGetChildren_ListsElementsInRightOrder ( ) { cern . entwined . Node < java . lang . Integer > root = createNode ( 20 ) ; java . util . List < cern . entwined . Node < java . lang . Integer > > children = new java . util . ArrayList < cern . entwined . Node < java . lang . Integer > > ( ) ; children . add ( createNod... | org . junit . Assert . assertEquals ( children , root . getChildren ( ) ) |
testCarCollectionNull ( ) { java . util . List < com . baidu . unbiz . fluentvalidator . dto . Car > cars = null ; com . baidu . unbiz . fluentvalidator . Result ret = com . baidu . unbiz . fluentvalidator . FluentValidator . checkAll ( ) . onEach ( cars ) . doValidate ( ) . result ( com . baidu . unbiz . fluentvalidat... | org . junit . Assert . assertThat ( ret . isSuccess ( ) , org . hamcrest . core . Is . is ( true ) ) |
testStrictTruncateConvolutionModeOutput ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; int [ ] minibatches = new int [ ] { 1 , 3 } ; int [ ] inDepths = new int [ ] { 1 , 3 } ; int [ ] inSizes = new int [ ] { 9 , 10 , 11 } ; for ( boolean isSubsampling : new boolean [ ] { false , true }... | org . junit . Assert . assertEquals ( out , out2 ) |
testPack2fInput ( ) { final float [ ] [ ] data = new float [ rows ] [ columns ] ; final java . lang . String msg = ( java . lang . String . format ( edu . emory . mathcs . jtransforms . fft . RealFFTUtils_2DTest . DEFAULT_MESSAGE , rows , columns ) ) + "[%d][%d]" ; for ( int r = 0 ; r < ( rows ) ; r ++ ) { for ( int c ... | org . junit . Assert . assertEquals ( java . lang . String . format ( msg , r , c ) , expected , actual , 0.0 ) |
testPull ( ) { org . jboss . resteasy . client . ClientRequest request = new org . jboss . resteasy . client . ClientRequest ( generateURL ( ( "6" 5 + ( org . apache . activemq . artemis . rest . test . SelectorTest . topicName ) ) ) ) ; org . jboss . resteasy . client . ClientResponse < ? > response = request . head (... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
initializerDatacenterAvailabilityLocalTest ( ) { io . cassandrareaper . AppContext context = new io . cassandrareaper . AppContext ( ) ; final io . cassandrareaper . jmx . JmxProxy jmxProxyMock = mock ( io . cassandrareaper . jmx . JmxProxy . class ) ; final java . util . concurrent . atomic . AtomicInteger connectionA... | org . junit . Assert . assertEquals ( 3 , connectionAttempts . get ( ) ) |
testAddWorklogsWithEstimateAdjustmentUsingTimeUnits ( ) { final java . lang . String issueKey = it . AsynchronousIssueRestClientWorklogTest . ISSUE_KEY ; navigation . issue ( ) . setEstimates ( it . AsynchronousIssueRestClientWorklogTest . ISSUE_KEY , "20" , "20" ) ; final com . atlassian . jira . rest . client . api .... | org . junit . Assert . assertEquals ( expectedRemaningEstimate , actualRemainingEstimate ) |
testBroadcastVariableWithInitializerAndMismatch ( ) { try { org . apache . flink . api . common . functions . util . RuntimeUDFContext ctx = new org . apache . flink . api . common . functions . util . RuntimeUDFContext ( taskInfo , getClass ( ) . getClassLoader ( ) , new org . apache . flink . api . common . Execution... | org . junit . Assert . assertEquals ( 10 , sum ) |
testSpecificSuppression ( ) { net . sourceforge . pmd . Report rpt = new net . sourceforge . pmd . Report ( ) ; runTestFromString ( net . sourceforge . pmd . lang . apex . SuppressWarningsTest . TEST9 , new net . sourceforge . pmd . lang . apex . FooRule ( ) , rpt , net . sourceforge . pmd . lang . LanguageRegistry . g... | org . junit . Assert . assertEquals ( 1 , rpt . size ( ) ) |
getPlayerNameInBothModeReturnsPreviouslyCachedName ( ) { configuration . linkingMethod = "both" ; when ( player . getName ( ) ) . thenReturn ( org . communitybridge . linker . UserPlayerLinkerTest . PLAYER_NAME ) ; when ( userIDDao . getUserID ( org . communitybridge . linker . UserPlayerLinkerTest . PLAYER_NAME ) ) . ... | org . junit . Assert . assertEquals ( org . communitybridge . linker . UserPlayerLinkerTest . PLAYER_NAME , userPlayerLinker . getPlayerName ( org . communitybridge . linker . UserPlayerLinkerTest . NAME_USER_ID ) ) |
noOpacitySetWithoutStrokeRGBA ( ) { com . itextpdf . svg . renderers . impl . AbstractSvgNodeRenderer renderer = new com . itextpdf . svg . renderers . impl . CircleSvgNodeRenderer ( ) ; renderer . setAttribute ( SvgConstants . Attributes . STROKE_OPACITY , "0.75" ) ; renderer . draw ( sdc ) ; com . itextpdf . kernel .... | org . junit . Assert . assertTrue ( resources . getResourceNames ( ) . isEmpty ( ) ) |
testTableReferencesUnionUnknownNode ( ) { final java . lang . String sql = "select<sp>*<sp>from<sp>emp<sp>limit<sp>10" ; final org . apache . calcite . rel . RelNode node = convertSql ( sql ) ; final org . apache . calcite . rel . RelNode nodeWithUnknown = new org . apache . calcite . test . RelMetadataTest . DummyRelN... | org . junit . Assert . assertNull ( tableReferences ) |
testAddIndexOfSameName ( ) { appleTable = table ( "Apple" ) . columns ( column ( "pips" , DataType . STRING , 10 ) . nullable ( ) , column ( "colour" , DataType . STRING , 10 ) . nullable ( ) ) . indexes ( index ( "Apple_1" ) . unique ( ) . columns ( "pips" ) ) ; addIndex = new org . alfasoftware . morf . upgrade . Add... | org . junit . Assert . assertTrue ( re . getMessage ( ) . contains ( "Apple_1" ) ) |
testContext ( ) { jp . co . future . uroborosql . context . SqlContext ctx = jp . co . future . uroborosql . context . SqlContextImplTest . config . contextWith ( "select<sp>*<sp>from<sp>test" ) ; "<AssertPlaceHolder>" ; } context ( ) { return sqlContextFactory . createSqlContext ( ) ; } | org . junit . Assert . assertEquals ( ctx , ctx . context ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.