input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
after_step_hook_scenario_contains_step_failure_when_step_does_not_pass ( ) { java . lang . Throwable expectedError = new org . junit . AssumptionViolatedException ( "oops" ) ; doThrow ( expectedError ) . when ( definitionMatch ) . runStep ( any ( cucumber . runner . Scenario . class ) ) ; doThrow ( new java . lang . Ex... | org . junit . Assert . assertThat ( scenario . getError ( ) , org . hamcrest . core . Is . is ( expectedError ) ) |
testRecordQueriesNegativeQueryType ( ) { try { io . sniffy . Sniffer . run ( BaseTest :: executeStatement ) . verify ( 1 , Query . INSERT ) ; org . junit . Assert . fail ( ) ; } catch ( io . sniffy . WrongNumberOfQueriesError e ) { "<AssertPlaceHolder>" ; } } verify ( int , io . sniffy . Threads ) { return verify ( io ... | org . junit . Assert . assertNotNull ( e ) |
supportsServicesThatWithVoidReturnType ( ) { com . avanza . astrix . remoting . server . AstrixRemotingDriver remotingDriver = new com . avanza . astrix . remoting . server . AstrixRemotingDriver ( ) ; final java . util . concurrent . BlockingQueue < java . lang . String > receivedRequest = new java . util . concurrent... | org . junit . Assert . assertEquals ( "kalle" , lastReceivedRequest ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . ioc . iioccontainer . exception . DeletionException exception = new info . smart_tools . smartactors . ioc . iioccontainer . exception . DeletionException ( str ) ; "<AssertPlaceHolder>" ; throw exception ; } getMessage ( ) ... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
testOnSourceDataTagValueUpdateRequestProcess ( ) { cern . c2mon . daq . common . conf . core . ConfigurationController configurationController = getBasicConfigurationController ( ) ; cern . c2mon . daq . common . messaging . impl . RequestController handler = new cern . c2mon . daq . common . messaging . impl . Request... | org . junit . Assert . assertTrue ( ( ( response . getAllDataTagValueObjects ( ) . size ( ) ) == 3 ) ) |
testIssue1526 ( ) { java . lang . String code = org . apache . commons . io . IOUtils . toString ( this . getClass ( ) . getResourceAsStream ( "TableCollectionExpressionIssue1526.pls" ) , StandardCharsets . UTF_8 ) ; net . sourceforge . pmd . lang . plsql . ast . ASTInput input = parsePLSQL ( code ) ; "<AssertPlaceHold... | org . junit . Assert . assertNotNull ( input ) |
testGetProcessDefinition ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( nl . bzk . migratiebrp . isc . jbpm . common . jsf . JbpmJsfUtil . class ) ; org . mockito . Mockito . when ( nl . bzk . migratiebrp . isc . jbpm . common . jsf . JbpmJsfUtil . getTaskInstance ( ) ) . thenReturn ( task ) ; org ... | org . junit . Assert . assertEquals ( processDefinition , subject . getProcessDefinition ( ) ) |
testAdjacencyListIteratorRemoveFirst ( ) { edu . ucla . sspace . graph . WeightedDirectedMultigraph < java . lang . String > g = new edu . ucla . sspace . graph . WeightedDirectedMultigraph < java . lang . String > ( ) ; for ( int i = 0 ; i < 10 ; ++ i ) { for ( int j = i + 1 ; j < 10 ; ++ j ) { edu . ucla . sspace . g... | org . junit . Assert . assertEquals ( 9 , adjacencyList . size ( ) ) |
testImgFromImg ( ) { final net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . ByteType > img = ops . create ( ) . img ( new net . imglib2 . FinalDimensions ( 1 ) , new net . imglib2 . type . numeric . integer . ByteType ( ) ) ; @ net . imagej . ops . create . SuppressWarnings ( "unchecked" ) final n... | org . junit . Assert . assertEquals ( img . firstElement ( ) . getClass ( ) , newImg . firstElement ( ) . getClass ( ) ) |
UponLeaving_LeavingActionsExecuted ( ) { com . github . oxo42 . stateless4j . StateRepresentation < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > stateRepresentation = CreateRepresentation ( State . A ) ; com . github . oxo42 . stateless4j . transitions . Transition < com .... | org . junit . Assert . assertEquals ( transition , actualTransition ) |
testRelations ( ) { uk . gov . dstl . baleen . uima . BaleenCollectionReader bcr = getCollectionReader ( Re3dReader . PARAM_FOLDER , uk . gov . dstl . baleen . collectionreaders . re3d . Re3dReaderTest . tmpDir . toAbsolutePath ( ) . toString ( ) , Re3dReader . PARAM_ENTITIES , true , Re3dReader . PARAM_RELATIONSHIPS ,... | org . junit . Assert . assertTrue ( bcr . doHasNext ( ) ) |
testAddItem ( ) { final org . uberfire . ext . widgets . core . client . tree . TreeItem childTreeItem = mock ( org . uberfire . ext . widgets . core . client . tree . TreeItem . class ) ; when ( childTreeItem . getType ( ) ) . thenReturn ( TreeItem . Type . ITEM ) ; final org . uberfire . ext . widgets . core . client... | org . junit . Assert . assertEquals ( treeItem1 , childTreeItem ) |
testGetSearchResult ( ) { "<AssertPlaceHolder>" ; } getSearchResult ( ) { return this . searchResult ; } | org . junit . Assert . assertEquals ( result , event . getSearchResult ( ) ) |
testNamedQueryGetSingleResultCount ( ) { java . lang . String queryName = "DictionaryCategory.getCount" ; org . dayatang . persistence . hibernate . NamedQuery query = new org . dayatang . persistence . hibernate . NamedQuery ( repository , queryName ) . addParameter ( "name" , "gender" ) ; "<AssertPlaceHolder>" ; } ge... | org . junit . Assert . assertEquals ( 1L , repository . getSingleResult ( query ) ) |
testReadShortString ( ) { final java . lang . String s = "" ; final int len = s . getBytes ( "UTF-8" ) . length ; final java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( ( 2 + len ) ) ; buffer . putShort ( ( ( short ) ( len ) ) ) ; buffer . put ( s . getBytes ( "UTF-8" ) ) ; buffer . rewind ( ) ; "<... | org . junit . Assert . assertEquals ( s , com . leansoft . luxun . utils . Utils . readShortString ( buffer ) ) |
testReadFrom ( ) { channelBuffer = org . jboss . netty . buffer . ChannelBuffers . copiedBuffer ( tlv ) ; ipInterfaceAddressTlv . readFrom ( channelBuffer ) ; "<AssertPlaceHolder>" ; } interfaceAddress ( ) { return interfaceAddress ; } | org . junit . Assert . assertThat ( ipInterfaceAddressTlv . interfaceAddress ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testPoolNotYetActive ( ) { org . candlepin . model . Pool pool = createPool ( owner , product , 100L , org . candlepin . test . TestUtil . createDate ( 2050 , 3 , 2 ) , org . candlepin . test . TestUtil . createDate ( 2055 , 3 , 2 ) ) ; poolCurator . create ( pool ) ; java . util . List < org . candlepin . model . Pool... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testValidateSubscriptionWithExternalPriceMdel_notExtPriceModel ( ) { org . oscm . internal . vo . VOSubscriptionDetails subscription = new org . oscm . internal . vo . VOSubscriptionDetails ( ) ; org . oscm . internal . vo . VOPriceModel voPriceModel = new org . oscm . internal . vo . VOPriceModel ( ) ; voPriceModel . ... | org . junit . Assert . assertTrue ( ( result == null ) ) |
should_get_named_service_with_Provides_bean ( ) { final java . util . List < com . github . greengerong . named . NamedService > namedServices = injector . getInstance ( new com . google . inject . Key < java . util . List < com . github . greengerong . named . NamedService > > ( ) { } ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( namedServices . size ( ) , org . hamcrest . core . Is . is ( 2 ) ) |
testPoolWhenOneSingleThreadedCaller ( ) { final int maxPoolSize = 3 ; final int poolTimeout = 1000 ; final io . confluent . kafkarest . unit . SimpleConsumerPool pool = new io . confluent . kafkarest . unit . SimpleConsumerPool ( maxPoolSize , poolTimeout , new io . confluent . kafkarest . unit . SystemTime ( ) , simpl... | org . junit . Assert . assertTrue ( ( ( pool . size ( ) ) == 1 ) ) |
testDeleteProcessInstanceInfoLogByDate ( ) { int p = 0 ; java . util . Date endDate = pilTestData [ ( p ++ ) ] . getEnd ( ) ; org . kie . internal . runtime . manager . audit . query . ProcessInstanceLogDeleteBuilder updateBuilder = this . processInstanceLogDelete ( ) . endDate ( endDate ) ; int result = updateBuilder ... | org . junit . Assert . assertEquals ( 1 , result ) |
testLandscapeRightRotation ( ) { org . openqa . selenium . DeviceRotation landscapeRightRotation = new org . openqa . selenium . DeviceRotation ( 0 , 0 , 90 ) ; driver . rotate ( landscapeRightRotation ) ; "<AssertPlaceHolder>" ; } rotation ( ) { org . openqa . selenium . remote . Response response = execute ( DriverCo... | org . junit . Assert . assertEquals ( driver . rotation ( ) , landscapeRightRotation ) |
testBooleanConstructor ( ) { java . lang . Boolean expectedValue = false ; de . metanome . algorithm_integration . configuration . ConfigurationSettingBoolean setting = new de . metanome . algorithm_integration . configuration . ConfigurationSettingBoolean ( expectedValue ) ; "<AssertPlaceHolder>" ; } getValue ( ) { re... | org . junit . Assert . assertEquals ( expectedValue , setting . getValue ( ) ) |
testConnStringNoReadPreference ( ) { final io . vertx . ext . mongo . impl . config . ConnectionString connString = new io . vertx . ext . mongo . impl . config . ConnectionString ( "mongodb://localhost:27017/mydb?replicaSet=myapp" ) ; io . vertx . ext . mongo . impl . config . ReadPreference rp = new io . vertx . ext ... | org . junit . Assert . assertNull ( rp ) |
decodeStringTest ( ) { com . ociweb . pronghorn . pipe . Pipe < com . ociweb . pronghorn . pipe . RawDataSchema > pipe = new com . ociweb . pronghorn . pipe . Pipe < com . ociweb . pronghorn . pipe . RawDataSchema > ( new com . ociweb . pronghorn . pipe . PipeConfig < com . ociweb . pronghorn . pipe . RawDataSchema > (... | org . junit . Assert . assertTrue ( ( ( stest . compareTo ( "This<sp>is<sp>a<sp>test" ) ) == 0 ) ) |
testHashCode ( ) { final org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl annotBuilderImpl = new org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl ( org . opendaylight . mdsal . binding . model . api .... | org . junit . Assert . assertFalse ( ( ( annotBuilderImpl . hashCode ( ) ) == ( annotBuilderImpl2 . hashCode ( ) ) ) ) |
testFindAll ( ) { org . kuali . rice . core . api . criteria . QueryResults allResults = mock ( org . kuali . rice . core . api . criteria . QueryResults . class ) ; org . kuali . rice . core . api . criteria . QueryByCriteria query = QueryByCriteria . Builder . create ( ) . build ( ) ; when ( mockProvider . findAll ( ... | org . junit . Assert . assertSame ( allResults , service . findAll ( java . lang . Object . class ) ) |
testGetSubResourceDefinitions ( ) { final org . apache . ambari . server . api . resources . ComponentStackVersionResourceDefinition resourceDefinition = new org . apache . ambari . server . api . resources . ComponentStackVersionResourceDefinition ( null ) ; final java . util . Set < org . apache . ambari . server . a... | org . junit . Assert . assertEquals ( 1 , subResourceDefinitions . size ( ) ) |
testCorrectePeriode ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > objectenDieDeRegelOvertreden = brby0904 . voerRegelUit ( null , maakPersoonOverlijden ( maakLand ( "24" , "land" , 19000101 , null ) , 19000101 ) , maakActie ( "id.actie1" , 19000101 , null ) , null ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( 0 , objectenDieDeRegelOvertreden . size ( ) ) |
testForEachThrowingException ( ) { ch . lambdaj . List < ch . lambdaj . Person > personInFamily = asList ( new ch . lambdaj . Person ( "Domenico" ) , new ch . lambdaj . Person ( "Mario" ) , new ch . lambdaj . PersonThrowingException ( ) ) ; try { forEach ( personInFamily ) . setLastName ( "Fusco" ) ; org . junit . Asse... | org . junit . Assert . assertEquals ( "Cannot<sp>set<sp>last<sp>name" , e . getMessage ( ) ) |
testFixInstance ( ) { org . jacoco . core . analysis . ICounter c1 = org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 30 , 30 ) ; org . jacoco . core . analysis . ICounter c2 = org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 30 , 30 ) ; "<AssertPlaceHolder>" ; } getInstanc... | org . junit . Assert . assertSame ( c1 , c2 ) |
testUpdateCollectionWithMatcherWillNotRemoveItemNotPresentInSourceIfRemoveOrphansIsFalse ( ) { com . codiform . moo . CollectionUpdateTest . ValueDtoList dtoList = new com . codiform . moo . CollectionUpdateTest . ValueDtoList ( new com . codiform . moo . CollectionUpdateTest . ValueDto ( 1 , "Updated<sp>First" ) , new... | org . junit . Assert . assertEquals ( 3 , valueSet . size ( ) ) |
testGetDependencies ( ) { java . util . Set < org . drugis . addis . entities . Entity > expected = new java . util . HashSet < org . drugis . addis . entities . Entity > ( ) ; expected . add ( d_BRAnalysis . getIndication ( ) ) ; expected . addAll ( d_BRAnalysis . getCriteria ( ) ) ; org . drugis . addis . util . Enti... | org . junit . Assert . assertEquals ( expected , d_BRAnalysis . getDependencies ( ) ) |
andSeparatedByOrWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String subQueryJPQL = "select<sp>sub.id<sp>from<sp>RegularEntityOne<sp>sub<sp>where<sp>(sub.stringAttribute<sp>=<sp>'Just<sp>a<sp>String<sp>02'<sp>and<sp>sub.longAttributeOne<sp>=<sp>33)<sp>or<sp>(sub.booleanAttributeTwo<sp>=<sp>true<sp>a... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) ) |
testModifyTicketExpireEmptyDate ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyExpiration ( ticketId , "" ) ; "<AssertPlaceHolder>" ; } instanceForModifyExpiration ( java . lang . String , java . lang . String ) { if ( ... | org . junit . Assert . assertNotNull ( pi ) |
test_getType ( ) { "<AssertPlaceHolder>" ; } getType ( ) { com . psddev . dari . db . ObjectType type = getDatabase ( ) . getEnvironment ( ) . getTypeById ( getTypeId ( ) ) ; if ( type == null ) { for ( java . lang . Object object : linkedObjects . values ( ) ) { if ( ( object instanceof com . psddev . dari . db . Obje... | org . junit . Assert . assertThat ( ref . getType ( ) , equalTo ( java . lang . String . class ) ) |
getAttribute ( ) { java . lang . String name = "name" ; this . validate ( ( session ) -> session . getAttribute ( name ) ) ; org . wildfly . clustering . web . session . SessionManager < org . wildfly . clustering . web . undertow . session . LocalSessionContext , org . wildfly . clustering . ee . Batch > manager = moc... | org . junit . Assert . assertSame ( expected , result ) |
testStatusAndDescriptionComparisonTrue ( ) { cern . c2mon . shared . common . datatag . DataTagQuality quality = new cern . c2mon . shared . common . datatag . DataTagQualityImpl ( TagQualityStatus . EQUIPMENT_DOWN , null ) ; "<AssertPlaceHolder>" ; } isInvalidStatusSetWithSameDescription ( cern . c2mon . shared . comm... | org . junit . Assert . assertTrue ( quality . isInvalidStatusSetWithSameDescription ( TagQualityStatus . EQUIPMENT_DOWN , "" ) ) |
testBuildWithParameters ( ) { java . lang . String name = "name" ; org . lnu . is . domain . wave . type . WaveType context = new org . lnu . is . domain . wave . type . WaveType ( ) ; context . setName ( name ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>WaveType<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>C... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testEmptyUnmodIterator ( ) { "<AssertPlaceHolder>" ; } emptyUnmodIterator ( ) { return ( ( org . organicdesign . fp . collections . UnmodIterator < T > ) ( org . organicdesign . fp . collections . UnmodIterator . UnIterator . EMPTY ) ) ; } | org . junit . Assert . assertFalse ( org . organicdesign . fp . collections . UnmodIterator . emptyUnmodIterator ( ) . hasNext ( ) ) |
build_shouldInitPriceField ( ) { com . kiroule . example . springjpaunitils . domain . Book b = builder . price ( com . kiroule . example . springjpaunitils . domain . builder . BookBuilderTest . PRICE ) . build ( ) ; "<AssertPlaceHolder>" ; } getPrice ( ) { return price ; } | org . junit . Assert . assertEquals ( com . kiroule . example . springjpaunitils . domain . builder . BookBuilderTest . PRICE , b . getPrice ( ) ) |
testExclusion ( ) { com . sap . hcp . cf . logback . converter . ContextPropsConverter cpc = new com . sap . hcp . cf . logback . converter . ContextPropsConverter ( ) ; cpc . setOptionList ( asList ( com . sap . hcp . cf . logback . converter . SOME_KEY ) ) ; cpc . start ( ) ; org . slf4j . MDC . clear ( ) ; org . slf... | org . junit . Assert . assertThat ( actMap , org . hamcrest . core . Is . is ( mdcMap ( asList ( com . sap . hcp . cf . logback . converter . SOME_KEY ) ) ) ) |
testNormalInitialization ( ) { org . databene . contiperf . WaitTimer timer = org . databene . contiperf . timer . ConstantTimer . class . newInstance ( ) ; timer . init ( new double [ ] { 123 } ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { "<AssertPlaceHolder>" ; } } getWaitTime ( ) { return ( min ) + ( random . nextInt (... | org . junit . Assert . assertEquals ( 123 , timer . getWaitTime ( ) ) |
postToOpenCloseAndLaterOpenByOthersTest ( ) { listsService . setPublic ( token , openList . getStateToken ( ) , false ) ; listsService . setPublic ( token , openList . getStateToken ( ) , true ) ; doLogout ( ) ; doLoginWithDummyUser ( ) ; final cc . kune . core . shared . dto . StateContentDTO newPost = listsService . ... | org . junit . Assert . assertNotNull ( newPost ) |
testGetProjectFromIndexPatternWhenEmpty ( ) { "<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 = reInde... | org . junit . Assert . assertEquals ( Project . EMPTY , utils . getProjectFromIndexPattern ( "" ) ) |
allocateChildProducerWithTxSubmmited ( ) { producer . createTransaction ( false ) . commit ( ) ; final org . opendaylight . mdsal . dom . api . DOMDataTreeProducer childProducer = producer . createProducer ( org . opendaylight . mdsal . dom . broker . ShardedDOMDataTreeProducerSingleShardTest . SUBTREES_TEST ) ; "<Asse... | org . junit . Assert . assertNotNull ( childProducer ) |
test_adjust_LocalDate ( org . threeten . extra . chrono . BritishCutoverDate , java . time . LocalDate , org . threeten . extra . chrono . BritishCutoverDate ) { org . threeten . extra . chrono . BritishCutoverDate test = input . with ( local ) ; "<AssertPlaceHolder>" ; } with ( java . time . temporal . TemporalAdjuste... | org . junit . Assert . assertEquals ( expected , test ) |
testMultipleBREEs ( ) { org . eclipse . tycho . core . osgitools . OsgiManifest manifest = parseManifest ( "bree.mf" ) ; org . eclipse . tycho . core . ee . shared . ExecutionEnvironment [ ] expected = new org . eclipse . tycho . core . ee . shared . ExecutionEnvironment [ ] { org . eclipse . tycho . core . ee . Execut... | org . junit . Assert . assertArrayEquals ( expected , manifest . getExecutionEnvironments ( ) ) |
shipmentViolationAtAct3_shouldWork ( ) { buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore ( ) ; com . graphhopper . jsprit . core . analysis . SolutionAnalyser analyser = new com . graphhopper . jsprit . core . analysis . SolutionAnalyser ( vrp , solution , vrp . getTransportCosts ( ) ) ; com . grap... | org . junit . Assert . assertFalse ( violation ) |
tesStringOneArgLocaleUs_MessageFormatMessage ( ) { final java . lang . String testMsg = "Test<sp>message<sp>{0,number,currency}" ; final org . apache . logging . log4j . message . FormattedMessage msg = new org . apache . logging . log4j . message . FormattedMessage ( java . util . Locale . US , testMsg , 12 ) ; final ... | org . junit . Assert . assertEquals ( expected , result ) |
testListDirectories ( ) { java . util . List < java . io . File > testFiles = new java . util . ArrayList ( org . bff . javampd . integrationdata . TestFiles . getRootTestFiles ( testProperties . getPath ( ) ) ) ; for ( java . io . File f : testFiles ) { boolean found = false ; for ( org . bff . javampd . file . MPDFil... | org . junit . Assert . assertTrue ( found ) |
testGetRaDetailByDateDateDateLocale ( ) { org . oscarehr . common . dao . RaHeaderDao raHeaderDao = ( ( org . oscarehr . common . dao . RaHeaderDao ) ( org . oscarehr . util . SpringUtils . getBean ( org . oscarehr . common . dao . RaHeaderDao . class ) ) ) ; java . lang . String paymentDate1 = "20130101" ; java . lang... | org . junit . Assert . assertTrue ( true ) |
profile ( ) { conf . setMapperClass ( WordCount . TokenizerMapper . class ) ; conf . setCombinerClass ( WordCount . SumCombiner . class ) ; conf . setMapOutputKeySchema ( com . aliyun . odps . mapred . utils . SchemaUtils . fromString ( "word:string" ) ) ; conf . setMapOutputValueSchema ( com . aliyun . odps . mapred .... | org . junit . Assert . assertEquals ( 100000 , sum ) |
shouldConvertLongWrapped ( ) { final com . tinkerpop . blueprints . Vertex v = graph . addVertex ( new java . lang . Long ( 1 ) ) ; "<AssertPlaceHolder>" ; } convertIdentifier ( java . lang . Object ) { if ( id instanceof java . lang . Long ) return ( ( java . lang . Long ) ( id ) ) ; long identifier = - 1L ; if ( id !... | org . junit . Assert . assertEquals ( 1L , handler . convertIdentifier ( v ) ) |
testAppendBase16 ( ) { @ org . jetbrains . annotations . NotNull net . openhft . chronicle . bytes . Bytes b = alloc1 . elasticBytes ( 16 ) ; for ( long value : new long [ ] { Long . MIN_VALUE , Integer . MIN_VALUE , - 1 , 0 , 1 , Integer . MAX_VALUE , Long . MAX_VALUE } ) { java . lang . String s = java . lang . Long ... | org . junit . Assert . assertEquals ( s , b . toString ( ) ) |
testCreate ( ) { org . yes . cart . domain . dto . AssociationDTO dto = getDto ( ) ; dto = dtoAssociationService . create ( dto ) ; "<AssertPlaceHolder>" ; dtoAssociationService . remove ( dto . getAssociationId ( ) ) ; } getAssociationId ( ) { return associationId ; } | org . junit . Assert . assertTrue ( ( ( dto . getAssociationId ( ) ) > 0 ) ) |
testRegisterFileWriter ( ) { java . lang . String id = "1" ; org . pentaho . di . core . logging . LoggingRegistry loggingRegistry = org . pentaho . di . core . logging . LoggingRegistry . getInstance ( ) ; org . pentaho . di . core . logging . LogChannelFileWriterBuffer buffer = new org . pentaho . di . core . logging... | org . junit . Assert . assertNotNull ( loggingRegistry . getLogChannelFileWriterBuffer ( id ) ) |
testGetOwnedOperation2 ( ) { if ( ! ( org . dresdenocl . metamodels . test . MetaModelTestServices . supportsNoOperations ) ) { java . util . List < org . dresdenocl . pivotmodel . Operation > operations ; boolean foundOperation1 ; boolean foundOperation2 ; java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>T... | org . junit . Assert . assertTrue ( msg , foundOperation2 ) |
getPathReturnsPath ( ) { final java . lang . String iotHubHostname = "sample.iothubhostname" ; final java . lang . String deviceId = "sample-deviceid" ; final java . lang . String iotHubMethodPath = "/sample-path" ; com . microsoft . azure . sdk . iot . device . net . IotHubUri uri = new com . microsoft . azure . sdk .... | org . junit . Assert . assertThat ( testPath , org . hamcrest . CoreMatchers . is ( expectedPath ) ) |
testCursorsOnRHSLiteralExpressionOnLHS ( ) { java . lang . String tenantId = getOrganizationId ( ) ; java . lang . String aTable = initATableValues ( null , tenantId , getDefaultSplits ( tenantId ) , null , null , getUrl ( ) , null ) ; java . lang . String query = ( ( ( "SELECT<sp>a_integer,<sp>x_integer<sp>FROM<sp>" +... | org . junit . Assert . assertTrue ( ( count == 3 ) ) |
testShouldResendEmailYes ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( "2018-06-08T14:00:00.000-07:00" ) ; doReturn ( now ) . when ( dateTimeUtils ) . now ( ) ; org . joda . time . DateTime previousEmailDateTime = new org . joda . time . DateTime ( "2018-06-08T12:00:00.000-07:00" ) ; boole... | org . junit . Assert . assertTrue ( shouldResendEmail ) |
emptyCollection ( ) { final eu . europa . esig . dss . util . TimeDependentValues < eu . europa . esig . dss . util . BaseTimeDependent > coll = new eu . europa . esig . dss . util . TimeDependentValues < eu . europa . esig . dss . util . BaseTimeDependent > ( ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return immutab... | org . junit . Assert . assertFalse ( coll . iterator ( ) . hasNext ( ) ) |
testGetStorageAttributeIntegerValueByNameWithDefault_4 ( ) { java . lang . String attributeName = "test" ; java . lang . String attributeValue = "1234" ; org . finra . herd . model . jpa . StorageEntity storageEntity = storageDaoTestHelper . createStorageEntityWithAttributes ( attributeName , attributeValue ) ; java . ... | org . junit . Assert . assertEquals ( new java . lang . Integer ( attributeValue ) , value ) |
testParseNoLoginBefore ( ) { final com . atlassian . jira . rest . client . internal . json . LoginInfoJsonParser parser = new com . atlassian . jira . rest . client . internal . json . LoginInfoJsonParser ( ) ; final com . atlassian . jira . rest . client . api . domain . LoginInfo loginInfo = parser . parse ( com . a... | org . junit . Assert . assertEquals ( new com . atlassian . jira . rest . client . api . domain . LoginInfo ( 0 , 1 , null , null ) , loginInfo ) |
testSetEffectiveClientFaultPolicy ( ) { engine = new org . apache . cxf . ws . policy . PolicyEngineImpl ( ) ; org . apache . cxf . service . model . EndpointInfo ei = createMockEndpointInfo ( ) ; org . apache . cxf . service . model . BindingFaultInfo bfi = new org . apache . cxf . service . model . BindingFaultInfo (... | org . junit . Assert . assertSame ( epi , engine . getEffectiveClientFaultPolicy ( ei , null , bfi , msg ) ) |
testRemoveDDMFormInstanceRecordWriter ( ) { com . liferay . dynamic . data . mapping . io . internal . exporter . DDMFormInstanceRecordWriterTrackerImpl ddmFormInstanceRecordWriterTracker = new com . liferay . dynamic . data . mapping . io . internal . exporter . DDMFormInstanceRecordWriterTrackerImpl ( ) ; addDDMFormI... | org . junit . Assert . assertNull ( ddmFormInstanceRecordWriter ) |
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ihe . operations . PayerEntryOperations obj = new org . openhealthtools . mdht . uml . cda . ihe . operations . PayerEntryOperations ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testGetCurrentTransaction ( ) { try ( final io . vertigo . commons . transaction . VTransactionWritable currentTransaction = transactionManager . createCurrentTransaction ( ) ) { "<AssertPlaceHolder>" ; currentTransaction . rollback ( ) ; } } getCurrentTransaction ( ) { return transactionManager . getCurrentTransaction... | org . junit . Assert . assertEquals ( currentTransaction , transactionManager . getCurrentTransaction ( ) ) |
testRemoveSchemaSelect ( ) { java . lang . String sql = "select<sp>id<sp>as<sp>'aa'<sp>from<sp>test<sp>where<sp>name='abcdtestx.aa'<sp>and<sp>id=1<sp>and<sp>testx=123" ; java . lang . String afterAql = io . mycat . route . util . RouterUtil . removeSchema ( sql , "testx" ) ; "<AssertPlaceHolder>" ; } removeSchema ( jav... | org . junit . Assert . assertEquals ( sql , afterAql ) |
testImportFileLocationInSubdir ( ) { java . lang . String slave = "parser<sp>grammar<sp>S;\n" + "a<sp>:<sp>B<sp>{System.out.println(\"S.a\");}<sp>;\n" ; mkdir ( tmpdir ) ; java . lang . String subdir = ( tmpdir ) + "/sub" ; mkdir ( subdir ) ; writeFile ( subdir , "S.g4" , slave ) ; java . lang . String master = "gramma... | org . junit . Assert . assertEquals ( 0 , equeue . size ( ) ) |
testRetryDurationZero ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) { try { beanC . connectCDurationZero ( ) ; org . junit . Assert . fail ( "Exception<sp>not<sp>thrown" ) ; } catch ( com . ibm . ws . microprofile . faulttolerance_fat . util . ConnectException e ) { } "<... | org . junit . Assert . assertThat ( beanC . getConnectCount ( ) , org . hamcrest . Matchers . is ( 6 ) ) |
testStep ( ) { final net . imglib2 . type . numeric . integer . LongType in = new net . imglib2 . type . numeric . integer . LongType ( 1234567890 ) ; final net . imglib2 . type . numeric . real . DoubleType out = new net . imglib2 . type . numeric . real . DoubleType ( ) ; ops . run ( net . imagej . ops . math . Unary... | org . junit . Assert . assertEquals ( out . get ( ) , 1.0 , 0.0 ) |
testLoadByHashKeyAndRangeKey_WhenDynamoDBMapperReturnsNull ( ) { org . socialsignin . spring . data . dynamodb . domain . sample . Playlist playlist = dynamoDBTemplate . load ( org . socialsignin . spring . data . dynamodb . domain . sample . Playlist . class , "someHashKey" , "someRangeKey" ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertNull ( playlist ) |
test_GetHyperlink_By_AutomationId ( ) { when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationHyperlink link = spyWndw . getHyperlink ( mmarquee . automation . controls... | org . junit . Assert . assertEquals ( targetElement , link . getElement ( ) ) |
testStrToDate_20130101 ( ) { java . util . Calendar cal = new java . util . GregorianCalendar ( 2013 , 0 , 1 ) ; java . util . Date expected = cal . getTime ( ) ; java . lang . String fixture = "2013/01/01" ; try { java . util . Date actual = info . michaelkohler . helpertools . date . DateFormatHelper . strToDate ( fi... | org . junit . Assert . assertTrue ( actual . equals ( expected ) ) |
test4 ( ) { java . lang . String [ ] vars = new java . lang . String [ ] { "x" , "y" , "z" } ; cc . redberry . rings . poly . MultivariateRing < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > polyRing = cc . redberry . rings . Rings . MultivariateRing ... | org . junit . Assert . assertEquals ( a , b ) |
getProvidersByRole_shouldReturnEmptySetForNoRole ( ) { org . openmrs . Encounter encounter = new org . openmrs . Encounter ( ) ; org . openmrs . EncounterRole role = new org . openmrs . EncounterRole ( ) ; org . openmrs . Provider provider = new org . openmrs . Provider ( ) ; encounter . addProvider ( role , provider )... | org . junit . Assert . assertEquals ( 0 , providers . size ( ) ) |
testShouldAlphaShareNotEqualsInDifferentPackages ( ) { final java . lang . String drl1 = ( ( ( ( ( ( ( "package<sp>iTzXzx;\n" 1 + "import<sp>" ) + ( org . drools . compiler . integrationtests . SharingTest . TestObject . class . getCanonicalName ( ) ) ) + "\n" ) + "rule<sp>fileArule1<sp>when\n" ) + "<sp>TestObject(valu... | org . junit . Assert . assertEquals ( 2 , kieSession . fireAllRules ( ) ) |
publishWithProof ( ) { com . restfb . DefaultFacebookClient client = new com . restfb . DefaultFacebookClient ( getTestSettings ( ) . getUserAccessToken ( ) , getTestSettings ( ) . getAppSecret ( ) , com . restfb . Version . LATEST ) ; com . restfb . json . JsonObject me = client . publish ( "/me/feed" , com . restfb .... | org . junit . Assert . assertNotNull ( me ) |
getAllConceptSources_shouldReturnAllConceptSourcesExcludingRetiredOnesWhenGivenFalse ( ) { int conceptSourcesInDataset = 3 ; java . util . List < org . openmrs . ConceptSource > conceptSources = conceptService . getAllConceptSources ( false ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( )... | org . junit . Assert . assertEquals ( conceptSourcesInDataset , conceptSources . size ( ) ) |
testExists_False ( ) { initializeExpectedNetwork ( 2 ) ; com . google . cloud . compute . deprecated . Compute [ ] expectedOptions = new Compute . NetworkOption [ ] { Compute . NetworkOption . fields ( ) } ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( compute . getNetwork ( com . google .... | org . junit . Assert . assertFalse ( network . exists ( ) ) |
testSimple ( ) { java . lang . String s = "console" ; com . cloudera . flume . core . EventSink sink = com . cloudera . flume . conf . FlumeBuilder . buildSink ( new com . cloudera . flume . conf . Context ( ) , s ) ; java . util . Map < java . lang . String , com . cloudera . flume . reporter . ReportEvent > reports =... | org . junit . Assert . assertTrue ( r . contains ( ( "X." + ( sink . getName ( ) ) ) ) ) |
bytesFromBigInt ( ) { int byte_size = 48 ; java . math . BigInteger bigInteger = new java . math . BigInteger ( "13190295509826637194583200125168488859623001289643321872497025844241981297292953903419783680940401133507992851240799" ) ; byte [ ] outBytes = new byte [ Kerl . BYTE_HASH_LENGTH ] ; com . iota . iri . crypto ... | org . junit . Assert . assertTrue ( bigInteger . equals ( out_bigInteger ) ) |
simpleQueryOnSeveralFields_OR ( ) { demo . Account example = new demo . Account ( ) ; example . setLastName ( "Jag" ) ; example . setBirthDate ( new java . util . Date ( ) ) ; demo . SearchParameters sp = new demo . SearchParameters ( ) . orMode ( ) . orderBy ( OrderByDirection . ASC , Account_ . lastName ) . startingL... | org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
whenSendPostRequestWithAuthorization_thenCorrect ( ) { final java . lang . String postBody = "test<sp>post" ; final okhttp3 . Request request = new okhttp3 . Request . Builder ( ) . url ( com . baeldung . okhttp . OkHttpPostingLiveTest . URL_SECURED_BY_BASIC_AUTHENTICATION ) . addHeader ( "Authorization" , okhttp3 . Cr... | org . junit . Assert . assertThat ( response . code ( ) , org . hamcrest . Matchers . equalTo ( 200 ) ) |
testBothEmbeddedIsNull ( ) { org . tests . model . embedded . EMain emain1 = createEMain ( ) ; emain1 . setEmbeddable ( null ) ; org . tests . model . embedded . EMain emain2 = createEMain ( ) ; emain2 . setEmbeddable ( null ) ; java . util . Map < java . lang . String , io . ebean . ValuePair > diff = io . ebeanintern... | org . junit . Assert . assertEquals ( 0 , diff . size ( ) ) |
testNotBlankMsgEmptyStringShouldThrow ( ) { final java . lang . String string = "" ; try { org . apache . commons . lang3 . Validate . notBlank ( string , "Message" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( final java . lang . IllegalArgumentException e ) { "<AssertPlaceHol... | org . junit . Assert . assertEquals ( "Message" , e . getMessage ( ) ) |
testAccountingServerSessionStartsIdleState ( ) { org . jdiameter . api . acc . ServerAccSession session = getAppSession ( org . jdiameter . api . acc . ServerAccSession . class , new org . jdiameter . common . impl . app . acc . AccSessionFactoryImpl ( org . mobicents . diameter . stack . sessions . SessionsWithAppIdTe... | org . junit . Assert . assertEquals ( state . IDLE , state ) |
testIntModulo ( ) { executeWithDefaultScope ( "intVar<sp>=<sp>42<sp>%<sp>2" ) ; "<AssertPlaceHolder>" ; } getIntValue ( ) { return context . getVariable ( "intVar" ) . getValue ( ) ; } | org . junit . Assert . assertEquals ( 0L , getIntValue ( ) ) |
testUnCapitalize6 ( ) { java . lang . Object target = "Abc<sp>Def" ; java . lang . String expResult = "abc<sp>Def" ; java . lang . String result = org . thymeleaf . util . StringUtils . unCapitalize ( target ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
parsesGivenSourceAndRegistersParsedTemplates ( ) { javax . xml . transform . Source source = mock ( javax . xml . transform . Source . class ) ; javax . xml . transform . Templates templates = mock ( javax . xml . transform . Templates . class ) ; when ( templatesParser . parseTemplates ( source ) ) . thenReturn ( temp... | org . junit . Assert . assertSame ( templates , xsltTemplatesContextResolver . getTemplates ( "templates<sp>1" ) ) |
test2 ( ) { com . creactiviti . piper . core . MapObject mo = new com . creactiviti . piper . core . MapObject ( java . util . Collections . singletonMap ( "number" , "5" ) ) { } ; "<AssertPlaceHolder>" ; } getInteger ( java . lang . Object ) { return get ( aKey , com . creactiviti . piper . core . Integer . class ) ; ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 5 ) , mo . getInteger ( "number" ) ) |
testTakeUpdatedLease ( ) { software . amazon . kinesis . leases . dynamodb . TestHarnessBuilder builder = new software . amazon . kinesis . leases . dynamodb . TestHarnessBuilder ( leaseRefresher ) ; software . amazon . kinesis . leases . Lease lease = builder . withLease ( "1" ) . build ( ) . get ( "1" ) ; software . ... | org . junit . Assert . assertFalse ( leaseRefresher . takeLease ( leaseCopy , newOwner ) ) |
getAuthorizationListVersionVerifyReturnValue ( ) { int listVersion = 1 ; when ( chargePointService . getLocalListVersion ( any ( io . motown . ocpp . v15 . soap . chargepoint . GetLocalListVersionRequest . class ) , eq ( io . motown . ocpp . v15 . soap . chargepoint . CHARGING_STATION_ID . getId ( ) ) ) ) . thenReturn ... | org . junit . Assert . assertEquals ( listVersion , authorizationListVersion ) |
mergeShouldHandleAllEmptyIterators ( ) { org . neo4j . kernel . api . impl . fulltext . ScoreEntityIterator one = org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . iteratorOf ( org . neo4j . kernel . api . impl . fulltext . ScoreEntityIteratorTest . emptyEntries ( ) ) ; org . neo4j . kernel . api... | org . junit . Assert . assertFalse ( concat . hasNext ( ) ) |
getNullValueFromScopeResolutionStrategyWithoutDefaultValueTest ( ) { final java . lang . String value = preferenceStore . get ( preferenceScopeResolutionStrategyInfo , org . uberfire . preferences . backend . PreferenceStoreImplTest . KEY ) ; "<AssertPlaceHolder>" ; verify ( storage ) . read ( preferenceScopeResolution... | org . junit . Assert . assertNull ( value ) |
testAddTags ( ) { final com . spotify . metrics . tags . NoopTagExtractor noopTagExtractor = new com . spotify . metrics . tags . NoopTagExtractor ( ) ; final java . util . Map < java . lang . String , java . lang . String > currentMap = com . google . common . collect . ImmutableMap . of ( "foo" , "bar" , "bar" , "baz... | org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableMap . of ( "foo" , "bar" , "bar" , "baz" , "cluster" , "cluster1" ) , out ) |
testAliasWithArgs ( ) { java . lang . String dir = getRandomDir ( ) ; java . lang . String groupFile = "a(x,y)<sp>::=<sp>\"<x><y>\"\n" + "b<sp>::=<sp>a\n" ; writeFile ( dir , "group.stg" , groupFile ) ; org . stringtemplate . v4 . STGroupFile group = new org . stringtemplate . v4 . STGroupFile ( ( dir + "/group.stg" ) ... | org . junit . Assert . assertEquals ( expected , result ) |
Sorted_Overlapping ( ) { java . util . Map < java . lang . Object , java . lang . Object > diff = org . javersion . core . Diff . diff ( org . javersion . core . DiffTest . sorted ( 1 , 1 , 2 , 2 ) , org . javersion . core . DiffTest . sorted ( 2 , 2 , 3 , 3 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( diff , org . hamcrest . Matchers . equalTo ( org . javersion . core . DiffTest . sorted ( 1 , null , 3 , 3 ) ) ) |
deveObterValorUnitarioTributavelComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . math . BigDecimal valorUnitarioTributavel = new java . math . B... | org . junit . Assert . assertEquals ( "9999999999.9999999999" , produto . getValorUnitarioTributavel ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.