input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetProtocolLocation ( ) { java . lang . String result = org . eclipse . rdf4j . http . protocol . Protocol . getProtocolLocation ( org . eclipse . rdf4j . http . protocol . ProtocolTest . serverLocation ) ; "<AssertPlaceHolder>" ; } getProtocolLocation ( java . lang . String ) { return ( org . eclipse . rdf4j . htt... | org . junit . Assert . assertEquals ( result , ( ( ( org . eclipse . rdf4j . http . protocol . ProtocolTest . serverLocation ) + "/" ) + ( org . eclipse . rdf4j . http . protocol . Protocol . PROTOCOL ) ) ) |
testMysqlLoader ( ) { com . mchange . v2 . c3p0 . ComboPooledDataSource ds = new com . mchange . v2 . c3p0 . ComboPooledDataSource ( ) ; ds . setJdbcUrl ( "jdbc:mysql://localhost:3306/nd4j?user=nd4j&password=nd4j" ) ; org . nd4j . jdbc . mysql . MysqlLoader loader = new org . nd4j . jdbc . mysql . MysqlLoader ( ds , "j... | org . junit . Assert . assertEquals ( org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 1 , 2 , 3 } ) , loaded ) |
testEmpty ( ) { java . nio . ByteBuffer bb = java . nio . ByteBuffer . allocate ( 0 ) ; java . io . InputStream is = new org . apache . mina . util . ByteBufferInputStream ( bb ) ; "<AssertPlaceHolder>" ; is . close ( ) ; } read ( ) { return hasRemaining ( ) ? ( get ( ) ) & ( org . apache . mina . codec . IoBuffer . BY... | org . junit . Assert . assertEquals ( ( - 1 ) , is . read ( ) ) |
testIsCollapsedWhenArrowIsARightArrow ( ) { final elemental2 . dom . DOMTokenList classList = mock ( elemental2 . dom . DOMTokenList . class ) ; final elemental2 . dom . HTMLElement arrow = mock ( elemental2 . dom . HTMLElement . class ) ; arrow . classList = classList ; when ( classList . contains ( org . kie . workbe... | org . junit . Assert . assertTrue ( view . isCollapsed ( arrow ) ) |
modifyAttributes_2 ( ) { com . ibm . ws . security . wim . adapter . ldap . context . TimedDirContext ctx = null ; try { ctx = new com . ibm . ws . security . wim . adapter . ldap . context . TimedDirContext ( getEnvironment ( ) , null , 0 ) ; javax . naming . directory . Attributes attrs = new javax . naming . directo... | org . junit . Assert . assertEquals ( "new<sp>employee<sp>type" , user . get ( "employeeType" ) . get ( ) . toString ( ) ) |
testSetScaleMode ( ) { scanner . setScaleMode ( BarcodeScanner . ScaleMode . FILL ) ; "<AssertPlaceHolder>" ; } getScaleMode ( ) { checkWidget ( ) ; return scaleMode ; } | org . junit . Assert . assertEquals ( BarcodeScanner . ScaleMode . FILL , scanner . getScaleMode ( ) ) |
testGetVacanciesByName ( ) { java . lang . String name1 = "alpha" ; java . lang . String name2 = "charlie" ; org . oscarehr . PMmodule . model . Vacancy vacancy1 = new org . oscarehr . PMmodule . model . Vacancy ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vacancy1... | org . junit . Assert . assertTrue ( true ) |
shouldSapperDestroyMine_whenMineExistInGivenDirection ( ) { for ( com . codenjoy . dojo . minesweeper . model . Direction direction : com . codenjoy . dojo . minesweeper . model . Direction . values ( ) ) { board . useMineDetectorToGivenDirection ( direction ) ; boolean isMineInDirection = board . getMines ( ) . contai... | org . junit . Assert . assertTrue ( ( ! isMineInDirection ) ) |
testBigDecConvertEmpty ( ) { org . apache . hadoop . mapreduce . lib . db . TextSplitter splitter = new org . apache . hadoop . mapreduce . lib . db . TextSplitter ( ) ; java . lang . String emptyStr = splitter . bigDecimalToString ( BigDecimal . ZERO ) ; "<AssertPlaceHolder>" ; } bigDecimalToString ( java . math . Big... | org . junit . Assert . assertEquals ( "" , emptyStr ) |
testTransition2 ( ) { byte chr = 3 ; jannovar . exome . Variant v = new jannovar . exome . Variant ( chr , 13 , "A" , "T" , null , dummyPhred ) ; boolean b = v . isTransition ( ) ; "<AssertPlaceHolder>" ; } isTransition ( ) { if ( ! ( is_single_nucleotide_variant ( ) ) ) return false ; return false ; } | org . junit . Assert . assertEquals ( false , b ) |
shouldDoGetMaxIndexWithAddedElementsNumber ( ) { int addedElementsNumber = 1 ; int windowSize = 3 ; com . orange . dgil . trail . core . common . TrailPoint [ ] points = new com . orange . dgil . trail . core . common . TrailPoint [ windowSize ] ; com . orange . dgil . trail . TestTools . setObj ( "addedElementsNumber"... | org . junit . Assert . assertEquals ( 0 , ret ) |
doesNotMatchNonExistentComposedTerm ( ) { final com . hartwig . hmftools . patientdb . curators . TreatmentCurator curator = com . hartwig . hmftools . patientdb . curators . TestCuratorFactory . treatmentCurator ( ) ; final java . util . List < com . hartwig . hmftools . patientdb . data . CuratedDrug > curatedDrugs =... | org . junit . Assert . assertEquals ( 0 , curatedDrugs . size ( ) ) |
whenArrayIndexIsCorrect_thenPerformOperation ( ) { int [ ] numbers = new int [ ] { 0 , 1 } ; numbers [ 1 ] += 5 ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 6 , numbers [ 1 ] ) |
getSoortVerbintenisNOkTest ( ) { final java . lang . String code = "X" ; final java . lang . String resultNat = lo3StamtabelService . getSoortVerbintenis ( code ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( code , resultNat ) |
testChildNamespaceModified ( ) { long childNamespaceId = 1 ; long parentNamespaceId = 2 ; com . ctrip . framework . apollo . biz . entity . Namespace childNamespace = createNamespace ( childNamespaceId ) ; com . ctrip . framework . apollo . biz . entity . Namespace parentNamespace = createNamespace ( parentNamespaceId ... | org . junit . Assert . assertTrue ( isModified ) |
testNullString ( ) { "<AssertPlaceHolder>" ; } isNumeric ( java . lang . String ) { return com . opera . core . systems . common . lang . OperaStrings . isDouble ( string ) ; } | org . junit . Assert . assertEquals ( false , com . opera . core . systems . common . lang . OperaStrings . isNumeric ( null ) ) |
testRangedAnd ( ) { int length = 1000 ; int NUM_ITER = 10 ; java . util . Random random = new java . util . Random ( 1234 ) ; for ( int test = 0 ; test < 50 ; ++ test ) { final org . roaringbitmap . RoaringBitmap rb1 = new org . roaringbitmap . RoaringBitmap ( ) ; final org . roaringbitmap . RoaringBitmap rb2 = new org... | org . junit . Assert . assertEquals ( expectedResultSet , actualResultSet ) |
testIndent_1Level_MultiLine ( ) { java . lang . String expected = "\tmulti\n\tline\n\tstring" ; java . lang . String input = "multi\nline\nstring" ; java . lang . String actual = it . indent ( input ) ; "<AssertPlaceHolder>" ; } indent ( java . lang . String ) { if ( ( count ) > 0 ) { java . lang . StringBuilder sb = n... | org . junit . Assert . assertEquals ( expected , actual ) |
testCreateOfferId ( ) { com . google . api . ads . adwords . axis . v201809 . cm . ProductOfferId offerId = com . google . api . ads . adwords . axis . utils . v201809 . shopping . ProductDimensions . createOfferId ( com . google . api . ads . adwords . axis . utils . v201809 . shopping . ProductDimensionsTest . STRING... | org . junit . Assert . assertEquals ( com . google . api . ads . adwords . axis . utils . v201809 . shopping . ProductDimensionsTest . STRING_VALUE , offerId . getValue ( ) ) |
testInterpolation2 ( ) { final int sz = 21 ; double [ ] xval = new double [ sz ] ; double [ ] yval = new double [ sz ] ; final double delta = 1.0 / ( sz - 1 ) ; for ( int i = 0 ; i < sz ; i ++ ) { xval [ i ] = ( - 1 ) + ( ( 15 * i ) * delta ) ; yval [ i ] = ( - 20 ) + ( ( 30 * i ) * delta ) ; } org . hipparchus . analy... | org . junit . Assert . assertEquals ( f . value ( x , y ) , p . value ( x , y ) , tol ) |
testCreateSecurityGroupIPSet ( ) { com . fit2cloud . qingcloud . wsclient . CreateSecurityGroupIPSetRequest createSecurityGroupIPSetRequest = new com . fit2cloud . qingcloud . wsclient . CreateSecurityGroupIPSetRequest ( ) ; createSecurityGroupIPSetRequest . setZone ( QingCloudZone . PEK1 ) ; createSecurityGroupIPSetRe... | org . junit . Assert . assertTrue ( ( ( createSecurityGroupIPSetResponse . getRet_code ( ) ) == 0 ) ) |
testDeleteDirectoryIgnoreExceptionWithException ( ) { final java . io . File testFile = createLocalFile ( localTempPath . toString ( ) , "SOME_FILE" , org . finra . herd . core . FILE_SIZE_1_KB ) ; executeWithoutLogging ( org . finra . herd . core . HerdFileUtils . class , new org . finra . herd . core . Command ( ) { ... | org . junit . Assert . assertTrue ( testFile . exists ( ) ) |
testWatchClusterAssignmentData ( ) { org . apache . bookkeeper . stream . proto . cluster . ClusterAssignmentData assignmentData = org . apache . bookkeeper . stream . proto . cluster . ClusterAssignmentData . newBuilder ( ) . putServers ( "server-0" , org . apache . bookkeeper . stream . proto . cluster . ServerAssign... | org . junit . Assert . assertEquals ( assignmentData , store . getClusterAssignmentData ( ) ) |
newDocumentWebHomeButTerminalFromURL ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "xwiki" , java . util . Arrays . asList ( "X" , "Y" ) , "WebHome" ) ; com . xpn . xwiki . doc . XWikiDocument document = mock ( com . xpn . xwiki .... | org . junit . Assert . assertNull ( result ) |
testGetMessageBoardMessageMyRating ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testMinFunction ( ) { com . srotya . sidewinder . core . functions . list . MinFunction f = new com . srotya . sidewinder . core . functions . list . MinFunction ( ) ; double [ ] values = new double [ ] { 2.2 , 1.1 , 3.3 , 4.4 } ; java . util . List < com . srotya . sidewinder . core . storage . DataPoint > dps = new j... | org . junit . Assert . assertEquals ( 1.1 , result . getDataPoints ( ) . get ( 0 ) . getValue ( ) , 0 ) |
testProbability ( ) { int [ ] points = new int [ ] { - 2 , - 1 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 } ; double [ ] results = new double [ ] { 0 , 0.2 , 0 , 0 , 0 , 0.5 , 0 , 0 , 0 , 0.3 , 0 } ; for ( int p = 0 ; p < ( points . length ) ; p ++ ) { double probability = testDistribution . probability ( points [ p ] ) ; "<A... | org . junit . Assert . assertEquals ( results [ p ] , probability , 0.0 ) |
testOsp2ChargeSingleB ( ) { org . openscience . cdk . interfaces . IAtomContainer molecule = builder . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; molecule . addAtom ( builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; molecule . addAtom ( builde... | org . junit . Assert . assertEquals ( 0 , setOfReactions . getReactionCount ( ) ) |
testNestedIf4 ( ) { instrument ( org . jacoco . core . test . validation . java5 . CyclomaticComplexityTest . NestedIf . class ) ; target . test ( ( - 1 ) ) ; target . test ( 0 ) ; target . test ( ( + 1 ) ) ; final org . jacoco . core . analysis . ICounter complexity = analyze ( ) ; "<AssertPlaceHolder>" ; } getInstanc... | org . junit . Assert . assertEquals ( org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 0 , 3 ) , complexity ) |
testGetExpectedPartitionValue ( ) { int offset = 1 ; java . lang . String partitionOffset = expectedPartitionValueDaoTestHelper . getTestSortedExpectedPartitionValues ( ) . get ( offset ) ; org . finra . herd . model . api . xml . ExpectedPartitionValueKey expectedPartitionValueKey = new org . finra . herd . model . ap... | org . junit . Assert . assertEquals ( expectedPartitionValuesInformation , resultPartitionValueInformation ) |
withClosedEnd ( ) { net . time4j . PlainDate start = net . time4j . PlainDate . of ( 2014 , 2 , 27 ) ; net . time4j . PlainDate end = net . time4j . PlainDate . of ( 2014 , 5 , 14 ) ; net . time4j . range . DateInterval interval = net . time4j . range . DateInterval . between ( start , end ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertThat ( interval . withClosedEnd ( ) , org . hamcrest . CoreMatchers . is ( interval ) ) |
testReadOnlyReplicaCorrupt ( ) { client . reportBadBlocks ( new org . apache . hadoop . hdfs . protocol . LocatedBlock [ ] { new org . apache . hadoop . hdfs . protocol . LocatedBlock ( extendedBlock , new org . apache . hadoop . hdfs . protocol . DatanodeInfo [ ] { readOnlyDataNode } ) } ) ; waitForLocations ( 1 ) ; o... | org . junit . Assert . assertThat ( numberReplicas . corruptReplicas ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
getFirst_A$ ( ) { java . lang . String _1 = "foo" ; java . lang . Integer _2 = 123 ; java . lang . Long _3 = 456L ; java . lang . Boolean _4 = true ; java . lang . Double _5 = 7.8 ; com . m3 . scalaflavor4j . Tuple5 < java . lang . String , java . lang . Integer , java . lang . Long , java . lang . Boolean , java . lan... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testPutAndGetObject ( ) { java . lang . String myObj = "This<sp>is<sp>a<sp>test" ; storage . putObject ( "test-obj" , "test-key" , myObj ) ; java . lang . String s = storage . getObject ( "test-obj" , "test-key" ) ; storage . shutdown ( ) ; "<AssertPlaceHolder>" ; } shutdown ( ) { for ( java . io . ObjectInputStream oi... | org . junit . Assert . assertThat ( s , org . hamcrest . core . Is . is ( myObj ) ) |
testSyslogStart ( ) { ch . qos . logback . core . pattern . DynamicConverter < ch . qos . logback . classic . spi . ILoggingEvent > converter = new ch . qos . logback . classic . pattern . SyslogStartConverter ( ) ; this . optionList . clear ( ) ; this . optionList . add ( "MAIL" ) ; converter . setOptionList ( this . ... | org . junit . Assert . assertTrue ( buf . toString ( ) . startsWith ( expected ) ) |
testAbsDelete ( ) { java . util . Random r = new java . util . Random ( ) ; long seed = r . nextLong ( ) ; r . setSeed ( seed ) ; System . out . println ( ( "SEED:<sp>" + seed ) ) ; java . util . List < org . apache . hadoop . fs . Path > dirs = buildDirs ( r , org . apache . hadoop . yarn . server . nodemanager . Test... | org . junit . Assert . assertFalse ( org . apache . hadoop . yarn . server . nodemanager . TestDeletionService . lfs . util ( ) . exists ( p ) ) |
testHaalPersoonOpMetAdresViaBetrokkenheid ( ) { nl . bzk . brp . model . objecttype . operationeel . BetrokkenheidModel betrokkenheid = em . find ( nl . bzk . brp . model . objecttype . operationeel . BetrokkenheidModel . class , 1 ) ; nl . bzk . brp . model . objecttype . operationeel . PersoonModel persoon = persoonR... | org . junit . Assert . assertNotNull ( persoon ) |
testSortMixed ( ) { com . googlecode . cqengine . resultset . order . List < com . googlecode . cqengine . testutil . Car > cars = com . googlecode . cqengine . resultset . order . Arrays . asList ( new com . googlecode . cqengine . testutil . Car ( 0 , "Ford" , "Taurus" , Car . Color . BLACK , 4 , 2000.0 , com . googl... | org . junit . Assert . assertEquals ( expected , cars ) |
shouldBeAbleToAddASingleNonZeroLengthFile ( ) { java . io . File reference = java . io . File . createTempFile ( "reference" , ".zip" ) ; try ( com . facebook . buck . util . zip . CustomZipOutputStream out = com . facebook . buck . util . zip . ZipOutputStreams . newOutputStream ( output , mode ) ; java . util . zip .... | org . junit . Assert . assertArrayEquals ( expected , seen ) |
returnPendingIfNullIsPassedIntoParseLineMulti ( ) { java . lang . String [ ] nextLine = csvParser . parseLineMulti ( "This,\"is<sp>a<sp>\"goo\\d\"<sp>line\\\\<sp>to<sp>parse\\" ) ; org . junit . Assert . assertEquals ( 1 , nextLine . length ) ; org . junit . Assert . assertEquals ( "This" , nextLine [ 0 ] ) ; org . jun... | org . junit . Assert . assertFalse ( csvParser . isPending ( ) ) |
testGetByName ( ) { java . lang . String name = "theone" ; com . xiaomi . shepher . model . Team team = teamMapper . getByName ( name ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( 5 , team . getId ( ) ) |
testLateServerStart ( ) { final int numServer = 3 ; org . apache . ratis . server . impl . LOG . info ( "Running<sp>testLateServerStart" ) ; final org . apache . ratis . MiniRaftCluster cluster = org . apache . ratis . server . impl . LeaderElectionTests . newCluster ( numServer ) ; cluster . initServers ( ) ; final ja... | org . junit . Assert . assertEquals ( leader . getId ( ) , lastServerLeaderId ) |
testLessThanEquals ( ) { com . mongodb . DBObject actual = parse ( "number<sp><=<sp>?" ) . getQuery ( ) ; com . mongodb . DBObject expected = com . mongodb . QueryBuilder . start ( "number" ) . lessThanEquals ( com . gigaspaces . persistency . qa . utest . parser . SQL2MongoBaseVisitorTest . PARAMETER_PLACEHOLDER ) . g... | org . junit . Assert . assertEquals ( expected , actual ) |
testLeeg ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpIstRelatieGroepInhoud > brpInhoud = mapper . map ( new java . util . HashSet < nl . bzk . brp . model . logisch . ist . Stapel > ( ) ) ; "<AssertPlaceHolder>" ; } map ( java ... | org . junit . Assert . assertNull ( brpInhoud ) |
testGetConvFlowId ( ) { java . lang . String nwId = "network01" ; java . lang . String flowId = "flow01" ; java . util . ArrayList < java . lang . String > flowList = new java . util . ArrayList < java . lang . String > ( ) { { add ( "flow01" ) ; add ( "flow02" ) ; } } ; org . o3project . odenos . core . component . Co... | org . junit . Assert . assertThat ( target . getConvFlowId ( nwId , flowId ) , org . hamcrest . CoreMatchers . is ( "flow01" ) ) |
testPackageName1 ( ) { java . lang . String voice = "cmu-slt-hsmm" ; java . lang . String expected = "CmuSltHsmm" ; java . lang . String actual = marytts . tools . voiceimport . VoiceCompiler . toPackageName ( voice ) ; "<AssertPlaceHolder>" ; } toPackageName ( java . lang . String ) { java . lang . String regexLCLette... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldInvalidateSchemaStateOnDropConstraint ( ) { org . neo4j . internal . kernel . api . schema . constraints . ConstraintDescriptor descriptor = createConstraint ( ) ; commitToSchemaState ( "test" , "before" ) ; dropConstraint ( descriptor ) ; java . lang . String after = commitToSchemaState ( "test" , "after" ) ; "<... | org . junit . Assert . assertEquals ( "after" , after ) |
testSortDifferentMediaByOneAttribute ( ) { com . liferay . adaptive . media . AdaptiveMedia < com . liferay . adaptive . media . image . processor . AMImageProcessor > adaptiveMedia1 = _createAdaptiveMedia ( com . liferay . adaptive . media . AMAttribute . getContentLengthAMAttribute ( ) , 10L ) ; com . liferay . adapt... | org . junit . Assert . assertEquals ( ( - 10 ) , result ) |
whenPreviouslyReadByOtherThread_thenNoProblems ( ) { org . multiverse . stms . gamma . transactionalobjects . GammaTxnLong ref = new org . multiverse . stms . gamma . transactionalobjects . GammaTxnLong ( stm , 10 ) ; org . multiverse . stms . gamma . transactions . GammaTxn otherTx = stm . newDefaultTxn ( ) ; ref . ge... | org . junit . Assert . assertEquals ( 10 , result ) |
shouldAddAnAttributeToAVisit ( ) { int before = service . getVisitByUuid ( RestTestConstants1_9 . VISIT_UUID ) . getAttributes ( ) . size ( ) ; java . lang . String json = "{\"attributeType\":\"6770f6d6-7673-11e0-8f03-001e378eb67g\",<sp>\"value\":\"2012-08-25\"}" ; handle ( newPostRequest ( getURI ( ) , json ) ) ; int ... | org . junit . Assert . assertEquals ( ( before + 1 ) , after ) |
deveObterNumeroFaturaComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoFatura fatura = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoFatura ( ) ; final java . lang . String numeroFatura = "KDVAp0aewPjmHaTsjbDX1O6NOR9tc7TxGflFLXsMZt2hEKar3oqzZ11... | org . junit . Assert . assertEquals ( numeroFatura , fatura . getNumeroFatura ( ) ) |
test07OnlyProjectAggr ( ) { raptorContext . setAllowFullTableScan ( true ) ; java . lang . String query = "ServiceInstance<@https,<sp>@activeManifestDiff>{$max(@port)}" ; com . ebay . cloud . cms . query . service . IQueryResult result = queryService . query ( query , raptorContext ) ; "<AssertPlaceHolder>" ; } getEnti... | org . junit . Assert . assertEquals ( 2 , result . getEntities ( ) . size ( ) ) |
testHeightImmutable ( ) { org . gedcom4j . model . thirdpartyadapters . FamilyTreeMaker3Adapter a = new org . gedcom4j . model . thirdpartyadapters . FamilyTreeMaker3Adapter ( ) ; java . util . List < org . gedcom4j . model . CustomFact > cfs = a . getHeights ( jesse ) ; "<AssertPlaceHolder>" ; cfs . clear ( ) ; } getH... | org . junit . Assert . assertNotNull ( cfs ) |
testGetTarget ( ) { org . oryxeditor . server . diagram . basic . BasicEdge e = new org . oryxeditor . server . diagram . basic . BasicEdge ( "anEdge" ) ; org . oryxeditor . server . diagram . basic . BasicShape target = getBasicShapeOfRandomType ( "target" ) ; e . setTargetAndUpdateOutgoings ( target ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( target , e . getTarget ( ) ) |
testRead ( ) { java . nio . channels . FileLock lock = null ; java . io . RandomAccessFile randomAccessFile = null ; try { readData ( sample ) ; java . io . File fileAfterRead = new java . io . File ( sample ) ; randomAccessFile = new java . io . RandomAccessFile ( fileAfterRead , "rw" ) ; java . nio . channels . FileC... | org . junit . Assert . assertTrue ( lock . isValid ( ) ) |
validUnversionedNoVersioner ( ) { org . apache . shindig . common . uri . Uri uri = makeValidationTestUri ( ( ( org . apache . shindig . gadgets . uri . DefaultIframeUriManagerTest . LD_PREFIX ) + ( org . apache . shindig . gadgets . uri . DefaultIframeUriManagerTest . LD_SUFFIX ) ) , "version" ) ; org . apache . shind... | org . junit . Assert . assertEquals ( UriStatus . VALID_UNVERSIONED , manager . validateRenderingUri ( uri ) ) |
testRawFilter ( ) { java . lang . String expected = "nodeList:{<sp>[0]<sp>[5]<sp>}" ; java . util . List < org . opennms . netmgt . model . OnmsNode > nodeList = org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . getMockNodeList ( ) ; java . lang . String s1 = org . opennms . fea... | org . junit . Assert . assertEquals ( expected , s2 ) |
validate_shouldPassValidationIfFieldLengthsAreCorrect ( ) { org . openmrs . Role role = new org . openmrs . Role ( ) ; role . setRole ( "Bowling<sp>race<sp>car<sp>driver" ) ; role . setDescription ( "description" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindExcep... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testNoUnConvertLt ( ) { java . lang . String testString = "<" ; "<AssertPlaceHolder>" ; } unescapeToXML ( java . lang . String ) { if ( com . github . bordertech . wcomponents . util . Util . empty ( input ) ) { return input ; } java . lang . String encoded = com . github . bordertech . wcomponents . WebUtilities . dou... | org . junit . Assert . assertEquals ( testString , com . github . bordertech . wcomponents . util . HtmlToXMLUtil . unescapeToXML ( testString ) ) |
testHasColor ( ) { org . eclipse . swt . graphics . Color color = org . eclipse . swt . widgets . Display . getCurrent ( ) . getSystemColor ( SWT . COLOR_BLACK ) ; com . eclipsesource . tabris . passepartout . internal . instruction . BackgroundInstruction instruction = new com . eclipsesource . tabris . passepartout .... | org . junit . Assert . assertSame ( color , actualColor ) |
testGetSigner ( ) { com . aliyuncs . profile . DefaultProfile profile = com . aliyuncs . profile . DefaultProfile . getProfile ( "cn-hangzhou" ) ; "<AssertPlaceHolder>" ; } getSigner ( ) { return null ; } | org . junit . Assert . assertNull ( profile . getSigner ( ) ) |
test_unmodifiableNavigableSet_pass2 ( ) { java . util . NavigableSet < java . util . Date > set1 = new java . util . TreeSet < java . util . Date > ( ) ; set1 . add ( new bb . util . Date2 ( 0 ) ) ; java . util . NavigableSet < java . util . Date > set2 = bb . util . Collections2 . unmodifiableNavigableSet ( set1 ) ; "... | org . junit . Assert . assertEquals ( set1 , set2 ) |
check ( ) { "<AssertPlaceHolder>" ; validator . validOS ( "Linux" ) ; validator . validOS ( "windows" ) ; validator . validOS ( "Mac<sp>OS" ) ; } | org . junit . Assert . assertNotNull ( validator ) |
testSerialization ( ) { org . jfree . chart . axis . NumberTickUnit t1 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" ) ) ; org . jfree . chart . axis . NumberTickUnit t2 = ( ( org . jfree . chart . axis . NumberTickUnit ) ( org . jfree . chart . TestUtils . serialis... | org . junit . Assert . assertEquals ( t1 , t2 ) |
coreSimulatorServicePathFetchedFromLaunchctlPrint ( ) { ImmutableList . Builder < Map . Entry < com . facebook . buck . util . ProcessExecutorParams , com . facebook . buck . util . FakeProcess > > fakeProcessesBuilder = com . google . common . collect . ImmutableList . builder ( ) ; fakeProcessesBuilder . add ( new ja... | org . junit . Assert . assertThat ( coreSimulatorServicePath , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expected ) ) ) |
addBranchWithInstruction_should_not_increment_branches_when_only_one_branch_is_added ( ) { instruction . addBranch ( new org . jacoco . core . internal . analysis . Instruction ( 122 ) , 0 ) ; "<AssertPlaceHolder>" ; } getBranchCounter ( ) { if ( ( branches ) < 2 ) { return CounterImpl . COUNTER_0_0 ; } final int cover... | org . junit . Assert . assertEquals ( CounterImpl . COUNTER_0_0 , instruction . getBranchCounter ( ) ) |
testExecuteUpdate ( ) { com . taobao . tddl . group . jdbc . TGroupConnection conn = null ; java . sql . PreparedStatement stat = null ; try { conn = com . taobao . tddl . group . jdbc . TGroupStatementTest . tgds . getConnection ( ) ; stat = conn . prepareStatement ( "update<sp>xxxx<sp>set<sp>name<sp>=<sp>'newname'" )... | org . junit . Assert . assertEquals ( affect , 1 ) |
testGetAllDatabasesForMetaException ( ) { given ( client . getAllDatabases ( ) ) . willThrow ( org . apache . hadoop . hive . metastore . api . MetaException . class ) ; doNothing ( ) . when ( client ) . reconnect ( ) ; "<AssertPlaceHolder>" ; verify ( client ) . getAllDatabases ( ) ; verify ( client ) . reconnect ( ) ... | org . junit . Assert . assertTrue ( ( ( service . getAllDatabases ( ) ) == null ) ) |
fromRollupTypeClassSimpleNumberYieldsBasic ( ) { "<AssertPlaceHolder>" ; } fromRollupTypeClass ( java . lang . Class ) { if ( ( ( rollupTypeClass . equals ( com . rackspacecloud . blueflood . types . SimpleNumber . class ) ) || ( rollupTypeClass . equals ( com . rackspacecloud . blueflood . types . BasicRollup . class ... | org . junit . Assert . assertEquals ( RollupType . BF_BASIC , com . rackspacecloud . blueflood . types . RollupType . fromRollupTypeClass ( com . rackspacecloud . blueflood . types . SimpleNumber . class ) ) |
createDynamicModule ( ) { de . devsurf . injection . guice . scanner . StartupModule startup = de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . PackageFilter . create ( de .... | org . junit . Assert . assertNotNull ( injector ) |
test47 ( ) { com . spatial4j . core . context . SpatialContext ctx = com . spatial4j . core . context . SpatialContext . GEO ; int maxLevels = 11 ; org . apache . lucene . spatial . prefix . tree . SpatialPrefixTree grid = new org . apache . lucene . spatial . prefix . tree . GeohashPrefixTree ( ctx , maxLevels ) ; org... | org . junit . Assert . assertTrue ( equals ) |
testLastMoveWasCapture_WasACapture ( ) { eubos . position . TrackedMove tm = new eubos . position . TrackedMove ( new com . fluxchess . jcpi . models . GenericMove ( "a2b3" ) , new eubos . board . pieces . Pawn ( eubos . board . pieces . Piece . Colour . black , com . fluxchess . jcpi . models . GenericPosition . b3 ) ... | org . junit . Assert . assertTrue ( classUnderTest . lastMoveWasCapture ( ) ) |
testGetRestrictionForEmpty ( ) { javax . jcr . Value val = createEntry ( java . util . Collections . < org . apache . jackrabbit . oak . spi . security . authorization . restriction . Restriction > emptySet ( ) ) . getRestriction ( AccessControlConstants . REP_GLOB ) ; "<AssertPlaceHolder>" ; } getRestriction ( java . ... | org . junit . Assert . assertNull ( val ) |
testGetVerticesByLabel ( ) { java . util . List < org . s1ck . gdl . model . Vertex > bVertices = com . google . common . collect . Lists . newArrayList ( org . gradoop . flink . model . impl . operators . matching . common . query . QueryHandlerTest . QUERY_HANDLER . getVerticesByLabel ( "B" ) ) ; java . util . List <... | org . junit . Assert . assertTrue ( org . gradoop . flink . model . impl . operators . matching . common . query . QueryHandlerTest . elementsEqual ( bVertices , expected ) ) |
testCos ( ) { final org . apache . commons . math4 . analysis . UnivariateFunction cos = new org . apache . commons . math4 . analysis . function . Cos ( ) ; final org . apache . commons . math4 . analysis . integration . gauss . GaussIntegrator integrator = org . apache . commons . math4 . analysis . integration . gau... | org . junit . Assert . assertEquals ( 1 , s , java . lang . Math . ulp ( 1.0 ) ) |
testParameters ( ) { "<AssertPlaceHolder>" ; } getParameters ( ) { if ( ( parameters ) == null ) { parameters = new ch . qos . logback . core . net . ssl . SSLParametersConfiguration ( ) ; } return parameters ; } | org . junit . Assert . assertNotNull ( configuration . getParameters ( ) ) |
testFailureIfThetaisNull ( ) { aima . core . logic . fol . parsing . ast . Variable var = new aima . core . logic . fol . parsing . ast . Variable ( "x" ) ; aima . core . logic . fol . parsing . ast . Sentence sentence = parser . parse ( "Knows(x)" ) ; theta = null ; java . util . Map < aima . core . logic . fol . pars... | org . junit . Assert . assertNull ( result ) |
testConst ( ) { org . roaringbitmap . ArrayContainer ac1 = new org . roaringbitmap . ArrayContainer ( 5 , 15 ) ; short [ ] data = new short [ ] { 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 } ; org . roaringbitmap . ArrayContainer ac2 = new org . roaringbitmap . ArrayContainer ( data ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( ac1 , ac2 ) |
testZipFile_fixture_2 ( ) { com . impetus . ankush . agent . utils . ZipFiles fixture2 = getFixture ( ) ; java . lang . String filePath = "0123456789" ; java . lang . String result = fixture2 . zipFile ( filePath ) ; java . io . File file = new java . io . File ( ( filePath + ".zip" ) ) ; file . delete ( ) ; "<AssertPl... | org . junit . Assert . assertEquals ( null , result ) |
testRequireCapabilityHeaderEquality ( ) { java . lang . String headerStr1 = "osgi.ee;<sp>filter:=\"(osgi.ee=*)\",screen.size;<sp>filter:=\"(&(width>=800)(height>=600))\"" ; java . lang . String headerStr2 = "screen.size;<sp>filter:=\"(&(width>=800)(height>=600))\",osgi.ee;<sp>filter:=\"(osgi.ee=*)\"" ; org . apache . a... | org . junit . Assert . assertEquals ( header1 , header2 ) |
putsChar ( ) { char [ ] array = new char [ 5 ] ; java . nio . CharBuffer buffer = java . nio . CharBuffer . wrap ( array ) ; buffer . put ( 'T' ) . put ( 'e' ) . put ( 'a' ) . put ( 'V' ) . put ( 'M' ) ; "<AssertPlaceHolder>" ; } put ( E ) { java . util . Objects . requireNonNull ( e ) ; while ( isFull ( ) ) { waitForC... | org . junit . Assert . assertThat ( array , org . hamcrest . CoreMatchers . is ( new char [ ] { 'T' , 'e' , 'a' , 'V' , 'M' } ) ) |
testCollectionTimeValid ( ) { long currentTime = new com . rackspacecloud . blueflood . utils . DefaultClockImpl ( ) . now ( ) . getMillis ( ) ; metric . setCollectionTime ( currentTime ) ; java . util . Set < javax . validation . ConstraintViolation < com . rackspacecloud . blueflood . inputs . formats . JSONMetric > ... | org . junit . Assert . assertEquals ( 0 , constraintViolations . size ( ) ) |
testGetLegendItems ( ) { org . jfree . data . xy . XYDataset d0 = createDataset1 ( ) ; org . jfree . data . xy . XYDataset d1 = createDataset2 ( ) ; org . jfree . chart . renderer . xy . XYItemRenderer r0 = new org . jfree . chart . renderer . xy . XYLineAndShapeRenderer ( ) ; org . jfree . chart . plot . XYPlot plot =... | org . junit . Assert . assertEquals ( 2 , items . getItemCount ( ) ) |
isEmpty ( ) { com . psddev . dari . util . ObjectMap objmap = new com . psddev . dari . util . ObjectMap ( new java . lang . Object ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return false ; } | org . junit . Assert . assertTrue ( objmap . isEmpty ( ) ) |
givenValidURI_whenGetResource_thenResultsEqualsExpected ( ) { com . brandwatch . robots . cli . Result result = new com . brandwatch . robots . cli . Result ( com . brandwatch . robots . cli . ResultTest . VALID_RESOURCE , true ) ; "<AssertPlaceHolder>" ; } getResource ( ) { return resource ; } | org . junit . Assert . assertThat ( result . getResource ( ) , org . hamcrest . CoreMatchers . equalTo ( com . brandwatch . robots . cli . ResultTest . VALID_RESOURCE ) ) |
writeCounters ( ) { eu . dnetlib . iis . common . counter . NamedCounters namedCounters = new eu . dnetlib . iis . common . counter . NamedCounters ( new java . lang . String [ ] { counterName1 , counterName2 } ) ; namedCounters . increment ( counterName1 , 4L ) ; namedCounters . increment ( counterName2 , 2L ) ; count... | org . junit . Assert . assertEquals ( expectedProperties , actualProperties ) |
testGetElement ( ) { System . out . println ( "getElement" ) ; long value = 0L ; kg . apc . charting . AbstractGraphRow instance = new kg . apc . charting . AbstractGraphRowTest . AbstractGraphRowImpl ( ) ; kg . apc . charting . AbstractGraphPanelChartElement result = instance . getElement ( value ) ; "<AssertPlaceHold... | org . junit . Assert . assertNotNull ( result ) |
timezoneOffsetSpecificValues ( ) { java . lang . String n = "" ; for ( int i = 1 ; i <= 9 ; i ++ ) { n += ( ( char ) ( 48 + i ) ) ; com . dslplatform . json . OffsetDateTime value = com . dslplatform . json . OffsetDateTime . parse ( ( ( "1919-03-05T04:51:49." + n ) + "+01:00" ) ) ; com . dslplatform . json . JsonWrite... | org . junit . Assert . assertEquals ( value , deser ) |
testGetParameters ( ) { java . lang . Long personPaperId = 1L ; org . lnu . is . domain . person . paper . PersonPaper personPaper = new org . lnu . is . domain . person . paper . PersonPaper ( ) ; personPaper . setId ( personPaperId ) ; java . lang . Long benefitId = 2L ; org . lnu . is . domain . benefit . Benefit be... | org . junit . Assert . assertEquals ( expected , actual ) |
testTimeout ( ) { io . craft . atom . io . IoConnector connector = io . craft . atom . nio . api . NioFactory . newTcpConnector ( new io . craft . atom . nio . NioConnectorHandler ( ) ) ; java . util . concurrent . Future < io . craft . atom . io . Channel < byte [ ] > > future = connector . connect ( "127.0.0.1" , io ... | org . junit . Assert . assertTrue ( true ) |
testDestroyingInterceptedDependentBean ( javax . enterprise . inject . Instance ) { org . jboss . weld . tests . instance . destroy . dependent . Intercepted reference = instance . get ( ) ; reference . foo ( ) ; org . jboss . weld . tests . instance . destroy . dependent . Interceptor . reset ( ) ; instance . destroy ... | org . junit . Assert . assertTrue ( org . jboss . weld . tests . instance . destroy . dependent . Interceptor . isDestroyed ( ) ) |
invalidStringGreaterThanConstraintShouldCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createGreaterThanDefinition ( ToscaTypes . STRING . toString ( ) , "value" ) , alien4... | org . junit . Assert . assertEquals ( 2 , violations . size ( ) ) |
isCancelledTrueSuccess ( ) { final java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; com . microsoft . azure . sdk . iot . device . fileupload . FileUploadInProgress fileUploadInProgress = mockit . Deencapsulation . newInstance ( com . microsoft . azure . sdk . ... | org . junit . Assert . assertTrue ( result ) |
testComposite ( ) { org . apache . activemq . command . ActiveMQDestination q1 = new org . apache . activemq . command . ActiveMQQueue ( "queue1,topic://topic1" ) ; java . util . Set < org . apache . activemq . jaas . GroupPrincipal > aclsq1 = org . apache . activemq . security . LDAPAuthorizationMapTest . authMap . ge... | org . junit . Assert . assertEquals ( 0 , aclsq1 . size ( ) ) |
generatesRgroupPseudoAtom ( ) { org . openscience . cdk . interfaces . IAtomContainer container = mock ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; org . openscience . cdk . interfaces . IPseudoAtom atom = mock ( org . openscience . cdk . interfaces . IPseudoAtom . class ) ; when ( atom . getLabe... | org . junit . Assert . assertThat ( shapes . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testCreate ( ) { org . oscarehr . common . model . LabTestResults entity = new org . oscarehr . common . model . LabTestResults ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testUnassignedAction ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "Rule:<sp>{Action};" ) ; _builder . newLine ( ) ; final java . lang . String actual = this . toPda ( _builder ) ; org . eclipse . xtend2 . lib . Strin... | org . junit . Assert . assertEquals ( expected , actual ) |
takingWriteLockMustInvalidateOptimisticReadLock ( ) { long r = pageList . tryOptimisticReadLock ( pageRef ) ; pageList . tryWriteLock ( pageRef ) ; "<AssertPlaceHolder>" ; } validateReadLock ( long , long ) { org . neo4j . unsafe . impl . internal . dragons . UnsafeUtil . loadFence ( ) ; return ( ( org . neo4j . io . p... | org . junit . Assert . assertFalse ( pageList . validateReadLock ( pageRef , r ) ) |
testSetGetClientIdNewContext ( ) { final java . lang . String id = "123" ; javax . jms . JMSContext c = context ; c . setClientID ( id ) ; javax . jms . JMSContext c2 = addContext ( c . createContext ( Session . CLIENT_ACKNOWLEDGE ) ) ; "<AssertPlaceHolder>" ; } getClientID ( ) { return null ; } | org . junit . Assert . assertEquals ( id , c2 . getClientID ( ) ) |
shouldGetCredentialsFromJvmEnv ( ) { br . com . uol . pagseguro . api . PagSeguroEnv expectedEnv = br . com . uol . pagseguro . api . PagSeguroEnv . SANDBOX ; when ( jvmEnvVariableEnvironmentProvider . getEnvironment ( ) ) . thenReturn ( expectedEnv ) ; br . com . uol . pagseguro . api . PagSeguroEnv env = providerChai... | org . junit . Assert . assertEquals ( expectedEnv , env ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.