input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
converterCannotInitializeWithIncompleteParamSpecWithoutValue ( ) { channelProperties . put ( "zigbee_shortpress_cluster_id" , "0x8" ) ; channelProperties . put ( "zigbee_shortpress_command_id" , "0xabc" ) ; channelProperties . put ( "zigbee_shortpress_parameter_name" , "mode" ) ; mockCluster ( 8 ) ; boolean initResult ... | org . junit . Assert . assertFalse ( initResult ) |
shouldReturnNullIfBothComparatorsAreNull ( ) { final java . util . List < uk . gov . gchq . gaffer . data . element . Entity > input = com . google . common . collect . Lists . newArrayList ( ) ; final uk . gov . gchq . gaffer . operation . impl . compare . Min min = new uk . gov . gchq . gaffer . operation . impl . co... | org . junit . Assert . assertNull ( result ) |
nonHudsonCommentShouldReturnEmpty ( ) { java . lang . String message = "Uploaded<sp>patch<sp>set<sp>2." ; com . google . common . collect . ImmutableList < org . eclipse . mylyn . reviews . internal . core . BuildResult > results = parser . getBuildResult ( message ) ; "<AssertPlaceHolder>" ; } getBuildResult ( java . ... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testReturnOriginalStateTwo ( ) { final com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; final com . orientechnologies . orient . core . db . record . OTrackedList < java . lang . String > trackedList = new com . orien... | org . junit . Assert . assertEquals ( original , trackedList . returnOriginalState ( firedEvents ) ) |
setActionPayloadTest ( ) { io . haskins . java . cloudtrailviewer . model . DashboardWidget test = new io . haskins . java . cloudtrailviewer . model . DashboardWidget ( ) ; da . setActionPayload ( test ) ; "<AssertPlaceHolder>" ; } getActionPayload ( ) { return actionPayload ; } | org . junit . Assert . assertSame ( da . getActionPayload ( ) , test ) |
testRunTransformCompletedEventFired ( ) { at . punkt . lodms . impl . ETLPipelineImplTest . MockApplicationEventPublisher eventPublisher = new at . punkt . lodms . impl . ETLPipelineImplTest . MockApplicationEventPublisher ( ) ; at . punkt . lodms . impl . ETLPipelineImpl instance = new at . punkt . lodms . impl . ETLP... | org . junit . Assert . assertEquals ( transformer , completedEvent . getTransformer ( ) ) |
runTestExceptions1 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "GeneralJava/Exceptions1.apk" ) ; "<AssertPlaceHolder>" ; } size ( ) { return set . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
testScalarReverseSub ( ) { org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . valueArrayOf ( 4 , 2.0 ) ; org . nd4j . linalg . api . ndarray . INDArray result = org . nd4j . linalg . factory . Nd4j . zeros ( 4 ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exe... | org . junit . Assert . assertEquals ( assertion , result ) |
testMerge_NoDuplicates_Long ( ) { properties . put ( "odd" , new java . lang . Long [ ] { 1L , 3L } ) ; properties . put ( "even" , new java . lang . Long [ ] { 2L , 4L } ) ; properties . put ( "duplicates" , new java . lang . Long [ ] { 1L , 2L , 3L , 4L } ) ; when ( resource . adaptTo ( org . apache . sling . api . r... | org . junit . Assert . assertArrayEquals ( new java . lang . Long [ ] { 2L , 4L , 1L , 3L } , properties . get ( "longs" , com . adobe . acs . commons . wcm . impl . Long [ ] . class ) ) |
loadNativeBooleanUsingV2_UnmarshallsCorrectly ( ) { stubGetItemRequest ( "booleanAttr" , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . bool ( true ) . build ( ) ) ; final software . amazon . awssdk . services . dynamodb . mapper . V2CompatibleBooleansTest . UnitTestPojo pojo ... | org . junit . Assert . assertTrue ( pojo . getBooleanAttr ( ) ) |
testCheckMatched4 ( ) { org . mintcode . errabbit . model . Log log = new org . mintcode . errabbit . model . Log ( ) ; log . setRabbitId ( "junit" ) ; log . setCollectedDate ( new java . util . Date ( ) ) ; org . mintcode . errabbit . model . ErrLoggingEvent errLoggingEvent = new org . mintcode . errabbit . model . Er... | org . junit . Assert . assertTrue ( ec . check ( log ) ) |
defaultReceiverCalled ( ) { android . content . Intent intent = new android . content . Intent ( FragmentWithReceiver . RECEIVER_ACTION ) ; fragment . getActivity ( ) . sendBroadcast ( intent ) ; "<AssertPlaceHolder>" ; } getActivity ( ) { return null ; } | org . junit . Assert . assertTrue ( fragment . defaultReceiverCalled ) |
testGetResource ( ) { org . apache . ambari . server . api . resources . ResourceDefinition resource = new org . apache . ambari . server . api . resources . ClusterResourceDefinition ( ) ; org . apache . ambari . server . api . query . QueryInfo info = new org . apache . ambari . server . api . query . QueryInfo ( res... | org . junit . Assert . assertSame ( resource , info . getResource ( ) ) |
testCreateTableSucceeds ( ) { com . google . api . services . bigquery . model . TableReference ref = new com . google . api . services . bigquery . model . TableReference ( ) . setProjectId ( "project" ) . setDatasetId ( "dataset" ) . setTableId ( "table" ) ; com . google . api . services . bigquery . model . Table te... | org . junit . Assert . assertEquals ( testTable , ret ) |
test12 ( ) { java . lang . String expResult = "123456789" ; java . lang . String result = instance . getIdentity ( ) ; "<AssertPlaceHolder>" ; } getIdentity ( ) { return identity ; } | org . junit . Assert . assertEquals ( expResult , result ) |
test_CaptureFromAFile ( ) { classUnderTest = addWhitePawn ( GenericPosition . a2 ) ; addBlackPawn ( GenericPosition . b3 ) ; ml = classUnderTest . generateMoves ( new eubos . board . Board ( pl ) ) ; expectedMove = new eubos . board . pieces . GenericMove ( GenericPosition . a2 , GenericPosition . b3 ) ; "<AssertPlaceH... | org . junit . Assert . assertTrue ( ml . contains ( expectedMove ) ) |
testShouldReturnNullOnNullDrugs ( ) { org . oscarehr . util . LoggedInInfo info = new org . oscarehr . util . LoggedInInfo ( ) ; org . oscarehr . managers . PrescriptionDrugs pd = prescribe ( info , null , 1 ) ; "<AssertPlaceHolder>" ; } prescribe ( org . oscarehr . util . LoggedInInfo , java . util . List , java . lan... | org . junit . Assert . assertNull ( pd ) |
iremoveEmptyRange ( ) { org . roaringbitmap . Container bc = new org . roaringbitmap . BitmapContainer ( ) ; bc = bc . iremove ( 1 , 1 ) ; "<AssertPlaceHolder>" ; } getCardinality ( ) { return ( ( int ) ( getLongCardinality ( ) ) ) ; } | org . junit . Assert . assertEquals ( 0 , bc . getCardinality ( ) ) |
DeDupExampleTest ( ) { com . datatorrent . api . LocalMode lma = com . datatorrent . api . LocalMode . newInstance ( ) ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( false ) ; conf . set ( "dt.application.DeDupExample.operator.console.silent" , "true" ) ; org . ... | org . junit . Assert . assertEquals ( 9 , DeDupExample . Collector . getResult ( ) . getValue ( ) . size ( ) ) |
testJSONGram ( ) { org . antlr . v4 . runtime . Lexer lexer = new com . sourceclear . gramtest . bnfLexer ( new org . antlr . v4 . runtime . ANTLRInputStream ( getClass ( ) . getResourceAsStream ( "/json.bnf" ) ) ) ; org . antlr . v4 . runtime . CommonTokenStream tokens = new org . antlr . v4 . runtime . CommonTokenStr... | org . junit . Assert . assertEquals ( 100 , generatedTests . size ( ) ) |
testVarrd ( ) { runTagAttrTestVard ( tagName . toLowerCase ( ) , attribute . toLowerCase ( ) , "xx" ) ; setUp ( ) ; runTagAttrTestVard ( tagName , attribute , "xx" ) ; "<AssertPlaceHolder>" ; } runTagAttrTestVard ( java . lang . String , java . lang . String , java . lang . String ) { final java . lang . String cfcSrc ... | org . junit . Assert . assertEquals ( true , true ) |
testPolylineWkt ( ) { java . lang . String test = "LINESTRING<sp>(55.75474<sp>37.61823,<sp>55.75513<sp>37.61888,<sp>55.7535<sp>37.6222,<sp>55.75315<sp>37.62165)" ; org . traccar . geofence . GeofenceGeometry geofenceGeometry = new org . traccar . geofence . GeofencePolyline ( ) ; geofenceGeometry . fromWkt ( test ) ; "... | org . junit . Assert . assertEquals ( geofenceGeometry . toWkt ( ) , test ) |
transform_route6_trailing_zero ( ) { final net . ripe . db . whois . common . rpsl . RpslObject rpslObject = net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "" + ( "route6:<sp>2001:1578:200::0/40\n" + "origin:<sp>AS12321" ) ) ) ; final net . ripe . db . whois . common . rpsl . RpslObject result = attri... | org . junit . Assert . assertThat ( result . getValueForAttribute ( AttributeType . ROUTE6 ) . toString ( ) , org . hamcrest . Matchers . is ( "2001:1578:200::/40" ) ) |
test_plusHours_noChange ( ) { java . time . LocalDateTime t = TEST_2007_07_15_12_30_40_987654321 . plusHours ( 0 ) ; "<AssertPlaceHolder>" ; } plusHours ( long ) { return with ( dateTime . plusHours ( hours ) , offset ) ; } | org . junit . Assert . assertSame ( t , TEST_2007_07_15_12_30_40_987654321 ) |
testCompiler_Producer_MultipleProducers ( ) { int [ ] producerCount = new int [ 1 ] ; bt . torrent . compiler . CompilerVisitor visitor = bt . torrent . compiler . MessagingAgentCompilerTest . createVisitor ( null , ( handle ) -> ( producerCount [ 0 ] ) ++ ) ; compiler . compileAndVisit ( new bt . torrent . compiler . ... | org . junit . Assert . assertEquals ( 2 , producerCount [ 0 ] ) |
testCookies ( ) { de . sstoehr . harreader . model . HarResponse response = new de . sstoehr . harreader . model . HarResponse ( ) ; response . setCookies ( null ) ; "<AssertPlaceHolder>" ; } getCookies ( ) { if ( ( cookies ) == null ) { cookies = new java . util . ArrayList ( ) ; } return cookies ; } | org . junit . Assert . assertNotNull ( response . getCookies ( ) ) |
testLagFunction ( ) { java . lang . String sqlText = org . junit . Assert . format ( ( "LAG(SALARY)<sp>OVER<sp>(PARTITION<sp>BY<sp>DEPTNO<sp>ORDER<sp>BY<sp>SALARY<sp>DESC,<sp>empno)<sp>NEXT_LOWER_SAL<sp>from<sp>" 0 + ( "LAG(SALARY)<sp>OVER<sp>(PARTITION<sp>BY<sp>DEPTNO<sp>ORDER<sp>BY<sp>SALARY<sp>DESC,<sp>empno)<sp>NEX... | org . junit . Assert . assertEquals ( ( ( "<sp>22<sp>|<sp>6500<sp>|<sp>4<sp>|<sp>7200<sp>|\n" 8 + sqlText ) + "<sp>22<sp>|<sp>6500<sp>|<sp>4<sp>|<sp>7200<sp>|\n" 8 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testLL3 ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( "a" 0 + "<sp>|<sp>'a'<sp>'b'<sp>'d'" ) + "<sp>;\n" ) + "q<sp>:<sp>\'e\'<sp>;\n" ) ; System . out . println ( grammar ) ; java . lang . String found = execParser ( "T.g" , grammar , "TParser" , "TLexer" , "a" , "abe" , false ) ; java . lang . String ... | org . junit . Assert . assertEquals ( expecting , result ) |
givenCorrectObjectGroupWhenCheckStorageAvailabilityWithPDOThenOK ( ) { when ( workspaceClient . getObject ( any ( ) , any ( ) ) ) . thenReturn ( javax . ws . rs . core . Response . status ( Status . OK ) . entity ( sedaPdo ) . build ( ) ) ; when ( handlerIO . getInputStreamFromWorkspace ( any ( ) ) ) . thenReturn ( sed... | org . junit . Assert . assertTrue ( ( totalSize > 0 ) ) |
testCreateEntity_silentFailure ( ) { handler . addRequest ( false , "POST" , "/qcbin/rest/domains/domain/projects/project/defects" , 500 ) . responseBody ( "Failed" ) ; com . hp . alm . ali . idea . model . Entity defect = new com . hp . alm . ali . idea . model . Entity ( "defect" ) ; com . hp . alm . ali . idea . mod... | org . junit . Assert . assertNull ( created ) |
testToHL7Null ( ) { java . util . List < java . lang . String > hl7Data = transformer . toHL7 ( null ) ; "<AssertPlaceHolder>" ; } size ( ) { return entries . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , hl7Data . size ( ) ) |
compareFiles ( ) { final org . csstudio . display . pvtable . persistence . PVTablePersistence persistence = new org . csstudio . display . pvtable . persistence . PVTableXMLPersistence ( ) ; final org . csstudio . display . pvtable . model . PVTableModel model = persistence . read ( new java . io . FileInputStream ( "... | org . junit . Assert . assertThat ( original , org . csstudio . display . pvtable . FileTestUtil . matchLinesIn ( copy ) ) |
testCountBySeverity ( ) { final org . opennms . core . criteria . CriteriaBuilder cb = new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . model . OnmsAlarm . class ) ; cb . ge ( "severity" , OnmsSeverity . NORMAL ) ; cb . fetch ( "firstEvent" , FetchType . EAGER ) ; cb . fetch ( "lastEvent... | org . junit . Assert . assertEquals ( 1 , count ) |
testNoNullElementsCollectionEmpty ( ) { com . twelvemonkeys . lang . Set < ? > collection = com . twelvemonkeys . lang . Collections . emptySet ( ) ; "<AssertPlaceHolder>" ; } noNullElements ( T [ ] ) { return com . twelvemonkeys . lang . Validate . noNullElements ( pParameter , null ) ; } | org . junit . Assert . assertSame ( collection , com . twelvemonkeys . lang . Validate . noNullElements ( collection ) ) |
equals_oneValueIsNull_shouldBeFalse ( ) { com . vaadin . v7 . data . util . filter . Like like1 = new com . vaadin . v7 . data . util . filter . Like ( "foo" , null ) ; com . vaadin . v7 . data . util . filter . Like like2 = new com . vaadin . v7 . data . util . filter . Like ( "baz" , "bar" ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertFalse ( like1 . equals ( like2 ) ) |
testInsidePolygon ( ) { com . vividsolutions . jts . geom . Geometry g = wkt . read ( "POINT(5<sp>5)" ) . buffer ( 2 ) ; com . vividsolutions . jts . geom . Geometry clipped = clipper . clip ( g , false ) ; "<AssertPlaceHolder>" ; showResult ( "Polygon<sp>inside" , g , clipped ) ; } equals ( java . lang . Object ) { if... | org . junit . Assert . assertTrue ( g . equals ( clipped ) ) |
testDoesNotModifyContentRangeHeaderOnCachedResponseWithNoTransform ( ) { final org . apache . hc . core5 . http . ClassicHttpRequest req1 = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "Cache-Control" 0 ) ; req1 . setHeader ( "If-Range" , "\"etag\"" ) ; req1 . setHeader ( "Range" ,... | org . junit . Assert . assertEquals ( "bytes<sp>0-49/128" , result . getFirstHeader ( "Content-Range" ) . getValue ( ) ) |
testClassFinderFiltersByPathInDirs ( ) { final java . lang . String hardcodedThisSubdir = "hbase-common" ; final org . apache . hadoop . hbase . ClassFinder . ResourcePathFilter notExcJarFilter = new org . apache . hadoop . hbase . ClassFinder . ResourcePathFilter ( ) { @ org . apache . hadoop . hbase . Override public... | org . junit . Assert . assertFalse ( notAllClasses . contains ( this . getClass ( ) ) ) |
asUnmodifiable ( ) { super . asUnmodifiable ( ) ; "<AssertPlaceHolder>" ; } asUnmodifiable ( ) { return org . eclipse . collections . impl . map . ordered . mutable . UnmodifiableMutableOrderedMap . of ( this ) ; } | org . junit . Assert . assertSame ( this . map , this . map . asUnmodifiable ( ) ) |
testDiffSameChange ( ) { _policyBuilder . addStatement ( new org . batfish . datamodel . routing_policy . statement . SetMetric ( new org . batfish . datamodel . routing_policy . expr . LiteralLong ( 500L ) ) ) . addStatement ( new org . batfish . datamodel . routing_policy . statement . Statements . StaticStatement ( ... | org . junit . Assert . assertEquals ( diffAnswer . getRows ( ) . size ( ) , 0 ) |
testInterceptorCalls ( ) { addInterceptor ( org . apache . webbeans . test . component . intercept . webbeans . TransactionalInterceptor2 . class ) ; startContainer ( org . apache . webbeans . test . component . intercept . webbeans . TransactionalInterceptor2 . class , org . apache . webbeans . test . component . inte... | org . junit . Assert . assertEquals ( 5 , s ) |
equalsShouldReturnTrueWhenObjectIsNull ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == other ) { return true ; } if ( ! ( other instanceof org . eclipse . che . ide . ext . runner . client . tabs . common . Tab ) ) { return false ; } org . eclipse . che . ide . ext . runner . client .... | org . junit . Assert . assertThat ( runner . equals ( null ) , org . hamcrest . core . Is . is ( false ) ) |
invalidateWhileInQueue ( ) { org . apache . commons . io . FileUtils . deleteDirectory ( new java . io . File ( "target/cacheTest" ) ) ; org . apache . jackrabbit . oak . plugins . document . DocumentMK . Builder builder = builderProvider . newBuilder ( ) ; builder . setPersistentCache ( "target/cacheTest" ) ; org . ap... | org . junit . Assert . assertNull ( cache . getIfPresent ( key ) ) |
testClone ( ) { org . jlinda . core . Window win_ACTUAL_CLONE = ( ( org . jlinda . core . Window ) ( org . jlinda . core . WindowTest . win_EXPECTED . clone ( ) ) ) ; "<AssertPlaceHolder>" ; } clone ( ) { org . jlinda . core . SLCImage meta = new org . jlinda . core . SLCImage ( ) ; meta . abstractedMetadata = this . a... | org . junit . Assert . assertEquals ( org . jlinda . core . WindowTest . win_EXPECTED , win_ACTUAL_CLONE ) |
sortCreatedDescNameAsc ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>ORDER<sp>BY<sp>created<sp>desc,<sp>name<sp>asc<sp>LIMIT<sp>10" ; java . lang . String api = "select<sp>*<sp>order<sp>by<sp>created<sp>desc,<sp>name<sp>asc" ; org . apache . usergrid . query . validator . QueryRequest request = n... | org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) ) |
toDBObject_pcjDetails_missing_optionals ( ) { final org . apache . rya . api . instance . RyaDetails . PCJIndexDetails . PCJDetails details = org . apache . rya . api . instance . RyaDetails . PCJIndexDetails . PCJDetails . builder ( ) . setId ( "pcjId" ) . build ( ) ; final com . mongodb . BasicDBObject dbo = ( ( com ... | org . junit . Assert . assertEquals ( details , restored ) |
shouldReturnView ( ) { com . google . gwt . user . client . ui . IsWidget view = presenter . getView ( ) ; "<AssertPlaceHolder>" ; } getView ( ) { return view ; } | org . junit . Assert . assertEquals ( this . view , view ) |
testFileMd5SumNotEquals ( ) { java . nio . file . Path path1 = java . nio . file . Paths . get ( nl . jpoint . vertx . deploy . agent . util . FileDigestUtilTest . class . getResource ( "file1.txt" ) . toURI ( ) ) ; java . nio . file . Path path2 = java . nio . file . Paths . get ( nl . jpoint . vertx . deploy . agent ... | org . junit . Assert . assertFalse ( java . util . Arrays . equals ( digest1 , digest2 ) ) |
testGetMaxY ( ) { System . out . println ( "getMaxY" ) ; instance . add ( 1000 , 3 ) ; instance . add ( 1000 , 2 ) ; instance . add ( 1000 , 1 ) ; double expResult = 2.0 ; double [ ] result = instance . getMinMaxY ( ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getMinMaxY ( int ) { return graphRow . getMinMaxY ( maxPoints ) ; ... | org . junit . Assert . assertEquals ( expResult , result [ 1 ] , 0.0 ) |
whenTwoVehiclesHaveTheSameId_theyShouldBeEqual ( ) { com . graphhopper . jsprit . core . problem . vehicle . Vehicle v = VehicleImpl . Builder . newInstance ( "v" ) . setStartLocation ( com . graphhopper . jsprit . core . problem . Location . newInstance ( "start" ) ) . setEndLocation ( com . graphhopper . jsprit . cor... | org . junit . Assert . assertTrue ( v . equals ( v2 ) ) |
testGetListInstanceFleetsResult ( ) { org . finra . herd . model . dto . AwsParamsDto awsParamsDto = new org . finra . herd . model . dto . AwsParamsDto ( AWS_ASSUMED_ROLE_ACCESS_KEY , AWS_ASSUMED_ROLE_SECRET_KEY , AWS_ASSUMED_ROLE_SESSION_TOKEN , HTTP_PROXY_HOST , HTTP_PROXY_PORT , NO_AWS_REGION_NAME ) ; com . amazona... | org . junit . Assert . assertEquals ( listInstanceFleetsResult , result ) |
test ( ) { final int initValue = com . orientechnologies . orient . server . HookInstallServerTest . count ; com . orientechnologies . orient . core . db . OPartitionedDatabasePool pool = new com . orientechnologies . orient . core . db . OPartitionedDatabasePool ( "remote:localhost/test" , "admin" , "admin" ) ; for ( ... | org . junit . Assert . assertEquals ( ( initValue + 10 ) , com . orientechnologies . orient . server . HookInstallServerTest . count ) |
testValidateFailRoomName ( ) { com . tech . configurations . InitializeValidators . InitializeCustomValidators ( ) ; org . json . simple . JSONObject json = new org . json . simple . JSONObject ( ) ; json . put ( "room_name" , "*room" ) ; json . put ( "Failure<sp>expected<sp>true" 0 , "Failure<sp>expected<sp>true" 2 ) ... | org . junit . Assert . assertFalse ( "Failure<sp>expected<sp>true" , r . getLeft ( ) ) |
shouldSampleHalfOfElements ( ) { final int numSplits = 3 ; final java . util . List < uk . gov . gchq . gaffer . data . element . Element > elements = java . util . stream . IntStream . range ( 0 , ( 1000 * numSplits ) ) . mapToObj ( ( i ) -> new uk . gov . gchq . gaffer . data . element . Entity ( TestGroups . ENTITY ... | org . junit . Assert . assertEquals ( numSplits , splits . size ( ) ) |
shouldChangeTitle ( ) { java . lang . String title = "New<sp>Title" ; entry . setTitle ( title ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return titleProperty ( ) . get ( ) ; } | org . junit . Assert . assertThat ( entry . getTitle ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( title ) ) ) |
testContentType_BufferEmpty ( ) { voImageResource . setContentType ( "unchanged" ) ; voImageResource . setBuffer ( new byte [ 0 ] ) ; "<AssertPlaceHolder>" ; } getContentType ( ) { if ( ( method ) == null ) { return super . getContentType ( ) ; } return org . oscm . ui . filter . SsoHttpServletRequestWrapper . HEADER_C... | org . junit . Assert . assertEquals ( "unchanged" , voImageResource . getContentType ( ) ) |
equals_notAnInstance_false ( ) { javax . jcr . Property property = mockProperty ( "myValue" , "/base/path/relative/path/jcr:content" , "propertyName" ) ; com . adobe . acs . commons . wcm . comparisons . impl . PageCompareDataLineImpl underTest = new com . adobe . acs . commons . wcm . comparisons . impl . PageCompareD... | org . junit . Assert . assertFalse ( underTest . equals ( other ) ) |
testTwentySwitchTopology ( ) { org . opennms . netmgt . enlinkd . TwentyNodeTopology topology = new org . opennms . netmgt . enlinkd . TwentyNodeTopology ( ) ; org . opennms . netmgt . enlinkd . service . api . BroadcastDomain domain = new org . opennms . netmgt . enlinkd . service . api . BroadcastDomain ( ) ; org . o... | org . junit . Assert . assertEquals ( 0 , ndbtB . getFailed ( ) . size ( ) ) |
testNewScreenShotFileIsWritable ( ) { boolean dirCreated = builder . getScreenshotsFolder ( ) . mkdir ( ) ; "<AssertPlaceHolder>" ; java . io . FileWriter fwriter = new java . io . FileWriter ( builder . newScreenShotFile ( "test" ) ) ; fwriter . write ( "blabla" ) ; fwriter . close ( ) ; } getScreenshotsFolder ( ) { r... | org . junit . Assert . assertTrue ( dirCreated ) |
testSEOLsymbols ( ) { java . util . regex . Pattern pat = java . util . regex . Pattern . compile ( "^a\\(bb\\[$" ) ; java . util . regex . Matcher mat = pat . matcher ( "a(bb[" ) ; "<AssertPlaceHolder>" ; } matches ( ) { return lookingAt ( leftBound , org . teavm . classlib . java . util . regex . TMatcher . MODE_MATC... | org . junit . Assert . assertTrue ( mat . matches ( ) ) |
testStyle ( ) { java . lang . String html = "<html><head>\n" + ( ( ( ( ( ( "<style>\n" + "/*<sp>*/\n" ) + ".test<sp>{\n" ) + "<sp>text-align:<sp>left;\n" ) + "}\n" ) + "}\n" 0 ) + "</head><body>Hello<sp>world</body></html>" ) ; java . net . URL url = org . apache . uima . ruta . engine . HtmlConverter . class . getClas... | org . junit . Assert . assertEquals ( expectedText , text ) |
pathDtoTest ( ) { org . openkilda . northbound . dto . v1 . links . PathDto dto = new org . openkilda . northbound . dto . v1 . links . PathDto ( org . openkilda . northbound . dto . JsonSerializationTest . SWITCH_ID , 1 , 0 , 10L ) ; "<AssertPlaceHolder>" ; } pass ( T , java . lang . Class ) { return mapper . readValu... | org . junit . Assert . assertEquals ( dto , pass ( dto , org . openkilda . northbound . dto . v1 . links . PathDto . class ) ) |
testAdvertisedIdleTimeoutIsHalfOfActualTimeoutValue ( ) { try ( org . apache . qpid . jms . test . testpeer . TestAmqpPeer testPeer = new org . apache . qpid . jms . test . testpeer . TestAmqpPeer ( ) ) { int configuredTimeout = 54320 ; int advertisedValue = configuredTimeout / 2 ; testPeer . expectSaslAnonymous ( ) ; ... | org . junit . Assert . assertNull ( testPeer . getThrowable ( ) ) |
testFetchPreFilterEmpty ( ) { org . apache . blur . BlurConfiguration configuration = new org . apache . blur . BlurConfiguration ( ) ; org . apache . blur . manager . AliasBlurFilterCache defaultBlurFilterCache = new org . apache . blur . manager . AliasBlurFilterCache ( configuration ) ; org . apache . lucene . searc... | org . junit . Assert . assertNull ( fetchPreFilter ) |
convertAnODTDocumentToHTML ( ) { final java . io . File convertedDocument = converter . convert ( document , inFormat ( html ) ) ; "<AssertPlaceHolder>" ; } exists ( ) { return ( getId ( ) ) != null ; } | org . junit . Assert . assertThat ( convertedDocument . exists ( ) , org . hamcrest . Matchers . is ( true ) ) |
equals_null ( ) { com . icantrap . collections . dawg . Node node = new com . icantrap . collections . dawg . Node ( 'x' ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; com . icantrap . collections . d... | org . junit . Assert . assertFalse ( node . equals ( null ) ) |
testMissingSubject ( ) { try ( io . nats . client . NatsTestServer ts = new io . nats . client . NatsTestServer ( false ) ; io . nats . client . impl . NatsConnection nc = ( ( io . nats . client . impl . NatsConnection ) ( io . nats . client . Nats . connect ( ts . getURI ( ) ) ) ) ) { io . nats . client . impl . NatsC... | org . junit . Assert . assertFalse ( true ) |
testSetColor ( ) { int color = - 1071500202 ; mRoundedColorDrawable . setColor ( color ) ; verify ( mCallback ) . invalidateDrawable ( mRoundedColorDrawable ) ; "<AssertPlaceHolder>" ; } getColor ( ) { return mColor ; } | org . junit . Assert . assertEquals ( color , mRoundedColorDrawable . getColor ( ) ) |
diff_A$Seq ( ) { com . m3 . scalaflavor4j . Nil < java . lang . String > nil = com . m3 . scalaflavor4j . Nil . < java . lang . String > apply ( ) ; com . m3 . scalaflavor4j . Seq < java . lang . String > that = com . m3 . scalaflavor4j . Seq . apply ( "foo" , "bar" ) ; com . m3 . scalaflavor4j . Seq < java . lang . St... | org . junit . Assert . assertThat ( actual . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
test_BrowserFunction_callback_with_boolean ( ) { org . junit . Assume . assumeFalse ( webkit1SkipMsg ( ) , isWebkit1 ) ; java . util . concurrent . atomic . AtomicBoolean javaCallbackExecuted = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; class JavascriptCallback extends org . eclipse . swt . chrom... | org . junit . Assert . assertTrue ( message , passed ) |
prescriptionInformationTest ( ) { org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . EntryRelationship entryRelationship = org . oscarehr . e2e . model . export . body . MedicationsModelTest . medicationsModel . getPrescriptionInformation ( ) ; "<AssertPlaceHolder>" ; } getPrescriptionInformation ( ) { return... | org . junit . Assert . assertNotNull ( entryRelationship ) |
testSetGetStatusDetail ( ) { org . apache . ambari . server . orm . entities . LdapSyncEventEntity event = new org . apache . ambari . server . orm . entities . LdapSyncEventEntity ( 1L ) ; event . setStatusDetail ( "some<sp>detail" ) ; "<AssertPlaceHolder>" ; } getStatusDetail ( ) { return statusDetail ; } | org . junit . Assert . assertEquals ( "some<sp>detail" , event . getStatusDetail ( ) ) |
testgetMajorVersion_returnIsCorrect ( ) { int testResult = rootedAndroidCollectorImpl . getMajorVersion ( ) ; "<AssertPlaceHolder>" ; } getMajorVersion ( ) { return 1 ; } | org . junit . Assert . assertEquals ( 1 , testResult ) |
testNG ( ) { fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( ) ; java . lang . String i = "insert<sp>data<sp>{" + ( ( "graph<sp>us:g1<sp>{<sp>us:Jack<sp>foaf:name<sp>'Jack'<sp>;<sp>foaf:knows<sp>us:Jim<sp>}" + "graph<sp>us:g2<sp>{<sp>us:Jack<sp>foaf:... | org . junit . Assert . assertEquals ( 2 , map . size ( ) ) |
testGetAuthorizationUrl_2 ( ) { org . jinstagram . auth . InstagramApi fixture = new org . jinstagram . auth . InstagramApi ( ) ; org . jinstagram . auth . model . OAuthConfig config = new org . jinstagram . auth . model . OAuthConfig ( "" , "" , "" , "" , "" ) ; java . lang . String result = fixture . getAuthorization... | org . junit . Assert . assertNotNull ( result ) |
defaults ( ) { alluxio . underfs . options . FileLocationOptions options = alluxio . underfs . options . FileLocationOptions . defaults ( ) ; "<AssertPlaceHolder>" ; } getOffset ( ) { return mOffset ; } | org . junit . Assert . assertEquals ( 0 , options . getOffset ( ) ) |
usesFirstCacheForArchivePathAbsolutePath ( ) { com . facebook . buck . io . filesystem . ProjectFilesystem filesystem = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( ) ; java . nio . file . Path path = filesystem . getPath ( "world.jar" ) ; writeJarWithHashes ( filesystem , path ) ; com .... | org . junit . Assert . assertTrue ( innerCache . willGet ( archiveMemberPath ) ) |
testCsvReaderFromFile ( ) { java . io . File file = createTempCsv ( "value" ) ; org . simpleflatmapper . lightningcsv . CloseableCsvReader reader = org . simpleflatmapper . lightningcsv . CsvParser . reader ( file ) ; try { java . util . Iterator < java . lang . String [ ] > iterator = reader . iterator ( ) ; "<AssertP... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "value" } , iterator . next ( ) ) |
testBasic ( ) { java . util . TreeMap < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > tm1 = new java . util . TreeMap ( ) ; java . util . TreeMap < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > expected = new java . util . T... | org . junit . Assert . assertEquals ( expected , actual ) |
testParsingPhilosopherAndWFS ( ) { java . lang . String schemaURL = this . getClass ( ) . getResource ( "../misc/schema/Philosopher.xsd" ) . toString ( ) ; java . lang . String schemaURL2 = "http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" ; org . deegree . gml . schema . GMLAppSchemaReader adapter = new org . deegree . g... | org . junit . Assert . assertEquals ( 4 , fts . size ( ) ) |
testParseNegativeY ( ) { java . lang . String source = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323;<sp>-1" ) + ( getDecimalCharacter ( ) ) ) + "4343;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "6333}" ; org . apache . commons . math . geometry . Vector3D expected = new org . apache . commons . math . geometry... | org . junit . Assert . assertEquals ( expected , actual ) |
testSetInput ( ) { com . twelvemonkeys . imageio . util . ImageReader reader = createReader ( ) ; "<AssertPlaceHolder>" ; for ( com . twelvemonkeys . imageio . util . ImageReaderAbstractTest . TestData data : getTestData ( ) ) { reader . setInput ( data . getInputStream ( ) ) ; } reader . dispose ( ) ; } createReader (... | org . junit . Assert . assertNotNull ( reader ) |
testMapRow ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . stmt . mapped . MappedPreparedQueryTest . LocalFoo , java . lang . Integer > fooDao = createDao ( com . j256 . ormlite . stmt . mapped . MappedPreparedQueryTest . LocalFoo . class , true ) ; com . j256 . ormlite . stmt . mapped . MappedPreparedQ... | org . junit . Assert . assertEquals ( foo1 . id , foo2 . id ) |
canPopulateDateTimeType ( ) { org . bson . Document object = new org . bson . Document ( ) ; org . mongolink . domain . mapper . DateTime dateTime = new org . mongolink . domain . mapper . DateTime ( ) ; object . put ( "creationDate" , dateTime . getMillis ( ) ) ; org . mongolink . domain . mapper . PropertyMapper prop... | org . junit . Assert . assertThat ( instance . getCreationDate ( ) , org . hamcrest . core . Is . is ( dateTime ) ) |
testPublishFailureRetries_retriesDisabled ( ) { com . google . cloud . pubsub . v1 . Publisher publisher = getTestPublisherBuilder ( ) . setExecutorProvider ( com . google . cloud . pubsub . v1 . PublisherImplTest . SINGLE_THREAD_EXECUTOR ) . setRetrySettings ( Publisher . Builder . DEFAULT_RETRY_SETTINGS . toBuilder (... | org . junit . Assert . assertSame ( testPublisherServiceImpl . getCapturedRequests ( ) . size ( ) , 1 ) |
UmlLinkType_InstanceVariableDeclaration_NotComposite_LibraryClass ( ) { java . lang . String fromClass = "domain.direct.violating.AccessInstanceVariableLibraryClass" ; java . lang . String toClass = "xLibraries.fi.foyt.foursquare.api.FoursquareApiException" ; java . lang . String fromAttribute = "fourExc" ; boolean isC... | org . junit . Assert . assertTrue ( isUmlLinkDetectedViaClass ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) ) |
test1 ( ) { final java . io . File tempFile = java . io . File . createTempFile ( "ConcurrentWriteTest_test1" , ".bin" ) ; final long limit = 4000000L ; final long partition = limit / 4L ; final java . io . RandomAccessFile tmpRAF0 = new tlc2 . util . BufferedRandomAccessFile ( tempFile , "rw" ) ; tmpRAF0 . setLength (... | org . junit . Assert . assertEquals ( i , tmpRAF . readLong ( ) ) |
testEquals ( ) { final com . spotify . netty4 . handler . codec . zmtp . ZMTPMessage m1 = com . spotify . netty4 . handler . codec . zmtp . ZMTPMessage . fromUTF8 ( com . spotify . netty4 . handler . codec . zmtp . ZMTPMessageTest . ALLOC , "hello" , "world" ) ; final com . spotify . netty4 . handler . codec . zmtp . Z... | org . junit . Assert . assertThat ( m1 , org . hamcrest . Matchers . is ( m2 ) ) |
testUserMessage ( ) { org . apache . ranger . plugin . errors . ValidationErrorCode errorCode = ValidationErrorCode . SERVICE_VALIDATION_ERR_UNSUPPORTED_ACTION ; java . lang . String aParameter = "FOO" ; java . lang . String expected = errorCode . _template . replace ( "{0}" , aParameter ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertEquals ( expected , errorCode . getMessage ( aParameter ) ) |
testLocalIsoDataThreshold ( ) { ops . run ( net . imagej . ops . Ops . Threshold . IsoData . class , out , in , new net . imglib2 . algorithm . neighborhood . RectangleShape ( 2 , false ) , new net . imglib2 . outofbounds . OutOfBoundsMirrorFactory < net . imglib2 . type . numeric . integer . ByteType , net . imglib2 .... | org . junit . Assert . assertEquals ( true , out . firstElement ( ) . get ( ) ) |
provides_the_uri_of_the_feature_file ( ) { cucumber . runner . Scenario scenario = createScenarioWithFeatureFileUri ( uri ( "path/file.feature" ) ) ; "<AssertPlaceHolder>" ; } getUri ( ) { return uri ; } | org . junit . Assert . assertEquals ( "path/file.feature" , scenario . getUri ( ) ) |
test_Version ( ) { de . vandermeer . svg2vector . applications . base . AppBase < de . vandermeer . svg2vector . applications . is . IsLoader , de . vandermeer . svg2vector . applications . base . AppProperties < de . vandermeer . svg2vector . applications . is . IsLoader > > testApp = new de . vandermeer . svg2vector ... | org . junit . Assert . assertEquals ( 1 , testApp . executeApplication ( args ) ) |
testDirectoryMatchingName ( ) { java . nio . file . Path file = new java . io . File ( testDir , "my.log" ) . toPath ( ) ; java . nio . file . Files . createDirectories ( file ) ; com . streamsets . pipeline . lib . io . LiveDirectoryScanner spooler = new com . streamsets . pipeline . lib . io . LiveDirectoryScanner ( ... | org . junit . Assert . assertNull ( spooler . scan ( null ) ) |
isRegularQueryPathCreatorConstructorWorking ( ) { final java . lang . reflect . Constructor < com . uaihebert . uaicriteria . path . RegularQueryPathCreator > constructor = com . uaihebert . uaicriteria . path . RegularQueryPathCreator . class . getDeclaredConstructor ( new java . lang . Class [ 0 ] ) ; constructor . s... | org . junit . Assert . assertNotNull ( object ) |
testDescribeUri2 ( ) { java . lang . String query = "DESCRIBE<sp><http://example.org/C>" ; "<AssertPlaceHolder>" ; } countResult ( java . lang . String ) { int count = 0 ; try ( it . unibz . inf . ontop . owlapi . resultset . GraphOWLResultSet rs = st . executeGraphQuery ( graphQuery ) ) { while ( rs . hasNext ( ) ) { ... | org . junit . Assert . assertEquals ( 2 , countResult ( query ) ) |
downloadARootFile ( ) { java . lang . String fileToDownload = "Simple.docx" ; java . io . File downlodedFile = new java . io . File ( fr . opensagres . xdocreport . document . tools . remoting . resources . services . client . jaxrs . MainTest . tempFolder , "DownlodedSimple.docx" ) ; java . lang . String [ ] args = ne... | org . junit . Assert . assertTrue ( downlodedFile . exists ( ) ) |
getOperator ( ) { com . google . appengine . api . datastore . Query . CompositeFilterOperator operator = com . google . appengine . api . datastore . Query . CompositeFilterOperator . AND ; org . slim3 . datastore . FilterCriterion [ ] criteria = new org . slim3 . datastore . FilterCriterion [ 0 ] ; org . slim3 . data... | org . junit . Assert . assertThat ( criterion . getOperator ( ) , org . hamcrest . CoreMatchers . is ( operator ) ) |
startingSimulatorWorksWhenSimulatorAlreadyBooted ( ) { ImmutableList . Builder < Map . Entry < com . facebook . buck . util . ProcessExecutorParams , com . facebook . buck . util . FakeProcess > > fakeProcessesBuilder = com . google . common . collect . ImmutableList . builder ( ) ; fakeProcessesBuilder . add ( new jav... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( java . util . Optional . of ( 0L ) ) ) |
addDuppedProxy ( ) { org . openqa . grid . internal . GridRegistry registry = org . openqa . grid . internal . DefaultGridRegistry . newInstance ( new org . openqa . grid . web . Hub ( new org . openqa . grid . internal . utils . configuration . GridHubConfiguration ( ) ) ) ; org . openqa . grid . internal . RemoteProx... | org . junit . Assert . assertEquals ( 4 , registry . getAllProxies ( ) . size ( ) ) |
createValidCompanyUpdateDto ( ) { com . github . schlegel . springjwt . service . company . transport . CompanyUpdateDto companyUpdate = new com . github . schlegel . springjwt . service . company . transport . CompanyUpdateDto ( ) ; companyUpdate . setName ( "new<sp>name" ) ; "<AssertPlaceHolder>" ; } setName ( java .... | org . junit . Assert . assertEquals ( 0 , validator . validate ( companyUpdate ) . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.