input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
test5 ( ) { nopol_examples . nopol_example_3 . NopolExample ex = new nopol_examples . nopol_example_3 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isOddNumber ( int ) { int tmp = ( a - 1 ) % 2 ; if ( tmp != 0 ) { return true ; } return false ; } | org . junit . Assert . assertTrue ( ( ! ( ex . isOddNumber ( ( - 8 ) ) ) ) ) |
testGetWhenTypeStackDoesNotHaveTheUUID ( ) { final java . util . List < java . lang . Object > expectedTypes = emptyList ( ) ; final java . util . List < java . lang . String > actualTypes = typeStack . get ( "otherUUID" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return itemDefinitions . get ( uuid ) ... | org . junit . Assert . assertEquals ( expectedTypes , actualTypes ) |
testSearchBusinessObjectDefinitionsOnlyDisplayName ( ) { java . util . Set < org . finra . herd . model . api . xml . BusinessObjectDefinition > expectedBusinessObjectDefinitions = setUpTestEntitiesForSearchTesting ( ) ; for ( org . finra . herd . model . api . xml . BusinessObjectDefinition businessObjectDefinition : ... | org . junit . Assert . assertEquals ( actualBusinessObjectDefinitions , expectedBusinessObjectDefinitions ) |
testGenerateFolloweeUrl ( ) { java . lang . String urlToken = "hydro-ding" ; java . lang . String url = "https://www.zhihu.com/api/v4/members/hydro-ding/followees?include=data%5B*%5D.url_token&offset=0&per_page=30&limit=30" ; java . lang . String generatedUrl = com . brianway . webporter . collector . zhihu . download ... | org . junit . Assert . assertEquals ( url , generatedUrl ) |
values_isEmptyAfterCreation ( ) { "<AssertPlaceHolder>" ; } values ( ) { return java . util . Collections . unmodifiableList ( values ) ; } | org . junit . Assert . assertTrue ( array . values ( ) . isEmpty ( ) ) |
shouldUseGroupByIfPartOfEdge ( ) { setupQueryData ( ) ; given ( tableAccessStrategy . usesRankTable ( ) ) . willReturn ( true ) ; given ( queryNode . isPartOfEdge ( ) ) . willReturn ( true ) ; given ( queryNode . isRoot ( ) ) . willReturn ( false ) ; java . lang . String actual = generator . groupByAttributes ( queryDa... | org . junit . Assert . assertNotNull ( actual ) |
testConvertToKettleValueArrayNullElement ( ) { avroField . m_fieldPath = "[0]" ; avroField . init ( 0 ) ; avroField . reset ( variableSpace ) ; org . apache . avro . Schema schema = mock ( org . apache . avro . Schema . class ) ; when ( schema . getType ( ) ) . thenReturn ( Schema . Type . ARRAY ) ; org . apache . avro... | org . junit . Assert . assertNull ( avroField . convertToKettleValue ( array , mock ( org . apache . avro . Schema . class ) , mock ( org . apache . avro . Schema . class ) , false ) ) |
runTestStringToOutputStream1 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "GeneralJava/StringToOutputStream1.apk" ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , res . size ( ) ) |
testNumberOfReviews ( ) { java . util . List < org . apache . cxf . jaxrs . ext . search . jpa . Book > books = queryBooks ( "reviews<sp>gt<sp>0" ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . getSize ( ) ; } | org . junit . Assert . assertEquals ( 3 , books . size ( ) ) |
testLoadByName ( ) { java . util . List < com . jmethods . catatumbo . entities . StringId > entities = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { com . jmethods . catatumbo . entities . StringId entity = new com . jmethods . catatumbo . entities . StringId ( ) ; entity . setGreetings ( ( "Tes... | org . junit . Assert . assertEquals ( entities , entities2 ) |
commandUsageSavingDoesNotCreateNewEntriesForOldCommands ( ) { com . djrapitops . plan . db . Map < java . lang . String , java . lang . Integer > expected = new com . djrapitops . plan . db . HashMap ( ) ; expected . put ( "plan" , 1 ) ; expected . put ( "test" , 3 ) ; expected . put ( "tp" , 6 ) ; expected . put ( "pl... | org . junit . Assert . assertEquals ( expected , commandUse ) |
createUnlockConnectorRequest_withConnectorId_returnsValidUnlockConnectorRequest ( ) { int connectorId = 42 ; eu . chargetime . ocpp . model . core . UnlockConnectorRequest result = core . createUnlockConnectorRequest ( connectorId ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; } | org . junit . Assert . assertThat ( result . validate ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testUtf7FolderNameCreate ( ) { testWithHandler ( new com . sun . mail . imap . IMAPFolderTest . IMAPTest ( ) { @ com . sun . mail . imap . Override public void test ( javax . mail . Store store , com . sun . mail . imap . IMAPHandler handler ) throws java . io . IOException , javax . mail . MessagingException { javax .... | org . junit . Assert . assertTrue ( test . create ( Folder . HOLDS_MESSAGES ) ) |
loginWithInvalidData ( ) { org . testing . enity . SignInParams signInParams = new org . testing . enity . SignInParams ( LOGIN , WRONG_PASSWORD ) ; appManager . getLoginHelper ( ) . logout ( ) ; appManager . getLoginHelper ( ) . login ( signInParams ) ; boolean isValid = appManager . getLoginHelper ( ) . isLoggedIn ( ... | org . junit . Assert . assertFalse ( isValid ) |
testGetFirstASTNameImageNull ( ) { net . sourceforge . pmd . lang . java . ast . ASTThrowStatement t = net . sourceforge . pmd . lang . java . ParserTstUtil . getNodes ( net . sourceforge . pmd . lang . java . ast . ASTThrowStatement . class , net . sourceforge . pmd . lang . java . ast . ASTThrowStatementTest . NULL_N... | org . junit . Assert . assertNull ( t . getFirstClassOrInterfaceTypeImage ( ) ) |
testAtomicBoolean2 ( ) { java . util . concurrent . atomic . AtomicBoolean ab = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; java . util . concurrent . atomic . AtomicBoolean result = executeBackAndForth ( ab , java . util . concurrent . atomic . AtomicBoolean . class ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( false , result . get ( ) ) |
testApp ( ) { boolean cleanExit = com . ociweb . iot . maker . FogRuntime . testConcurrentUntilShutdownRequested ( new java . lang . Shutdown ( ) , 100 ) ; "<AssertPlaceHolder>" ; } testConcurrentUntilShutdownRequested ( com . ociweb . iot . maker . FogApp , long ) { return com . ociweb . iot . maker . FogRuntime . tes... | org . junit . Assert . assertTrue ( cleanExit ) |
testSwapEmptyLongArray ( ) { final long [ ] array = new long [ 0 ] ; org . apache . commons . lang3 . ArrayUtils . swap ( array , 0 , 2 ) ; "<AssertPlaceHolder>" ; } swap ( java . lang . Object [ ] , int , int ) { if ( ( array == null ) || ( ( array . length ) == 0 ) ) { return ; } org . apache . commons . lang3 . Arra... | org . junit . Assert . assertEquals ( 0 , array . length ) |
fromCodeWorksWithExistingValues ( ) { for ( fr . marcwrobel . jbanking . IsoCountry country : fr . marcwrobel . jbanking . IsoCountry . values ( ) ) { "<AssertPlaceHolder>" ; } } fromCode ( java . lang . String ) { java . lang . String cleanedCode = ( code == null ) ? null : code . toUpperCase ( ) ; if ( ( cleanedCode ... | org . junit . Assert . assertEquals ( country , fr . marcwrobel . jbanking . IsoCountry . fromCode ( country . getCode ( ) ) ) |
test ( ) { final org . springframework . web . servlet . ModelAndView modelAndView = mock ( org . springframework . web . servlet . ModelAndView . class ) ; final org . mockito . ArgumentCaptor < com . google . common . base . Function > captor = org . mockito . ArgumentCaptor . forClass ( com . google . common . base ... | org . junit . Assert . assertNotNull ( function ) |
get_present ( ) { final org . apache . rya . streams . api . queries . QueryRepository queries = new org . apache . rya . streams . api . queries . InMemoryQueryRepository ( new org . apache . rya . streams . api . queries . InMemoryQueryChangeLog ( ) , org . apache . rya . streams . api . queries . InMemoryQueryReposi... | org . junit . Assert . assertEquals ( query , fetched . get ( ) ) |
testGetNumberWithoutConversionMask ( ) { java . lang . String value = "100.56" ; org . pentaho . di . core . row . ValueMetaInterface stringValueMeta = new org . pentaho . di . core . row . value . ValueMetaString ( "test" ) ; java . lang . Double expected = 100.56 ; java . lang . Double result = stringValueMeta . getN... | org . junit . Assert . assertEquals ( expected , result ) |
testCreateNoVersions ( ) { org . lilyproject . repository . api . Record record = org . lilyproject . repository . impl . test . AbstractRepositoryTest . repository . newRecord ( ) ; record . setRecordType ( org . lilyproject . repository . impl . test . AbstractRepositoryTest . recordType1 . getName ( ) , org . lilypr... | org . junit . Assert . assertEquals ( null , record . getVersion ( ) ) |
testWhenSettingNestedValueToNull ( ) { setNewValue ( outerObservable , org . codefx . libfx . nesting . AbstractDeepNestingTest . Level . NESTED , org . codefx . libfx . nesting . AbstractDeepNestingTest . Value . NULL ) ; "<AssertPlaceHolder>" ; } getNestingObservable ( org . codefx . libfx . nesting . Nesting ) { jav... | org . junit . Assert . assertNull ( getNestingObservable ( nesting ) ) |
testGetVersionAdd ( ) { org . oscm . domobjects . Organization org = new org . oscm . domobjects . Organization ( ) ; setVersion ( org , 555 ) ; final int version = org . oscm . dataservice . bean . HistoryObjectFactory . getVersion ( org , ModificationType . ADD ) ; "<AssertPlaceHolder>" ; } getVersion ( org . oscm . ... | org . junit . Assert . assertEquals ( 0 , version ) |
test ( ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde > categorieen = new nl . bzk . migratiebrp . bericht . model . lo3 . format . Lo3PersoonslijstFormatter ( ) . format ( buildLo3Persoonslijst ( ) ) ; final java . util . List < nl . bzk . migratiebrp . co... | org . junit . Assert . assertEquals ( verwachteNg01 . toString ( ) , ng01 ) |
testCheckServerTrusted ( ) { com . emc . storageos . security . keystore . DistributedKeyStore zookeeperKeystore = new com . emc . storageos . security . keystore . impl . DistributedKeyStoreImpl ( ) ; zookeeperKeystore . init ( loadStoreParam ) ; zookeeperKeystore . setTrustedCertificates ( null ) ; com . emc . storag... | org . junit . Assert . assertTrue ( exceptionThrown ) |
testTest ( ) { logger . info ( "test" ) ; com . datumbox . framework . common . dataobjects . TransposeDataList transposeDataList = new com . datumbox . framework . common . dataobjects . TransposeDataList ( ) ; transposeDataList . put ( 0 , new com . datumbox . framework . common . dataobjects . FlatDataList ( java . ... | org . junit . Assert . assertEquals ( expResult , result ) |
testLongName ( ) { org . apache . tinkerpop . gremlin . structure . Vertex a1 = this . sqlgGraph . addVertex ( T . label , "AAAAAAAAAAAAAAAAAAAAAAAAA" ) ; org . apache . tinkerpop . gremlin . structure . Vertex b1 = this . sqlgGraph . addVertex ( T . label , "BBBBBBBBBBBBBBBBBBBBBBBBB" ) ; org . apache . tinkerpop . gr... | org . junit . Assert . assertFalse ( gt . isEmpty ( ) ) |
testRestoreAsn1SignatureStructureRSAreNegative ( ) { byte [ ] testData = new java . math . BigInteger ( "-20000000000000" , 10 ) . toByteArray ( ) ; byte [ ] signature = de . persosim . simulator . utils . Utils . concatByteArrays ( testData , testData ) ; byte [ ] expectedResult = de . persosim . simulator . utils . U... | org . junit . Assert . assertArrayEquals ( expectedResult , de . persosim . simulator . crypto . CryptoUtil . restoreAsn1SignatureStructure ( signature ) . toByteArray ( ) ) |
isPublicLandingPage_EnterpriseLandingpageType ( ) { given ( landingpageService ( ) . loadLandingpageType ( "any_mp_id" ) ) . willReturn ( LandingpageType . ENTERPRISE ) ; boolean result = serviceListingBean . isPublicLandingpage ( ) ; "<AssertPlaceHolder>" ; } isPublicLandingpage ( ) { return ( loadLandingpageType ( ) ... | org . junit . Assert . assertFalse ( result ) |
deveObterMotivoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . NFEnviaEventoRetorno eventoRetorno = new com . fincatto . documentofiscal . nfe310 . classes . evento . NFEnviaEventoRetorno ( ) ; final java . lang . String motivo = "Motivo<sp>turpe" ; eventoRetorno . setMotivo ( m... | org . junit . Assert . assertEquals ( motivo , eventoRetorno . getMotivo ( ) ) |
testAddExactLong ( ) { long [ ] specialValues = new long [ ] { Long . MIN_VALUE , ( Long . MIN_VALUE ) + 1 , ( Long . MIN_VALUE ) + 2 , Long . MAX_VALUE , ( Long . MAX_VALUE ) - 1 , ( Long . MAX_VALUE ) - 2 , - 10 , - 9 , - 8 , - 7 , - 6 , - 5 , - 4 , - 3 , - 2 , - 1 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , ( - 1... | org . junit . Assert . assertEquals ( bdSum , java . math . BigInteger . valueOf ( org . hipparchus . util . FastMath . addExact ( a , b ) ) ) |
testJacobiEvaluationAt1 ( ) { for ( int v = 0 ; v < 10 ; ++ v ) { for ( int w = 0 ; w < 10 ; ++ w ) { for ( int i = 0 ; i < 10 ; ++ i ) { org . hipparchus . analysis . polynomials . PolynomialFunction jacobi = org . hipparchus . analysis . polynomials . PolynomialsUtils . createJacobiPolynomial ( i , v , w ) ; double b... | org . junit . Assert . assertTrue ( org . hipparchus . util . Precision . equals ( binomial , jacobi . value ( 1.0 ) , 1 ) ) |
testUserJavaBean3 ( ) { testcase . function . User2 u = new testcase . function . User2 ( ) ; testcase . function . User2 result = executeBackAndForth ( u , testcase . function . User2 . class ) ; "<AssertPlaceHolder>" ; } getB ( ) { return b ; } | org . junit . Assert . assertNull ( result . getB ( ) ) |
writeTrue ( ) { com . asakusafw . runtime . value . BooleanOption option = new com . asakusafw . runtime . value . BooleanOption ( ) ; option . modify ( true ) ; com . asakusafw . runtime . value . BooleanOption restored = restore ( option ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( canGet ) { return next ; } throw ne... | org . junit . Assert . assertThat ( restored . get ( ) , is ( option . get ( ) ) ) |
parseFunctionAnyParameters2 ( ) { java . util . List < java . lang . Object > parameters = org . diirt . datasource . util . FunctionParser . parseFunctionAnyParameter ( "foo(\"test\")" ) ; "<AssertPlaceHolder>" ; } parseFunctionAnyParameter ( java . lang . String ) { return org . diirt . datasource . util . FunctionPa... | org . junit . Assert . assertThat ( parameters , org . hamcrest . CoreMatchers . equalTo ( java . util . Arrays . asList ( ( ( java . lang . Object ) ( "foo" ) ) , "test" ) ) ) |
should_return_this ( ) { org . fest . assertions . api . FileAssert returned = assertions . isFile ( ) ; "<AssertPlaceHolder>" ; } isFile ( ) { return isFile ; } | org . junit . Assert . assertSame ( assertions , returned ) |
testDoOCR_PDF ( ) { net . sourceforge . tess4j . Tesseract1Test . logger . info ( "doOCR<sp>on<sp>a<sp>PDF<sp>document" ) ; java . io . File inputFile = new java . io . File ( this . testResourcesDataPath , "eurotext.pdf" ) ; java . lang . String expResult = "The<sp>(quick)<sp>[brown]<sp>{fox}<sp>jumps!\nOver<sp>the<sp... | org . junit . Assert . assertEquals ( expResult , result . substring ( 0 , expResult . length ( ) ) ) |
test_pass_in_char_array5 ( ) { try { byte [ ] temp = new java . lang . String ( new char [ ] { org . jacorb . test . orb . AbstractCodesetTestCase . E_ACUTE } ) . getBytes ( "UTF-8" ) ; char [ ] topass = new char [ 2 ] ; topass [ 0 ] = ( ( char ) ( ( temp [ 0 ] ) & 255 ) ) ; topass [ 1 ] = ( ( char ) ( ( temp [ 1 ] ) &... | org . junit . Assert . assertTrue ( server . pass_in_char_array ( "multibyte" , topass ) ) |
testCreateValueSimpleKey ( ) { final com . orientechnologies . orient . core . index . OSimpleKeyIndexDefinition keyIndexDefinition = new com . orientechnologies . orient . core . index . OSimpleKeyIndexDefinition ( com . orientechnologies . orient . core . metadata . schema . OType . INTEGER ) ; final java . lang . Ob... | org . junit . Assert . assertEquals ( result , 2 ) |
testSerialization ( ) { org . jfree . data . xy . Vector v1 = new org . jfree . data . xy . Vector ( 1.0 , 2.0 ) ; org . jfree . data . xy . Vector v2 = ( ( org . jfree . data . xy . Vector ) ( org . jfree . chart . TestUtils . serialised ( v1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java... | org . junit . Assert . assertEquals ( v1 , v2 ) |
test2ValidateForUpdate ( ) { org . apache . ranger . plugin . model . RangerPolicy rangerPolicy = rangerPolicy ( ) ; org . apache . ranger . entity . XXPolicy policy = policy ( ) ; policyService . validateForUpdate ( rangerPolicy , policy ) ; "<AssertPlaceHolder>" ; } validateForUpdate ( org . apache . ranger . plugin ... | org . junit . Assert . assertNotNull ( rangerPolicy ) |
getEncountersByPatientIdentifier_shouldNotGetVoidedEncounters ( ) { org . openmrs . api . EncounterService encounterService = org . openmrs . api . context . Context . getEncounterService ( ) ; java . util . List < org . openmrs . Encounter > encounters = encounterService . getEncountersByPatientIdentifier ( "12345" ) ... | org . junit . Assert . assertEquals ( 2 , encounters . size ( ) ) |
available_onUnCachedStream ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; final java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; final org . exist . util . io . CachingFilterInputStream cfis = new org .... | org . junit . Assert . assertEquals ( testData . length , cfis . available ( ) ) |
testParseAttributConcatScalar ( ) { java . util . Map < java . lang . String , org . alien4cloud . tosca . model . templates . NodeTemplate > nodeTemplates = com . google . common . collect . Maps . newHashMap ( ) ; org . alien4cloud . tosca . model . templates . NodeTemplate nodeTemplate1 = new org . alien4cloud . tos... | org . junit . Assert . assertEquals ( fullUrl , parsedConcatString ) |
testDoInvoke ( ) { com . liferay . dynamic . data . mapping . data . provider . internal . DDMDataProviderInvokerImpl ddmDataProviderInvoker = mock ( com . liferay . dynamic . data . mapping . data . provider . internal . DDMDataProviderInvokerImpl . class ) ; com . liferay . dynamic . data . mapping . data . provider ... | org . junit . Assert . assertEquals ( 2 , outputOptional . get ( ) ) |
testHeaders ( ) { "<AssertPlaceHolder>" ; } getRequestHeaders ( ) { java . util . Map < java . lang . String , java . lang . String > headers = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; headers . put ( HttpHeaders . CONTENT_TYPE , com . urbanairship . api . reports . CONTENT_TYPE_J... | org . junit . Assert . assertEquals ( request . getRequestHeaders ( ) , null ) |
testPlayersManager ( ) { world . bentobox . bentobox . managers . PlayersManager pm = new world . bentobox . bentobox . managers . PlayersManager ( plugin ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( pm ) |
testValuesIterator_SingleDiretor ( ) { java . util . Map < org . matsim . api . core . v01 . Id < org . matsim . core . utils . collections . IdentifiableArrayMapTest . TO > , org . matsim . core . utils . collections . IdentifiableArrayMapTest . TO > map = new org . matsim . core . utils . collections . IdentifiableAr... | org . junit . Assert . assertEquals ( to1 , toX ) |
testToFromStringRoundTrip ( ) { org . apache . phoenix . util . ColumnInfo columnInfo = new org . apache . phoenix . util . ColumnInfo ( "a.myColumn" , java . sql . Types . INTEGER ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { java . util . List < java . lang . String > components = com . google .... | org . junit . Assert . assertEquals ( columnInfo , org . apache . phoenix . util . ColumnInfo . fromString ( columnInfo . toString ( ) ) ) |
testMethodCallWithComma ( ) { System . out . println ( ( "CommaSeparatedMethodCallExpr.class<sp>=<sp>" + ( org . drools . constraint . parser . ast . expr . CommaSeparatedMethodCallExpr . class ) ) ) ; System . out . println ( ( "new<sp>ClassOrInterfaceDeclaration().getModifiers().getClass()<sp>=<sp>" + ( new com . git... | org . junit . Assert . assertEquals ( "setAge(1),<sp>setLikes(\"bread\");" , printConstraint ( expression ) ) |
should_refresh ( ) { final java . lang . String name = "testRefresh" ; com . ctp . cdi . query . test . domain . Simple simple = createSimple ( name ) ; simple . setName ( "override" ) ; dao . refresh ( simple ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( name , simple . getName ( ) ) |
testLoadProperties_knownFileName_noSuffix ( ) { org . kuali . rice . core . impl . services . ConfigurationServiceImpl . FilePropertySource fps = new org . kuali . rice . core . impl . services . ConfigurationServiceImpl . FilePropertySource ( ) ; fps . setFileName ( "configuration" ) ; boolean failedAsExpected = false... | org . junit . Assert . assertTrue ( failedAsExpected ) |
testConvert ( ) { com . github . steveash . jopenfst . MutableFst fst1 = com . github . steveash . jopenfst . io . Convert . importFst ( "data/openfst/basic" , TropicalSemiring . INSTANCE ) ; java . io . File tempFile = java . io . File . createTempFile ( "fst" , "deleteme" ) ; tempFile . deleteOnExit ( ) ; fst1 . save... | org . junit . Assert . assertTrue ( fst1 . equals ( fst2 ) ) |
testParseSubQuery ( ) { java . lang . String q = "table<sp>iis<sp>|<sp>join<sp>ip<sp>[<sp>table<sp>users<sp>|<sp>fields<sp>user_id,<sp>ip<sp>]" ; java . util . List < java . lang . String > commands = org . araqne . logdb . query . parser . QueryTokenizer . parseCommands ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { ret... | org . junit . Assert . assertEquals ( 2 , commands . size ( ) ) |
sigmaArgName ( ) { java . util . List < org . arend . core . context . binding . Binding > context = new java . util . ArrayList ( ) ; context . add ( new org . arend . core . context . binding . TypedBinding ( "A" , org . arend . ExpressionFactory . Universe ( 4 , 6 ) ) ) ; context . add ( new org . arend . core . con... | org . junit . Assert . assertEquals ( org . arend . ExpressionFactory . Universe ( 4 , 8 ) , result . type ) |
testDeleteCollectionThrow ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . Foo , java . lang . Integer > dao = createDao ( com . j256 . ormlite . dao . Foo . class , true ) ; com . j256 . ormlite . dao . Foo foo = new com . j256 . ormlite . dao . Foo ( ) ; "<AssertPlaceHolder>" ; com . j256 . ormli... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testJoinerConfigWithoutFieldsToRename ( ) { java . lang . String selectedFields = "filmCategory" 1 + "filmActor.actor_name<sp>as<sp>renamed_actor,<sp>filmCategory.category_name<sp>as<sp>renamed_category" ; io . cdap . plugin . batch . joiner . JoinerConfig config = new io . cdap . plugin . batch . joiner . JoinerConfig... | org . junit . Assert . assertEquals ( expected , actual ) |
drop_last_element_java ( ) { java . util . List < java . lang . String > lastElementRemoved = new java . util . ArrayList < java . lang . String > ( ) ; lastElementRemoved . add ( "one" ) ; lastElementRemoved . add ( "two" ) ; lastElementRemoved . add ( "three" ) ; lastElementRemoved . remove ( ( ( lastElementRemoved .... | org . junit . Assert . assertEquals ( 2 , lastElementRemoved . size ( ) ) |
canUploadCustomImage ( ) { key = imageManager . saveImage ( customImage . getPath ( ) , com . ece . superkids . testing . ImageManagerTests . IMAGE_NAME ) ; java . util . Properties props = new java . util . Properties ( ) ; props . load ( new com . ece . superkids . testing . FileInputStream ( fileManager . getImagePa... | org . junit . Assert . assertTrue ( image . exists ( ) ) |
emptyKeyRing_listKeys_noPubKeys ( ) { final name . neuhalfen . projects . crypto . bouncycastle . openpgp . testtooling . gpg . GPGExec gpg = name . neuhalfen . projects . crypto . bouncycastle . openpgp . testtooling . gpg . GPGExec . newInstance ( ) ; final name . neuhalfen . projects . crypto . bouncycastle . openpg... | org . junit . Assert . assertThat ( pubKeyMap . isEmpty ( ) , org . hamcrest . Matchers . is ( true ) ) |
shouldReturnGroupFromEntity ( ) { final uk . gov . gchq . gaffer . data . element . function . ExtractGroup function = new uk . gov . gchq . gaffer . data . element . function . ExtractGroup ( ) ; final java . lang . String group = "testGroup_2" ; final uk . gov . gchq . gaffer . data . element . Entity entity = new uk... | org . junit . Assert . assertEquals ( group , result ) |
selectTest ( ) { com . rhythm . louie . services . sql . SqlStatementPB statement = com . rhythm . louie . services . sql . SqlStatementPB . newBuilder ( ) . setSql ( "Select<sp>*<sp>from<sp>content" ) . build ( ) ; java . util . List < com . rhythm . louie . services . sql . SqlResultPB > response = com . rhythm . lou... | org . junit . Assert . assertNotNull ( response ) |
testFoo ( ) { me . geso . tinyorm . feature . ImmutableTest . Foo foo = this . orm . insert ( me . geso . tinyorm . feature . ImmutableTest . Foo . class ) . value ( "name" , "John" ) . executeSelect ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertThat ( foo . getName ( ) , org . hamcrest . CoreMatchers . is ( "John" ) ) |
testFindFile_for_a_single_file ( ) { when ( mockFile . isDirectory ( ) ) . thenReturn ( false ) ; instance . findFile ( ) ; "<AssertPlaceHolder>" ; verify ( mockFile , never ( ) ) . listFiles ( ) ; } findFile ( ) { com . captaindebug . errortrack . file . FileLocator . logger . info ( "Searching<sp>in...<sp>{}" , scanI... | org . junit . Assert . assertEquals ( 1 , count ) |
testBasicObjectReturn ( ) { java . util . Map o = ( ( java . util . Map ) ( program_1 . returnsObject ( ) ) ) ; "<AssertPlaceHolder>" ; } get ( int ) { return _matcher . group ( ( index + 1 ) ) ; } | org . junit . Assert . assertEquals ( "bar" , o . get ( "foo" ) ) |
serializedDateDoesNotIncludeMilliseconds ( ) { java . util . Date now = new java . util . Date ( ) ; java . text . SimpleDateFormat iso8601WithoutMilliseconds = new java . text . SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ssZ" ) ; iso8601WithoutMilliseconds . setTimeZone ( java . util . TimeZone . getTimeZone ( "UTC" ) ) ;... | org . junit . Assert . assertTrue ( serializedDate . equals ( expectedDate ) ) |
testIgnoredExceptionDoesNotTrip ( ) { final java . lang . Class ignoreClass = java . io . IOException . class ; final java . lang . Class [ ] myIgnore = new java . lang . Class [ ] { ignoreClass } ; impl . setIgnore ( myIgnore ) ; "<AssertPlaceHolder>" ; } shouldTrip ( java . lang . Throwable ) { for ( java . lang . Cl... | org . junit . Assert . assertFalse ( impl . shouldTrip ( new java . io . IOException ( ) ) ) |
testAlias2 ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . as ( "e" ) . scan ( "EMP" ) . as ( "m" ... | org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) ) |
testEmptyResult ( ) { io . toast . tk . runtime . block . TestBlockRunner runner = new io . toast . tk . runtime . block . TestBlockRunner ( ) ; io . toast . tk . runtime . bean . ActionCommandDescriptor findMethodInClass = runner . findMatchingAction ( "Titi" , io . toast . tk . runtime . utils . Toto . class ) ; "<As... | org . junit . Assert . assertNull ( findMethodInClass ) |
runInTransactionWithOptions ( ) { when ( datastore . runInTransaction ( any ( ) , any ( ) ) ) . then ( ( a ) -> a . < com . google . cloud . datastore . Datastore . TransactionCallable > getArgument ( 0 ) . run ( transaction ) ) ; final com . google . datastore . v1 . TransactionOptions transactionOptions = com . googl... | org . junit . Assert . assertThat ( foobar , org . hamcrest . Matchers . is ( "foobar" ) ) |
basicTest2 ( ) { java . util . Map < java . lang . String , java . lang . String > expected = com . google . common . collect . Maps . newHashMap ( ) ; expected . put ( "param1" , "some<sp>input1" ) ; java . lang . String pattern = "test<sp>command<sp><param1>" ; java . lang . String input = "test<sp>command<sp>\"some<... | org . junit . Assert . assertEquals ( expected , actual ) |
testErrorMessageAtMultipleLocations_ReturnsLowerMessage ( ) { java . lang . String randomStuff = java . util . UUID . randomUUID ( ) . toString ( ) ; java . lang . String json = java . lang . String . format ( ( "{" + ( ( ( "<sp>\"%s\":<sp>\"%s\"," + "<sp>\"%s\":<sp>\"%s\"," ) + "<sp>\"%s\":<sp>\"%s\"" ) + "}" ) ) , "m... | org . junit . Assert . assertEquals ( software . amazon . awssdk . protocols . json . AwsJsonErrorMessageParserTest . MESSAGE_CONTENT , parsed ) |
testHuwelijkMetFoutieveSoort ( ) { final int aantalPartners = 2 ; final nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . relatie . BRAL2111 bral2111 = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . relatie . BRAL2111 ( ) ; final java . util . List < nl . bzk . brp . model... | org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) ) |
getChildTransactionsIncludesChildAndSignatureTransactions ( ) { final org . nem . core . model . MockTransaction innerTransaction = new org . nem . core . model . MockTransaction ( org . nem . core . model . Utils . generateRandomAccount ( ) ) ; final org . nem . core . model . MultisigTransaction transaction = org . n... | org . junit . Assert . assertThat ( transactions , org . nem . core . model . IsEquivalent . equivalentTo ( expectedTransactions ) ) |
testIndexManager ( ) { com . orientechnologies . orient . client . remote . message . OrientDB orientDB = new com . orientechnologies . orient . client . remote . message . OrientDB ( "embedded:" , com . orientechnologies . orient . client . remote . message . OrientDBConfig . defaultConfig ( ) ) ; orientDB . create ( ... | org . junit . Assert . assertNotNull ( readRequest . getIndexManager ( ) ) |
should_not_update_customer_when_multiple_projects_are_selected ( ) { net . rrm . ehour . domain . ProjectAssignment assignment = net . rrm . ehour . domain . ProjectAssignmentObjectMother . createProjectAssignment ( 1 ) ; assignment . setAssignmentId ( null ) ; net . rrm . ehour . ui . manage . assignment . AssignmentA... | org . junit . Assert . assertNull ( bean . getCustomer ( ) ) |
testSerialization ( ) { org . jfree . chart . needle . PointerNeedle n1 = new org . jfree . chart . needle . PointerNeedle ( ) ; org . jfree . chart . needle . PointerNeedle n2 = ( ( org . jfree . chart . needle . PointerNeedle ) ( org . jfree . chart . TestUtilities . serialised ( n1 ) ) ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertTrue ( n1 . equals ( n2 ) ) |
writeBeanIfValid_invalidValueAndBinderHasSeveralBindings_singleEvent ( ) { binder . forField ( nameField ) . withValidator ( ( name ) -> false , "" ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . forField ( ageField ) . withConverter ( new com . vaadin . data . converter . StringToIntegerConvert... | org . junit . Assert . assertNull ( event . get ( ) ) |
showLogs_withoutLogConfigButFollowTrue ( ) { final io . fabric8 . maven . docker . config . RunImageConfiguration runConfig = new io . fabric8 . maven . docker . config . RunImageConfiguration . Builder ( ) . exposedPropertyKey ( "key" ) . build ( ) ; final io . fabric8 . maven . docker . config . ImageConfiguration im... | org . junit . Assert . assertTrue ( actual ) |
testSerialization ( ) { org . jfree . data . statistics . HistogramBin b1 = new org . jfree . data . statistics . HistogramBin ( 1.0 , 2.0 , false , true ) ; org . jfree . data . statistics . HistogramBin b2 = ( ( org . jfree . data . statistics . HistogramBin ) ( org . jfree . chart . TestUtils . serialised ( b1 ) ) )... | org . junit . Assert . assertEquals ( b1 , b2 ) |
testIsPolicySatisfiedParentFalse ( ) { when ( bpsd . isPlacementPolicySatisfied ( ) ) . thenReturn ( false ) ; org . apache . hadoop . hdfs . server . blockmanagement . BlockPlacementStatusWithUpgradeDomain bps = new org . apache . hadoop . hdfs . server . blockmanagement . BlockPlacementStatusWithUpgradeDomain ( bpsd ... | org . junit . Assert . assertFalse ( bps . isPlacementPolicySatisfied ( ) ) |
updateMultiShouldAddValuesCorrectlyWhenUsingAddToSetWithEach ( ) { org . springframework . data . mongodb . core . MongoTemplateTests . DocumentWithCollectionOfSimpleType document = new org . springframework . data . mongodb . core . MongoTemplateTests . DocumentWithCollectionOfSimpleType ( ) ; document . values = org ... | org . junit . Assert . assertThat ( template . findOne ( query , org . springframework . data . mongodb . core . MongoTemplateTests . DocumentWithCollectionOfSimpleType . class ) . values , hasSize ( 3 ) ) |
testJacksonSerialization ( ) { org . batfish . datamodel . transformation . ApplyAll applyAll = new org . batfish . datamodel . transformation . ApplyAll ( Noop . NOOP_DEST_NAT ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper... | org . junit . Assert . assertEquals ( applyAll , org . batfish . common . util . BatfishObjectMapper . clone ( applyAll , org . batfish . datamodel . transformation . ApplyAll . class ) ) |
testGeneratedIdAndSequence ( ) { java . lang . reflect . Field [ ] fields = com . j256 . ormlite . field . FieldTypeTest . GeneratedIdAndSequence . class . getDeclaredFields ( ) ; "<AssertPlaceHolder>" ; com . j256 . ormlite . field . FieldType . createFieldType ( databaseType , com . j256 . ormlite . field . FieldType... | org . junit . Assert . assertTrue ( ( ( fields . length ) >= 1 ) ) |
doesNotMatchIncorrectRegexValue ( ) { matcher . withEntry ( "foo1" , "a.*1" ) ; org . mockserver . matchers . MultiValueMapMatcher mapMatcher = new org . mockserver . matchers . MultiValueMapMatcher ( new org . mockserver . logging . MockServerLogger ( ) , matcher ) ; matched . withEntry ( "foo0" , "bar0" ) ; matched .... | org . junit . Assert . assertFalse ( mapMatcher . matches ( null , matched ) ) |
testGather2 ( ) { org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . rand ( DataType . FLOAT , 10 , 10 ) ; org . nd4j . linalg . api . ndarray . INDArray indices = org . nd4j . linalg . factory . Nd4j . createFromArray ( 0 , 1 , 5 ) ; org . nd4j . autodiff . samediff . SameDiff s... | org . junit . Assert . assertEquals ( exp , act ) |
testUsersUnfriend ( ) { fi . foyt . foursquare . api . FoursquareApi foursquareApi = fi . foyt . foursquare . api . tests . TestUtils . getAuthenticatedFoursquareApi ( ) ; fi . foyt . foursquare . api . entities . CompleteUser user = foursquareApi . usersUnfriend ( "7613255" ) . getResult ( ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( "7613255" , user . getId ( ) ) |
testOneEdgeOldEnough ( ) { long twoDaysPriorBenchmark = ( benchmarkTimeInMillis ) - ( ( oneDayInMillis ) * 2 ) ; com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap socialProof = new com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap ( ) ; socialProof . put ( 100L , 1.0 , twoDaysPriorBe... | org . junit . Assert . assertEquals ( false , filter . filterResult ( 1L , socialProofs ) ) |
testGetPostHocTest ( ) { System . out . println ( "getPostHocTest" ) ; gov . sandia . cognition . statistics . method . MultipleComparisonExperiment instance = this . createInstance ( ) ; gov . sandia . cognition . statistics . method . MultipleHypothesisComparison < java . util . Collection < ? extends java . lang . N... | org . junit . Assert . assertNotNull ( postHocTest ) |
testDownloadFileHttpServletResponseString ( ) { java . io . File downFile = new org . springframework . core . io . ClassPathResource ( "TEST_USER.zip" ) . getFile ( ) ; java . lang . String filePath = downFile . getAbsolutePath ( ) ; org . springframework . mock . web . MockHttpServletResponse resp = new org . springf... | org . junit . Assert . assertThat ( lengthHeader , org . hamcrest . Matchers . is ( java . lang . String . valueOf ( downFile . length ( ) ) ) ) |
testEmptyConstructor ( ) { org . eurekastreams . commons . exceptions . ExecutionException sut = new org . eurekastreams . commons . exceptions . ExecutionException ( ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; } | org . junit . Assert . assertNull ( sut . getMessage ( ) ) |
testMaakentityConvertorRubriek_8330 ( ) { nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . ConverterContext ctx = createContext ( nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . IstStapelVoorkomenConverterTest . MINIMAAL ) ; converter . convertInhoudelijk ( ctx , IstStapelVoorkomenConverter . HEAD... | org . junit . Assert . assertEquals ( rubriek8330 , stapelVoorkomen . getRubriek8330DatumEindeOnderzoek ( ) ) |
testRequestConnControlConnectMethod ( ) { final org . apache . hc . core5 . http . protocol . HttpContext context = new org . apache . hc . core5 . http . protocol . BasicHttpContext ( null ) ; final org . apache . hc . core5 . http . message . BasicClassicHttpRequest request = new org . apache . hc . core5 . http . me... | org . junit . Assert . assertNull ( header ) |
ofLocation ( ) { net . time4j . calendar . astro . SolarTime ny1 = net . time4j . calendar . astro . SolarTime . ofLocation ( 40.9 , ( - 74.3 ) ) ; net . time4j . calendar . astro . SolarTime ny2 = net . time4j . calendar . astro . SolarTime . ofLocation ( 40.9 , ( - 74.3 ) , 0 , "NOAA" ) ; "<AssertPlaceHolder>" ; } of... | org . junit . Assert . assertThat ( ny1 , org . hamcrest . CoreMatchers . is ( ny2 ) ) |
testBondIsAromaticF ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( IS_AROMATIC ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; when ( bond . isAromatic ( ) ) . then... | org . junit . Assert . assertFalse ( expr . matches ( bond ) ) |
testGetDataHeaderduringWriteFailing ( ) { nom . tam . fits . Header header = new nom . tam . fits . Header ( ) ; header . nullImage ( ) ; header . setNaxes ( 2 ) ; header . setNaxis ( 1 , 2 ) ; header . setNaxis ( 2 , 2 ) ; nom . tam . fits . ImageData data = new nom . tam . fits . ImageData ( header ) ; nom . tam . ut... | org . junit . Assert . assertEquals ( 0 , outByte ) |
canSortStrings ( ) { @ packt . java9 . by . example . ch03 . main . bubble . SuppressWarnings ( "unchecked" ) java . util . ArrayList actualNames = new java . util . ArrayList ( java . util . Arrays . asList ( "Johnson" , "Wilson" , "Wilkinson" , "Abraham" , "Dagobert" ) ) ; java . util . Collections . sort ( actualNam... | org . junit . Assert . assertEquals ( new java . util . ArrayList ( java . util . Arrays . asList ( "Abraham" , "Dagobert" , "Johnson" , "Wilkinson" , "Wilson" ) ) , actualNames ) |
getWebHooksEmpty ( ) { plugin = new org . sonatype . nexus . plugins . webhook . WebHookPlugin ( ) ; java . util . Collection < java . lang . String > urls = plugin . getWebHooks ( "snapshots" , "com.example" , "app" ) ; "<AssertPlaceHolder>" ; } getWebHooks ( java . lang . String , java . lang . String , java . lang .... | org . junit . Assert . assertTrue ( urls . isEmpty ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.