input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testCSVSemicolon ( ) { setClipboarText ( "1;2;3;4" ) ; final java . util . List < com . rcpcompany . uibindings . utils . IClipboardConverterManager . IResult > res = IClipboardConverterManager . Factory . getManager ( ) . getClipboardConversions ( ) ; "<AssertPlaceHolder>" ; testOneResult ( res . get ( 0 ) , 1 , new j... | org . junit . Assert . assertEquals ( 2 , res . size ( ) ) |
deleteUnknown ( ) { final java . lang . String s = "{\"delete\":{\"unknown\":{\"id\":601430178305220600,\"id_str\":\"601430178305220600\",\"user_id\":3198576760,\"user_id_str\":\"3198576760\"},\"timestamp_ms\":\"1432228155593\"}}" ; final com . zaubersoftware . gnip4j . api . model . Activity result = unmarshaller . un... | org . junit . Assert . assertNull ( result ) |
testHappyFlowAfnemerindicatie ( ) { final nl . bzk . brp . domain . internbericht . selectie . SelectieVerwerkTaakBericht selectieTaak = new nl . bzk . brp . domain . internbericht . selectie . SelectieVerwerkTaakBericht ( ) ; final int selectieRunId = 1 ; selectieTaak . setSelectieRunId ( selectieRunId ) ; final java ... | org . junit . Assert . assertTrue ( selectieTaakResultaat . getOngeldigeTaken ( ) . isEmpty ( ) ) |
getNumberOfUsersInRole ( ) { final java . lang . String developer = "developer" ; final org . bonitasoft . engine . identity . Role role = getIdentityAPI ( ) . createRole ( developer ) ; final org . bonitasoft . engine . identity . User user1 = getIdentityAPI ( ) . createUser ( "user1" , "bpm" ) ; final org . bonitasof... | org . junit . Assert . assertEquals ( 2 , count ) |
testMoreThan64FieldsWithWatch ( ) { final java . lang . StringBuilder fields = new java . lang . StringBuilder ( ) ; for ( int i = 10 ; i < 100 ; i ++ ) { fields . append ( "<sp>a" ) . append ( i ) . append ( "<sp>:<sp>int\n" ) ; } final java . lang . String str = ( ( ( ( ( ( ( ( ( ( ( ( "<sp>list.add(1);\n" 2 + ( "glo... | org . junit . Assert . assertEquals ( 1 , list . size ( ) ) |
GeoPackageMetadataTableSchema ( ) { java . util . ArrayList < java . util . Map < java . lang . String , java . lang . Object > > expectedColumnDefinitions = new java . util . ArrayList ( ) ; java . util . Map < java . lang . String , java . lang . Object > idColumn = new java . util . HashMap ( ) ; idColumn . put ( "c... | org . junit . Assert . assertEquals ( expectedColumnDefinitions , columnDefinitions ) |
testArrayAccessCaseConstantIndex_02 ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "String[]<sp>ar<sp>=<sp>new<sp>String[]{};" ) ; _builder . newLine ( ) ; _builder . append ( "ar[1]<sp>=<sp>null;" ) ; _builder . newLi... | org . junit . Assert . assertEquals ( _builder_1 . toString ( ) , xtendCode ) |
testReadString ( ) { "<AssertPlaceHolder>" ; } readString ( ) { int length = readInt ( ) ; byte [ ] bytes = new byte [ length ] ; byteBuf . readBytes ( bytes ) ; return new java . lang . String ( bytes , java . nio . charset . StandardCharsets . UTF_8 ) ; } | org . junit . Assert . assertNotNull ( instance . readString ( ) ) |
regex_expr_without_case_insensitive_returns_false ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field1','regex':'Val.*'}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . Qu... | org . junit . Assert . assertFalse ( ctx . getResult ( ) ) |
deleteProductTest ( ) { System . out . print ( "-><sp>deleteProduct()<sp>-<sp>" ) ; java . lang . String view = ua . com . alexcoffee . controller . admin . AdminProductsControllerTest . adminProductsController . deleteProduct ( ua . com . alexcoffee . controller . admin . ID ) ; java . lang . String viewName = "redire... | org . junit . Assert . assertEquals ( view , viewName ) |
testStringSerialization ( ) { com . owlike . genson . Genson genson = createFormatterGenson ( ) ; java . time . Period period = java . time . Period . of ( 1 , 2 , 3 ) ; "<AssertPlaceHolder>" ; } toJsonQuotedString ( java . lang . String ) { return ( "\"" + string ) + "\"" ; } | org . junit . Assert . assertEquals ( toJsonQuotedString ( period . toString ( ) ) , genson . serialize ( period ) ) |
testMonitoringInfosArePopulatedForUserCounters ( ) { org . apache . beam . runners . core . metrics . MetricsContainerImpl testObject = new org . apache . beam . runners . core . metrics . MetricsContainerImpl ( "step1" ) ; org . apache . beam . runners . core . metrics . CounterCell c1 = testObject . getCounter ( org ... | org . junit . Assert . assertThat ( actualMonitoringInfos , containsInAnyOrder ( builder1 . build ( ) , builder2 . build ( ) ) ) |
testMsgSendSummaryByHour ( ) { java . util . List < me . hao0 . wechat . model . data . msg . MsgSendSummaryHour > summaries = wechat . data ( ) . msgSendSummaryHourly ( accessToken , "2015-11-19" ) ; "<AssertPlaceHolder>" ; System . out . println ( summaries ) ; } msgSendSummaryHourly ( java . lang . String , me . hao... | org . junit . Assert . assertNotNull ( summaries ) |
testGetRowCount ( ) { "<AssertPlaceHolder>" ; } getRowCount ( ) { if ( null != ( data ) ) return 1 ; return 0 ; } | org . junit . Assert . assertEquals ( 2 , data . getRowCount ( ) ) |
testToConnectTimestamp ( ) { java . text . SimpleDateFormat sdf = new java . text . SimpleDateFormat ( "yyyy/MM/dd" ) ; java . util . Date expectedValue = sdf . parse ( "2017/12/31" ) ; com . google . protobuf . Timestamp timestamp = com . google . protobuf . util . Timestamps . fromMillis ( expectedValue . getTime ( )... | org . junit . Assert . assertEquals ( getExpectedSchemaAndValue ( timestampSchema , expectedValue ) , result ) |
testGetParametersWithDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long publicActivityId = 1L ; org . lnu . is . domain . publicactivity . PublicActivity publicActivity = new org . lnu . is . domain . publicactivity . PublicActivity ( ) ; publicActivity . setId ( publi... | org . junit . Assert . assertEquals ( expected , actual ) |
testBadChunks ( ) { java . io . File fn = org . apache . hadoop . fs . slive . TestSlive . getTestFile ( ) ; int byteAm = 10000 ; java . io . FileOutputStream fout = new java . io . FileOutputStream ( fn ) ; byte [ ] bytes = new byte [ byteAm ] ; org . apache . hadoop . fs . slive . TestSlive . rnd . nextBytes ( bytes ... | org . junit . Assert . assertTrue ( ( ( vout . getChunksSame ( ) ) == 0 ) ) |
testMetricLast2 ( ) { com . aliyun . hitsdb . client . value . request . LastPointQuery query = com . aliyun . hitsdb . client . value . request . LastPointQuery . builder ( ) . timestamp ( com . aliyun . hitsdb . client . TestHiTSDBClientLastDataPointQuery . timestamp ) . sub ( com . aliyun . hitsdb . client . value .... | org . junit . Assert . assertEquals ( lastDataValues . size ( ) , 1 ) |
testProducesSortedKeys ( ) { "<AssertPlaceHolder>" ; } producesSortedKeys ( org . talend . components . api . container . RuntimeContainer ) { return false ; } | org . junit . Assert . assertFalse ( source . producesSortedKeys ( container ) ) |
testGetRemoveButton ( ) { com . github . bordertech . wcomponents . test . selenium . element . SeleniumWMultiDropdownWebElement component = getByLabel ( WMultiDropdownTestingExample . LABEL_ALL_SELECTED ) ; org . openqa . selenium . WebElement dropdown = component . getDropdown ( 1 ) ; "<AssertPlaceHolder>" ; } getRem... | org . junit . Assert . assertNotNull ( component . getRemoveButton ( dropdown ) ) |
testGenerateIndependentGenerators ( ) { ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarMod group = ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarMod . getInstance ( ch . bfh . unicrypt . helper . prime . Prime . getInstance ( 23 ) , ch . bfh . unicrypt . helper . prime .... | org . junit . Assert . assertTrue ( group . isGenerator ( g ) ) |
testNullToEmptyGenericEmpty ( ) { final org . apache . commons . lang3 . ArrayUtilsTest . TestClass [ ] input = new org . apache . commons . lang3 . ArrayUtilsTest . TestClass [ ] { } ; final org . apache . commons . lang3 . ArrayUtilsTest . TestClass [ ] output = org . apache . commons . lang3 . ArrayUtils . nullToEmp... | org . junit . Assert . assertSame ( input , output ) |
testThrowCheckedException ( ) { java . io . IOException expected = new java . io . IOException ( "EXPECTED<sp>ERROR" ) ; java . io . IOException actual = null ; try { org . slieb . throwables . LongFunctionWithThrowable . aLongFunctionThatUnsafelyThrowsUnchecked ( ( v1 ) -> { throw expected ; } ) . apply ( 0 ) ; org . ... | org . junit . Assert . assertEquals ( expected , actual ) |
oneBitOneExchangeOneEntryRun ( ) { try ( com . dremio . service . coordinator . ClusterCoordinator clusterCoordinator = com . dremio . service . coordinator . local . LocalClusterCoordinator . newRunningCoordinator ( ) ; com . dremio . exec . server . SabotNode bit1 = new com . dremio . exec . server . SabotNode ( DEFA... | org . junit . Assert . assertEquals ( 100 , count ) |
isServerTypeValid_valid ( ) { org . oscm . app . ror . client . RORClient rorClient = mock ( org . oscm . app . ror . client . RORClient . class ) ; parameters . put ( PropertyHandler . VSERVER_TYPE , new org . oscm . app . v2_0 . data . Setting ( org . oscm . app . iaas . PropertyHandler . VSERVER_TYPE , SERVERTYPE1 )... | org . junit . Assert . assertTrue ( isServerTypeValid ) |
testString32 ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 2048 ; i ++ ) { builder . append ( ( ( char ) ( ( ( java . lang . Math . random ( ) ) * 52 ) + 65 ) ) ) ; } java . lang . String in = builder . toString ( ) ; java . lang . String out = org . fusesource ... | org . junit . Assert . assertEquals ( in , out ) |
testMarshalOtherSchema ( ) { when ( mockMetacardManager . getTransformerBySchema ( org . codice . ddf . spatial . ogc . csw . catalog . converter . TestCswTransformProvider . OTHER_SCHEMA ) ) . thenReturn ( mockMetacardTransformer ) ; when ( mockMetacardTransformer . transform ( any ( ddf . catalog . data . Metacard . ... | org . junit . Assert . assertThat ( outputSchema , org . hamcrest . core . Is . is ( org . codice . ddf . spatial . ogc . csw . catalog . converter . TestCswTransformProvider . OTHER_SCHEMA ) ) |
integerList ( ) { java . util . List < java . lang . Integer > value = java . util . Arrays . asList ( 1 ) ; model . setMyIntegerList ( value ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com... | org . junit . Assert . assertThat ( model2 . getMyIntegerList ( ) , org . hamcrest . CoreMatchers . is ( value ) ) |
testIfMergeIsWorking_shouldNotChangeUnusedField ( ) { org . openengsb . core . ekb . api . transformation . TransformationDescription desc = getDescriptionForModelAToModelB ( ) ; desc . forwardField ( "idA" , "idB" ) ; desc . forwardField ( "testA" , "testB" ) ; desc . forwardField ( "blubA" , "#test" ) ; desc . forwar... | org . junit . Assert . assertThat ( result . getUnused ( ) , org . hamcrest . CoreMatchers . is ( "this<sp>is<sp>a<sp>test" ) ) |
testEmptyQuery ( ) { org . apache . lucene . analysis . Tokenizer tokenizer = createTokenizer ( new java . io . StringReader ( "" ) , TokenGenerator . DEFAULT_COMPOUND_NOUN_MIN_LENGTH ) ; "<AssertPlaceHolder>" ; tokenizer . close ( ) ; } incrementToken ( ) { if ( isBegin ( ) ) { document = getDocument ( ) ; createToken... | org . junit . Assert . assertEquals ( false , tokenizer . incrementToken ( ) ) |
shouldReturnNullWhenPropertyIdIsNotFound ( ) { final uk . gov . gchq . gaffer . store . StoreProperties unknownStoreProperties = graphLibrary . getProperties ( uk . gov . gchq . gaffer . store . library . AbstractGraphLibraryTest . TEST_UNKNOWN_ID ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( unknownStoreProperties ) |
testMutableTranspose ( ) { System . out . println ( "mutableTranspose" ) ; try { jsat . linear . DenseMatrixTest . C . clone ( ) . mutableTranspose ( ) ; org . junit . Assert . fail ( "Can<sp>not<sp>do<sp>a<sp>mutable<sp>transpose<sp>for<sp>rectangular<sp>matrix,<sp>error<sp>should<sp>have<sp>been<sp>thrown" ) ; } catc... | org . junit . Assert . assertEquals ( ATranspose , AT ) |
testGetContentFieldAsStrings_when_field_is_list ( ) { com . findwise . hydra . local . LocalDocument ld = new com . findwise . hydra . local . LocalDocument ( ) ; java . util . List < java . lang . String > list = java . util . Arrays . asList ( "value1" , "value2" ) ; ld . putContentField ( "field" , list ) ; java . u... | org . junit . Assert . assertEquals ( list , actual ) |
accessSegmentBySegment ( ) { okio . Buffer buffer = bufferFactory . newBuffer ( ) ; try ( okio . Buffer . UnsafeCursor cursor = buffer . readUnsafe ( ) ) { okio . Buffer actual = new okio . Buffer ( ) ; while ( ( cursor . next ( ) ) != ( - 1L ) ) { actual . write ( cursor . data , cursor . start , ( ( cursor . end ) - ... | org . junit . Assert . assertEquals ( buffer , actual ) |
testConvertLocatedBlockList ( ) { java . util . ArrayList < org . apache . hadoop . hdfs . protocol . LocatedBlock > lbl = new java . util . ArrayList < org . apache . hadoop . hdfs . protocol . LocatedBlock > ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { lbl . add ( createLocatedBlock ( ) ) ; } java . util . List < org . a... | org . junit . Assert . assertEquals ( lbl . size ( ) , lbl2 . size ( ) ) |
shouldUnmarshallXmlToObject ( ) { de . slackspace . openkeepass . domain . Times times = new de . slackspace . openkeepass . domain . TimesBuilder ( ) . creationTime ( de . slackspace . openkeepass . util . CalendarHandler . createCalendar ( 2016 , 1 , 15 ) ) . expires ( true ) . expiryTime ( de . slackspace . openkeep... | org . junit . Assert . assertEquals ( times . getUsageCount ( ) , timesUnmarshalled . getUsageCount ( ) ) |
testSingleCharAsKeyName ( ) { java . lang . String value = "Long<sp>Test<sp>Message;Long<sp>Test<sp>Message;Long<sp>Test<sp>Message;" + ( ( ( ( ( ( ( ( ( ( "Long<sp>Test<sp>Message;Long<sp>Test<sp>Message;Long<sp>Test<sp>Message;Long<sp>" + "Test<sp>Message;Long<sp>Test<sp>Message;Long<sp>Test<sp>Message;Long<sp>Test<s... | org . junit . Assert . assertEquals ( value , poll ) |
getOrCreateKeeperContainerServiceMultipleTimes ( ) { com . ctrip . xpipe . redis . core . entity . KeeperContainerMeta someKeeperContainerMeta = mock ( com . ctrip . xpipe . redis . core . entity . KeeperContainerMeta . class ) ; com . ctrip . xpipe . redis . core . keeper . container . KeeperContainerService someServi... | org . junit . Assert . assertEquals ( someService , anotherService ) |
ensure_explicit_wire_supersedes_skipwire_on_field ( ) { class TestManager extends com . artemis . Manager { @ com . artemis . annotations . Wire @ com . artemis . annotations . SkipWire private com . artemis . ComponentMapper < com . artemis . component . ComponentX > x ; } TestManager manager = new TestManager ( ) ; n... | org . junit . Assert . assertNotNull ( manager . x ) |
testGetSource ( ) { "<AssertPlaceHolder>" ; } getSource ( ) { return source ; } | org . junit . Assert . assertEquals ( event . getSource ( ) , net ) |
testDescribeUri0 ( ) { java . lang . String query = "DESCRIBE<sp><http://www.semanticweb.org/ontologies/test#p1>" ; "<AssertPlaceHolder>" ; } countResult ( java . lang . String ) { int count = 0 ; try ( it . unibz . inf . ontop . owlapi . resultset . GraphOWLResultSet rs = st . executeGraphQuery ( graphQuery ) ) { whil... | org . junit . Assert . assertEquals ( 0 , countResult ( query ) ) |
readWriteMaxIntTest ( ) { greycat . struct . Buffer buffer = factory . newBuffer ( ) ; buffer . writeInt ( 2147483647 ) ; int res = buffer . readInt ( 0 ) ; "<AssertPlaceHolder>" ; } readInt ( long ) { return _origin . readInt ( ( ( this . _initPos ) + startPos ) ) ; } | org . junit . Assert . assertEquals ( 2147483647 , res ) |
testSequenceFlowPriorityInvalid ( ) { for ( java . lang . String test : org . kie . workbench . common . stunner . bpmn . definition . property . connectors . SequenceFlowPriorityTest . PRIORITY_INVALID ) { org . kie . workbench . common . stunner . bpmn . definition . SequenceFlow sequenceFlow = new org . kie . workbe... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testBuildWithEmptyOrderBy ( ) { java . lang . String query = "SELECT<sp>FROM<sp>SMTH<sp>%s" ; java . lang . String condition = "condition<sp>" ; java . lang . Object parameter = new java . lang . Object ( ) ; java . lang . String condition1 = "condition1<sp>" ; java . lang . Object nullParameter = null ; java . util . ... | org . junit . Assert . assertEquals ( expected , actual ) |
testSplitEmptyArray ( ) { int [ ] array = new int [ 0 ] ; int [ ] [ ] arraySplit = ( ( int [ ] [ ] ) ( com . liferay . portal . kernel . util . ArrayUtil . split ( array , 2 ) ) ) ; "<AssertPlaceHolder>" ; } toString ( net . fortuna . ical4j . model . Calendar ) { net . fortuna . ical4j . data . CalendarOutputter calen... | org . junit . Assert . assertEquals ( java . util . Arrays . toString ( arraySplit ) , 0 , arraySplit . length ) |
testTessBaseAPISetVariable ( ) { net . sourceforge . tess4j . TessAPI1Test . logger . info ( "TessBaseAPISetVariable" ) ; java . lang . String name = "tessedit_create_hocr" ; java . lang . String value = "1" ; int expResult = 1 ; int result = net . sourceforge . tess4j . TessAPI1 . TessBaseAPISetVariable ( handle , nam... | org . junit . Assert . assertEquals ( expResult , result ) |
testIsSticky ( ) { org . pentaho . reporting . engine . classic . core . PageFooter footer = new org . pentaho . reporting . engine . classic . core . PageFooter ( ) ; footer . getStyle ( ) . setBooleanStyleProperty ( BandStyleKeys . STICKY , true ) ; "<AssertPlaceHolder>" ; } isSticky ( ) { return getStyle ( ) . getBo... | org . junit . Assert . assertThat ( footer . isSticky ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( true ) ) ) |
testCanPrescribeIsFalseOnNullInstructions ( ) { org . oscarehr . common . model . Drug d = getTestDrug ( ) ; d . setSpecial ( null ) ; "<AssertPlaceHolder>" ; } canPrescribe ( org . oscarehr . common . model . Drug ) { if ( d == null ) { org . oscarehr . managers . RxManager . logger . debug ( "drug<sp>was<sp>null<sp>r... | org . junit . Assert . assertFalse ( canPrescribe ( d ) ) |
shouldOpenCompareEditor ( ) { makeChangesAndCommit ( org . eclipse . egit . ui . view . synchronize . PROJ1 ) ; changeFilesInProject ( ) ; launchSynchronization ( org . eclipse . egit . ui . view . synchronize . HEAD , org . eclipse . egit . ui . view . synchronize . INITIAL_TAG , true ) ; org . eclipse . egit . ui . c... | org . junit . Assert . assertNotNull ( compare ) |
testGetEntityIdentifierInvalid ( ) { presenter . identifier = null ; java . lang . String id = presenter . getEntityIdentifier ( ) ; verify ( view , times ( 1 ) ) . setValidationState ( ValidationState . ERROR ) ; verify ( view , times ( 0 ) ) . clear ( ) ; verify ( view , times ( 0 ) ) . show ( anyString ( ) , anyStri... | org . junit . Assert . assertEquals ( null , id ) |
test_withZone_same ( ) { java . time . Clock test = java . time . Clock . fixed ( test . java . time . TestClock_Fixed . INSTANT , test . java . time . TestClock_Fixed . PARIS ) ; java . time . Clock changed = test . withZone ( test . java . time . TestClock_Fixed . PARIS ) ; "<AssertPlaceHolder>" ; } withZone ( java .... | org . junit . Assert . assertSame ( test , changed ) |
testReservationIdRequestListReservation ( ) { org . apache . hadoop . yarn . server . resourcemanager . webapp . TestRMWebServicesReservation . rm . start ( ) ; setupCluster ( 100 ) ; org . apache . hadoop . yarn . api . records . ReservationId id1 = getReservationIdTestHelper ( 1 ) ; org . apache . hadoop . yarn . api... | org . junit . Assert . assertEquals ( id1 . toString ( ) , reservationId ) |
capacityViolationAfterAct4_shouldWorkWhenViolated ( ) { buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore ( ) ; jsprit . core . reporting . SolutionPrinter . print ( vrp , solution , SolutionPrinter . Print . VERBOSE ) ; jsprit . core . analysis . SolutionAnalyser analyser = new jsprit . core . analy... | org . junit . Assert . assertEquals ( 15 , cap . get ( 0 ) ) |
testDeleteRecursive ( ) { java . io . File f1 = new java . io . File ( trash , "test/test/a" ) ; org . eclipse . jgit . util . FileUtils . mkdirs ( f1 . getParentFile ( ) ) ; org . eclipse . jgit . util . FileUtils . createNewFile ( f1 ) ; java . io . File f2 = new java . io . File ( trash , "test/test/b" ) ; org . ecl... | org . junit . Assert . assertFalse ( d . exists ( ) ) |
testGetHypervisorWrongOwner ( ) { org . candlepin . model . Owner otherOwner = new org . candlepin . model . Owner ( "test-owner-other" , "Test<sp>Other<sp>Owner" ) ; otherOwner = ownerCurator . create ( otherOwner ) ; java . lang . String hypervisorid = "hypervisor" ; org . candlepin . model . Consumer consumer = new ... | org . junit . Assert . assertNull ( result ) |
onTransportTerminationCancelsShutdownFuture ( ) { keepAliveManager . onTransportActive ( ) ; fakeClock . forwardNanos ( 1000 ) ; java . util . concurrent . ScheduledFuture < ? > shutdownFuture = com . google . common . collect . Iterables . getFirst ( fakeClock . getPendingTasks ( ) , null ) ; keepAliveManager . onTran... | org . junit . Assert . assertTrue ( shutdownFuture . isCancelled ( ) ) |
mergeWithSameString ( ) { puck . thrifty . datatype . StringElement elem = new puck . thrifty . datatype . StringElement ( "test" ) ; puck . thrifty . datatype . Element mergeElem = elem . merge ( elem ) ; "<AssertPlaceHolder>" ; } merge ( puck . thrifty . datatype . Element ) { if ( ( ( ( element == null ) || ( ( this... | org . junit . Assert . assertSame ( elem , mergeElem ) |
testGetMarketPlaceStage_default ( ) { when ( brandServiceMock . getMarketplaceStage ( anyString ( ) , eq ( Locale . FRANCE . getLanguage ( ) ) ) ) . thenReturn ( "" ) ; when ( skinBean . getRequestContextPath ( ) ) . thenReturn ( "" ) ; "<AssertPlaceHolder>" ; } getMarketplaceStage ( ) { java . lang . String localeStri... | org . junit . Assert . assertEquals ( java . text . MessageFormat . format ( SkinBean . MARKETPLACE_STAGE_DEFAULT , "" ) , skinBean . getMarketplaceStage ( ) ) |
testIntObjNull ( ) { java . lang . Class < com . j256 . ormlite . field . types . IntegerObjectTypeTest . LocalIntObj > clazz = com . j256 . ormlite . field . types . IntegerObjectTypeTest . LocalIntObj . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . IntegerObjectTypeTest . LocalIntO... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
shouldAddToNewCommunityOnlyWhenOldCommunityIsNull ( ) { org . openmrs . Patient patient = patient ( 100 ) ; org . motechproject . server . model . ghana . Community oldCommunity = null ; org . motechproject . server . model . ghana . Community newCommunity = community ( 11112 ) ; patient = new org . motechproject . ser... | org . junit . Assert . assertTrue ( newCommunity . hasResident ( patient ) ) |
testParseTableStyles ( ) { try { parser = new com . exigeninsurance . x4j . analytic . xlsx . transform . pdf . PdfStylesParser ( stream ) ; java . util . List < org . w3c . dom . Node > result = parser . parseTableStyles ( ) ; int expectedSize = com . exigeninsurance . x4j . analytic . xlsx . transform . pdf . PdfStyl... | org . junit . Assert . assertEquals ( expectedSize , actualSize ) |
testNewPacket ( ) { try { org . pcap4j . packet . UdpPacket p = org . pcap4j . packet . UdpPacket . newPacket ( packet . getRawData ( ) , 0 , packet . getRawData ( ) . length ) ; "<AssertPlaceHolder>" ; } catch ( org . pcap4j . packet . IllegalRawDataException e ) { throw new java . lang . AssertionError ( e ) ; } } ge... | org . junit . Assert . assertEquals ( packet , p ) |
testBuild ( ) { java . lang . String expectedAwql = "SELECT<sp>Id,<sp>Name<sp>WHERE<sp>Status<sp>=<sp>\"ENABLED\"<sp>ORDER<sp>BY<sp>Name<sp>DESC<sp>LIMIT<sp>0,100" ; com . google . api . ads . adwords . jaxws . utils . v201809 . ServiceQuery serviceQuery = new com . google . api . ads . adwords . jaxws . utils . v20180... | org . junit . Assert . assertEquals ( expectedAwql , serviceQuery . toString ( ) ) |
testSave ( ) { java . util . List < software . amazon . awssdk . services . dynamodb . mapper . IndexRangeKeyClass > objs = new java . util . ArrayList < software . amazon . awssdk . services . dynamodb . mapper . IndexRangeKeyClass > ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { software . amazon . awssdk . services . dyna... | org . junit . Assert . assertEquals ( obj , loaded ) |
testSerializability ( ) { final org . opencastproject . mediapackage . EName a = new org . opencastproject . mediapackage . EName ( "http://localhost/a" , "a" ) ; "<AssertPlaceHolder>" ; } serializeDeserialize ( A extends java . io . Serializable ) { final java . io . ByteArrayOutputStream out = new java . io . ByteArr... | org . junit . Assert . assertEquals ( a , org . opencastproject . util . IoSupport . serializeDeserialize ( a ) ) |
testReserveGetsCapacity ( ) { org . easymock . EasyMock . expect ( mockService . getAllAvailableCapacity ( ) ) . andReturn ( com . facebook . buck . distributed . build_slave . DefaultMultiBuildCapacityTrackerTest . CAPACITY ) . once ( ) ; org . easymock . EasyMock . replay ( mockService ) ; int availableCapacity = cap... | org . junit . Assert . assertEquals ( com . facebook . buck . distributed . build_slave . DefaultMultiBuildCapacityTrackerTest . CAPACITY , availableCapacity ) |
testSerializeDNServerEntry ( ) { org . apache . directory . api . ldap . model . entry . Entry entry = new org . apache . directory . api . ldap . model . entry . DefaultEntry ( org . apache . directory . server . core . partition . impl . btree . jdbm . ServerEntrySerializerTest . schemaManager ) ; org . apache . dire... | org . junit . Assert . assertEquals ( entry , result ) |
prepared_statement_setters_39 ( ) { org . apache . jena . jdbc . connections . JenaConnection conn = this . getConnection ( ) ; org . apache . jena . jdbc . statements . JenaPreparedStatement stmt = ( ( org . apache . jena . jdbc . statements . JenaPreparedStatement ) ( conn . prepareStatement ( "SELECT<sp>*<sp>WHERE<s... | org . junit . Assert . assertTrue ( pss . toString ( ) . contains ( "true" ) ) |
testReInstallForInstallFailedClient ( ) { java . lang . String cluster1 = org . apache . ambari . server . controller . AmbariManagementControllerTest . getUniqueName ( ) ; createCluster ( cluster1 ) ; org . apache . ambari . server . controller . AmbariManagementControllerTest . clusters . getCluster ( cluster1 ) . se... | org . junit . Assert . assertNotNull ( clientReinstallCmd ) |
testGetItemPadding ( ) { org . eclipse . rap . rwt . theme . BoxDimensions actual = org . eclipse . rap . rwt . internal . theme . ToolBarThemeAdapter_Test . getThemeAdapter ( toolBar ) . getItemPadding ( item ) ; "<AssertPlaceHolder>" ; } getItemPadding ( boolean ) { org . eclipse . rap . rwt . internal . theme . Simp... | org . junit . Assert . assertEquals ( new org . eclipse . rap . rwt . theme . BoxDimensions ( 1 , 1 , 1 , 1 ) , actual ) |
testGetValidationStatusWithTimeout ( ) { final org . apache . nifi . controller . TestAbstractComponentNode . ValidationControlledAbstractComponentNode node = new org . apache . nifi . controller . TestAbstractComponentNode . ValidationControlledAbstractComponentNode ( 5000 , org . mockito . Mockito . mock ( org . apac... | org . junit . Assert . assertEquals ( ValidationStatus . VALIDATING , status ) |
shouldValidateComponentTypesAndReturnTrueWhenNoIdentifiersOrProperties ( ) { final uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition elementDef = mock ( uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition . class ) ; final uk . gov . gchq . gaffer . store . schema . SchemaElementDefini... | org . junit . Assert . assertTrue ( result . isValid ( ) ) |
searchPayments_filterByFirstDigitsCardNumber ( ) { java . lang . String payments = aPaginatedPaymentSearchResult ( ) . withCount ( 10 ) . withPage ( 2 ) . withTotal ( 20 ) . withPayments ( aSuccessfulSearchPayment ( ) . withCardDetails ( uk . gov . pay . api . it . PaymentResourceSearchITest . CARD_DETAILS ) . getResul... | org . junit . Assert . assertThat ( results , matchesField ( "first_digits_card_number" , uk . gov . pay . api . it . PaymentResourceSearchITest . TEST_FIRST_DIGITS_CARD_NUMBER ) ) |
private_constructors_are_not_supported ( ) { testtypes . TypeWithPrivateConstructor instance = this . fixture . create ( testtypes . TypeWithPrivateConstructor . class ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object ) { com . flextrade . jfixture . SpecimenBuilder builder = builderContainer . getBuilder ( )... | org . junit . Assert . assertNotNull ( instance ) |
shouldNotOverwiteObject ( ) { try { uploadAndOverwrite ( false ) ; } catch ( java . io . IOException e ) { logger . error ( "Error<sp>occurred<sp>in<sp>shouldNotOverwiteObject" , e ) ; "<AssertPlaceHolder>" ; } } uploadAndOverwrite ( boolean ) { final java . lang . String objName = "testObject.dat" ; org . javaswift . ... | org . junit . Assert . assertFalse ( true ) |
testIsJavaType1 ( ) { boolean isJavaType = dataTypeUtils . isJavaType ( "Integer" ) ; "<AssertPlaceHolder>" ; } isJavaType ( java . lang . String ) { java . util . Map < java . lang . String , java . lang . String > javaTypes = getJavaTypes ( ) ; java . lang . String javaTypeCodes = javaTypes . get ( typeName ) ; if ( ... | org . junit . Assert . assertTrue ( isJavaType ) |
testPrefixDoesNotNormalizeDoubleSlashInTar ( ) { commitFoo ( ) ; byte [ ] result = org . eclipse . jgit . pgm . CLIGitCommand . executeRaw ( "git<sp>archive<sp>--prefix=x//<sp>--format=tar<sp>master" , db ) . outBytes ( ) ; java . lang . String [ ] expect = new java . lang . String [ ] { "x//foo" } ; "<AssertPlaceHolde... | org . junit . Assert . assertArrayEquals ( expect , listTarEntries ( result ) ) |
mulitpleFilterTest ( ) { org . geotoolkit . index . LogicalFilterType [ ] filterType5 = new org . geotoolkit . index . LogicalFilterType [ ] { org . geotoolkit . index . LogicalFilterType . AND , org . geotoolkit . index . LogicalFilterType . NOT } ; serialFilter = new org . geotoolkit . lucene . filter . SerialChainFi... | org . junit . Assert . assertEquals ( nbResults , 0 ) |
testSetTabList_overridesDefaultTabList ( ) { new org . eclipse . swt . widgets . Label ( composite , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . widgets . Control child2 = new org . eclipse . swt . widgets . Button ( composite , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . widgets . Control... | org . junit . Assert . assertArrayEquals ( new org . eclipse . swt . widgets . Control [ ] { child2 , child3 } , composite . getTabList ( ) ) |
testReduce3AlexBug ( ) { lombok . val arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 100 , 100 ) . reshape ( 'f' , 10 , 10 ) . dup ( 'c' ) ; lombok . val arr2 = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 100 , 100 ) . reshape ( 'c' , 10 , 10 ) ; lombok . val out = org . nd4j . linalg . factory .... | org . junit . Assert . assertEquals ( exp , out ) |
priorityIsIncludedInOpenEnd ( ) { com . google . firebase . database . snapshot . Node node = NodeFromJSON ( "leaf-value" ) ; com . google . firebase . database . snapshot . Node update = NodeFromJSON ( com . google . firebase . database . TestHelpers . fromSingleQuotedString ( "{'.priority':<sp>'prio',<sp>'foo':<sp>'b... | org . junit . Assert . assertEquals ( expected , actual ) |
clear1 ( ) { org . diirt . util . array . CircularBufferDouble coll = new org . diirt . util . array . CircularBufferDouble ( 10 ) ; for ( int i = 0 ; i < 5 ; i ++ ) { coll . addDouble ( i ) ; } coll . clear ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return values . size ( ) ; } | org . junit . Assert . assertThat ( coll . size ( ) , equalTo ( 0 ) ) |
saleNonVisaDoesNotReceiveNetworkTransactionIdentifier ( ) { com . braintreegateway . integrationtest . TransactionRequest request = new com . braintreegateway . integrationtest . TransactionRequest ( ) . amount ( new java . math . BigDecimal ( "10.00" ) ) . creditCard ( ) . number ( CreditCardNumber . MASTER_CARD . num... | org . junit . Assert . assertNull ( transaction . getNetworkTransactionId ( ) ) |
testCreateCustomImage ( ) { com . myjeeva . digitalocean . pojo . Image input = new com . myjeeva . digitalocean . pojo . Image ( "ubuntu-18.04-minimal" , "http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img" , "nyc3" ) ; input . setDescription ( "Cloud-optimized<sp>im... | org . junit . Assert . assertNotNull ( image ) |
testCopy ( ) { java . lang . String data = "testCopy\nasdf" ; java . io . File file = org . eclipse . aether . internal . test . util . TestFileUtils . createTempFile ( data ) ; java . io . File target = new java . io . File ( targetDir , "testCopy.txt" ) ; fileProcessor . copy ( file , target ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertEquals ( data , org . eclipse . aether . internal . test . util . TestFileUtils . readString ( file ) ) |
testLoggerScopeUsingDefaultProperty ( ) { expect ( systemConf . getCustom ( org . apache . accumulo . server . fs . PerTableVolumeChooserTest . getCustomPropertySuffix ( ChooserScope . LOGGER ) ) ) . andReturn ( null ) . once ( ) ; expect ( systemConf . getCustom ( org . apache . accumulo . server . fs . PerTableVolume... | org . junit . Assert . assertSame ( org . apache . accumulo . server . fs . PerTableVolumeChooserTest . MockChooser2 . class , delegate . getClass ( ) ) |
testDifference ( ) { org . openscience . cdk . interfaces . IElectronContainer ec1 = mock ( org . openscience . cdk . interfaces . IElectronContainer . class ) ; org . openscience . cdk . interfaces . IElectronContainer ec2 = mock ( org . openscience . cdk . interfaces . IElectronContainer . class ) ; when ( ec1 . getE... | org . junit . Assert . assertNotNull ( difference ) |
updateRemoteConnector ( ) { dispatcher . push ( org . jboss . dmr . client . StaticDmrResponse . ok ( propertyList ( 1 , "foo" ) ) ) ; dispatcher . push ( org . jboss . dmr . client . StaticDmrResponse . ok ( new org . jboss . dmr . client . ModelNode ( ) ) ) ; store . updateConnector ( new org . jboss . as . console .... | org . junit . Assert . assertEquals ( "foo" , store . getLastModifiedInstance ( ) ) |
testDirExistsWithValidDir ( ) { java . lang . String dirName = org . apache . commons . io . FilenameUtils . concat ( tmpDir , this . getDateTimeInMillis ( ) ) ; java . io . File f = new java . io . File ( dirName ) ; if ( f . mkdir ( ) ) { "<AssertPlaceHolder>" ; } if ( f . exists ( ) ) { f . delete ( ) ; } } isDirExi... | org . junit . Assert . assertTrue ( com . vmware . vrack . hms . common . util . FileUtil . isDirExists ( dirName ) ) |
no_access_user1 ( ) { org . apache . jena . fuseki . access . SecurityContext sCxt = reg . get ( "user1" ) ; org . apache . jena . fuseki . access . Set < org . apache . jena . graph . Node > visible = subjects ( testdsg , org . apache . jena . fuseki . access . TestSecurityFilterLocal . queryG2 , sCxt ) ; "<AssertPlac... | org . junit . Assert . assertTrue ( visible . isEmpty ( ) ) |
validateObjectSuccess ( ) { boolean isValid = factory . validateObject ( mockManagedHost , mockBorrowedTracker ) ; "<AssertPlaceHolder>" ; verify ( mockBorrowedTracker ) . noop ( ) ; } validateObject ( fm . last . moji . tracker . pool . ManagedTrackerHost , fm . last . moji . tracker . pool . BorrowedTracker ) { fm . ... | org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( true ) ) |
testPruneDependentPostAgg ( ) { org . apache . druid . query . aggregation . PostAggregator agg1 = new org . apache . druid . query . aggregation . post . ArithmeticPostAggregator ( "abc" , "+" , com . google . common . collect . Lists . newArrayList ( new org . apache . druid . query . aggregation . post . ConstantPos... | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( dependency1 , dependency2 , aggregator ) , prunedAgg ) |
testIFileStream ( ) { final int DLEN = 100 ; org . apache . hadoop . io . DataOutputBuffer dob = new org . apache . hadoop . io . DataOutputBuffer ( ( DLEN + 4 ) ) ; org . apache . hadoop . mapred . IFileOutputStream ifos = new org . apache . hadoop . mapred . IFileOutputStream ( dob ) ; for ( int i = 0 ; i < DLEN ; ++... | org . junit . Assert . assertEquals ( i , ifis . read ( ) ) |
now ( ) { com . abien . xray . business . statistics . entity . DailyHits hits = new com . abien . xray . business . statistics . entity . DailyHits ( 1 ) ; java . lang . String date = hits . getDateAsString ( ) ; "<AssertPlaceHolder>" ; } getDateAsString ( ) { return date . format ( DateTimeFormatter . ISO_DATE ) ; } | org . junit . Assert . assertNotNull ( date ) |
testUpstreamOma1 ( ) { final java . lang . String outPath = runJannovarOnVCFLine ( "/sv_header.vcf" , "1\t59012450\t.\tN\t<DEL>\t.\t.\tSVTYPE=DEL;END=59012899" ) ; final java . lang . String expected = "1\t59012450\t.\tN\t<DEL>\t.\t.\tEND=59012899;" + ( "SVANN=upstream_gene_variant&coding_transcript_variant|MODIFIER|OM... | org . junit . Assert . assertEquals ( expected , actual ) |
testFromEbXMLEmpty ( ) { org . openehealth . ipf . commons . ihe . xds . core . transform . requests . EbXMLRemoveObjectsRequest ebXML = transformer . toEbXML ( new org . openehealth . ipf . commons . ihe . xds . core . requests . RemoveDocumentSet ( ) ) ; "<AssertPlaceHolder>" ; } fromEbXML ( org . openehealth . ipf .... | org . junit . Assert . assertEquals ( new org . openehealth . ipf . commons . ihe . xds . core . requests . RemoveDocumentSet ( ) , transformer . fromEbXML ( ebXML ) ) |
testCreateBusinessObjectDefinitionTagLowerCaseParameters ( ) { businessObjectDefinitionDaoTestHelper . createBusinessObjectDefinitionEntity ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( BDEF_NAMESPACE , BDEF_NAME ) , org . finra . herd . service . DATA_PROVIDER_NAME , org . finra . herd .... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionTag ( result . getId ( ) , new org . finra . herd . model . api . xml . BusinessObjectDefinitionTagKey ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( BDEF_NAMESPACE , BDEF_NAME ) , ne... |
shouldEvaluateTrueIfIncludesEmptyAndExcludesDoNotMatch ( ) { java . util . function . Predicate < java . lang . Class < ? > > inner = mock ( java . util . function . Predicate . class ) ; com . oracle . bedrock . testsupport . junit . options . TestClasses . TestMatcher exclude1 = mock ( TestClasses . TestMatcher . cla... | org . junit . Assert . assertThat ( predicate . test ( com . oracle . bedrock . testsupport . junit . options . Integer . class ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testAcceptInValidParameter3 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "selectx" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleState ) { or... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( false ) ) |
testSerdeInt ( ) { org . apache . apex . malhar . lib . utils . serde . IntSerde intSerde = new org . apache . apex . malhar . lib . utils . serde . IntSerde ( ) ; org . apache . apex . malhar . lib . utils . serde . SerializationBuffer buffer = new org . apache . apex . malhar . lib . utils . serde . SerializationBuff... | org . junit . Assert . assertEquals ( value , deserializedValue ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.