input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetInfo ( ) { com . crawljax . core . state . Eventable c = new com . crawljax . core . state . Eventable ( new com . crawljax . core . state . Identification ( Identification . How . xpath , "/body/div[3]" ) , com . crawljax . core . state . Eventable . EventType . click ) ; java . lang . String info = "<sp>click<... | org . junit . Assert . assertEquals ( info , c . toString ( ) ) |
testIsDuplicateKey_isDuplicateKey_usingCustomProperties ( ) { java . util . Properties props = new java . util . Properties ( ) ; props . setProperty ( "MyCustom_Database_Engine.duplicateKeyCodes" , "-104" ) ; java . lang . String databaseProductName = "MyCustom<sp>Database<sp>Engine" ; javax . sql . DataSource dataSou... | org . junit . Assert . assertTrue ( isDuplicateKey ) |
test_bs_put_binary ( ) { org . jerlang . type . Binary expected = new org . jerlang . type . Binary ( new int [ ] { 1 , 1 , 2 , 3 , 4 } ) ; org . jerlang . type . List params = org . jerlang . type . List . of ( new org . jerlang . type . Binary ( new int [ ] { 1 , 2 , 3 , 4 } ) ) ; org . jerlang . type . Term result =... | org . junit . Assert . assertEquals ( expected , result ) |
testVer ( ) { mx . edu . um . mateo . general . model . Usuario usuario = this . obtieneUsuario ( ) ; mx . edu . um . mateo . contabilidad . facturas . model . ProveedorFacturas proveedorFacturas = new mx . edu . um . mateo . contabilidad . facturas . model . ProveedorFacturas ( "testA" , "TEST-01" , "nombre" , "appate... | org . junit . Assert . assertNotNull ( proveedorFacturas . getId ( ) ) |
R1901_Nationaliteit_NL_na_peildatum ( ) { final nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon persoonEntiteit = actie . getPersoon ( ) . getPersoonEntiteit ( ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonNationaliteit nationaliteit = new nl . bzk . algemeenbrp . dal . domei... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
getLocationCountShouldWork ( ) { when ( locationService . getLocationCount ( ) ) . thenReturn ( 4711L ) ; final ac . simons . biking2 . tracker . LocationController locationController = new ac . simons . biking2 . tracker . LocationController ( locationService ) ; "<AssertPlaceHolder>" ; } getLocationCount ( ) { return... | org . junit . Assert . assertEquals ( 4711L , locationController . getLocationCount ( ) ) |
testFormatExample2 ( ) { java . lang . String p = "%7$#.20s%n" ; java . util . logging . LogRecord r = new java . util . logging . LogRecord ( java . util . logging . Level . SEVERE , "Encoding<sp>failed." ) ; java . lang . RuntimeException npe = new java . lang . NullPointerException ( ) ; java . lang . StackTraceElem... | org . junit . Assert . assertNotNull ( output ) |
testGetThreadNumber ( ) { int expResult = 10 ; int result = instance . getThreadNumber ( ) ; "<AssertPlaceHolder>" ; } getThreadNumber ( ) { return threadNumber ; } | org . junit . Assert . assertEquals ( expResult , result ) |
deleteAllDataElements_notEmpty_emptyAfterwards ( ) { final io . github . data4all . model . data . Node node = new io . github . data4all . model . data . Node ( 0 , 0 , 0 ) ; dbHandler . createDataElement ( node ) ; dbHandler . createDataElement ( node ) ; dbHandler . createDataElement ( node ) ; dbHandler . deleteAll... | org . junit . Assert . assertEquals ( 0 , dbHandler . getDataElementCount ( ) ) |
testConfigureMaxConnsPerRoute ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSICartoDBSink.configure]" ) ) + "--------<sp>backend.max_conns_per_route<sp>gets<sp>the<sp>configured<sp>value" ) ) ; java . lang . String apiKey = "1234567890abcdef" ; java . lang . String backendMaxConns = null ; java . lang . Str... | org . junit . Assert . assertEquals ( 3 , sink . getBackendMaxConnsPerRoute ( ) ) |
getUserDisplayNameWithValidUser ( ) { updateConfigDynamically ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestAD . server , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestAD . serverConfiguration ) ; java . lang . String user = "CN=vmmtestuser,cn=users,dc=secfvt2,dc=austin,dc=ibm,dc=c... | org . junit . Assert . assertEquals ( displayName , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestAD . servlet . getUserDisplayName ( user ) ) |
appendChar ( ) { char testChar = '<sp>' ; java . io . StringWriter stringWriter = new java . io . StringWriter ( 20 ) ; stringWriter . append ( testChar ) ; "<AssertPlaceHolder>" ; stringWriter . close ( ) ; } valueOf ( char ) { if ( value < ( org . teavm . classlib . java . lang . TCharacter . characterCache . length ... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( testChar ) , stringWriter . toString ( ) ) |
testLineBreakNoWhiteSpace ( ) { org . stringtemplate . v4 . ST st = new org . stringtemplate . v4 . ST ( ( ( "Foo<sp><\\\\>" + ( newline ) ) + "bar\n" ) ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; st . write ( new org . stringtemplate . v4 . AutoIndentWriter ( sw , "\n" ) ) ; java . lang . Stri... | org . junit . Assert . assertEquals ( expecting , result ) |
testIsNotNull ( ) { classUnderTest . setNotNull ( true ) ; "<AssertPlaceHolder>" ; } IsNotNull ( ) { return this . isNotNull ; } | org . junit . Assert . assertEquals ( true , classUnderTest . IsNotNull ( ) ) |
testCommit ( ) { com . arjuna . ats . internal . jts . orbspecific . ControlImple cont = new com . arjuna . ats . internal . jts . orbspecific . ControlImple ( null , null ) ; org . omg . CosTransactions . Control theControl = cont . getControl ( ) ; com . arjuna . ats . internal . jts . orbspecific . coordinator . Arj... | org . junit . Assert . assertFalse ( act . interposeResource ( ) ) |
testAdd ( ) { org . stjs . example . lib . stjs . STJSLibExample ex = new org . stjs . example . lib . stjs . STJSLibExample ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 5 , ex . add ( 2 , 3 ) ) |
testTransmission ( ) { channel1 . updateMode ( ConnectionMode . SEND_RECV ) ; channel2 . updateMode ( ConnectionMode . SEND_RECV ) ; oobSplitter1 . start ( ) ; oobSplitter2 . start ( ) ; detector . activate ( ) ; sender . activate ( ) ; java . lang . Thread . sleep ( 5000 ) ; channel1 . updateMode ( ConnectionMode . IN... | org . junit . Assert . assertEquals ( 4 , count ) |
testGetAll ( ) { java . util . List < cern . c2mon . server . common . commfault . CommFaultTag > tagList = commFaultTagMapper . getAll ( ) ; "<AssertPlaceHolder>" ; } size ( ) { this . listLock . readLock ( ) . lock ( ) ; try { return list . size ( ) ; } finally { this . listLock . readLock ( ) . unlock ( ) ; } } | org . junit . Assert . assertTrue ( ( ( tagList . size ( ) ) > 2 ) ) |
get_shouldReturnValueForExistingKey ( ) { final java . lang . Long expectedValue = 1L ; builder . set ( de . flapdoodle . embed . process . builder . TypedProperty . with ( "TEST_PROPERTY1" , de . flapdoodle . embed . process . builder . Long . class ) , expectedValue ) ; builder . set ( de . flapdoodle . embed . proce... | org . junit . Assert . assertEquals ( expectedValue , actualValue ) |
testIntroduceNewKey_shouldAddNewEntry ( ) { java . util . Map < java . lang . String , java . lang . String > original = com . google . common . collect . ImmutableMap . of ( "foo" , "bar" ) ; java . util . Map < java . lang . String , java . lang . String > oldMap = com . google . common . collect . ImmutableMap . cop... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( newMap ) ) |
testMinimal ( ) { java . util . Set < javax . validation . ConstraintViolation < com . cloudera . parcel . descriptors . ParcelDescriptor > > violations = validator . getViolations ( com . cloudera . parcel . validation . ParcelTestUtils . getParserJson ( "minimal_parcel.json" ) ) ; "<AssertPlaceHolder>" ; } getParserJ... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
testCreate ( ) { org . oscarehr . eyeform . model . EyeForm entity = new org . oscarehr . eyeform . model . EyeForm ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
createFacet ( ) { final java . lang . String filterName = getFilterName ( ) ; final org . alfresco . repo . search . impl . solr . facet . SolrFacetProperties facetProps = new org . alfresco . repo . search . impl . solr . facet . SolrFacetProperties . Builder ( ) . filterID ( filterName ) . facetQName ( org . alfresco... | org . junit . Assert . assertEquals ( filterName , facetProperties . getFilterID ( ) ) |
debieraCrearEntrada ( ) { mx . edu . um . mateo . inventario . web . Organizacion organizacion = new mx . edu . um . mateo . inventario . web . Organizacion ( "TEST-01" 1 , "TEST-01" 7 , "TEST-01" 7 ) ; currentSession ( ) . save ( organizacion ) ; mx . edu . um . mateo . inventario . web . Empresa empresa = new mx . ed... | org . junit . Assert . assertNotNull ( id ) |
testDimeServiceAdapterString ( ) { eu . dime . ps . gateway . service . internal . DimeServiceAdapter adapter = new eu . dime . ps . gateway . service . internal . DimeServiceAdapter ( "test" ) ; "<AssertPlaceHolder>" ; } getIdentifier ( ) { return this . identifier ; } | org . junit . Assert . assertEquals ( "test" , adapter . getIdentifier ( ) ) |
shouldNotBeDirectoryObject ( ) { org . javaswift . joss . model . Container container = account . getContainer ( "x" ) . create ( ) ; org . javaswift . joss . model . StoredObject object = container . getObject ( "object" ) ; object . uploadObject ( new byte [ ] { 'a' , 'b' , 'c' } ) ; org . swiftexplorer . swift . ope... | org . junit . Assert . assertFalse ( org . swiftexplorer . swift . operations . DifferencesFinder . isDirectory ( ri ) ) |
constructorSucceed ( ) { final java . lang . String connectionString = "testString" ; com . microsoft . azure . sdk . iot . service . jobs . JobClient testJobClient = com . microsoft . azure . sdk . iot . service . jobs . JobClient . createFromConnectionString ( connectionString ) ; "<AssertPlaceHolder>" ; } createFrom... | org . junit . Assert . assertNotNull ( testJobClient ) |
validate_shouldNotFailWhenPatientHasOnlyOneIdentifierAndItsNotPreferred ( ) { org . openmrs . PatientIdentifierType patientIdentifierType = org . openmrs . api . context . Context . getPatientService ( ) . getAllPatientIdentifierTypes ( false ) . get ( 0 ) ; org . openmrs . Patient patient = new org . openmrs . Patient... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testTopLevelArray ( ) { w . array ( ) ; w . point ( io . jeo . geom . Geom . point ( 1 , 2 ) ) . point ( io . jeo . geom . Geom . point ( 3 , 4 ) ) ; w . endArray ( ) ; io . jeo . json . JSONArray arr = ( ( io . jeo . json . JSONArray ) ( io . jeo . json . JSONValue . parse ( string ( ) ) ) ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( 2 , arr . size ( ) ) |
shouldConvertIterableToStream ( ) { final java . util . List < java . lang . Integer > originalList = java . util . Arrays . asList ( 1 , 2 , 3 ) ; final java . lang . Iterable < java . lang . Integer > originalResults = new uk . gov . gchq . gaffer . commonutil . iterable . WrappedCloseableIterable ( originalList ) ; ... | org . junit . Assert . assertEquals ( originalList , results ) |
testToString005 ( ) { javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "t=#08" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . toString ( "" ) ; } | org . junit . Assert . assertEquals ( "t=#08" , ln . toString ( ) ) |
testIsSchemaAutoPropagate ( ) { org . talend . components . jira . tjiraoutput . TJiraOutputDefinition definition = new org . talend . components . jira . tjiraoutput . TJiraOutputDefinition ( ) ; boolean result = definition . isSchemaAutoPropagate ( ) ; "<AssertPlaceHolder>" ; } isSchemaAutoPropagate ( ) { return true... | org . junit . Assert . assertTrue ( result ) |
handle_shouldUnsetTheDateVoided ( ) { org . openmrs . api . handler . UnvoidHandler < org . openmrs . Voidable > handler = new org . openmrs . api . handler . BaseUnvoidHandler ( ) ; org . openmrs . Voidable voidable = new org . openmrs . Person ( ) ; voidable . setVoided ( true ) ; voidable . setDateVoided ( new java ... | org . junit . Assert . assertNull ( voidable . getDateVoided ( ) ) |
testUnmarshallerAndSerialization ( ) { java . io . BufferedInputStream bis = null ; try { if ( interproXmlFile . getFilename ( ) . endsWith ( "gz" ) ) { bis = new java . io . BufferedInputStream ( new java . util . zip . GZIPInputStream ( interproXmlFile . getInputStream ( ) ) ) ; } else if ( interproXmlFile . getFilen... | org . junit . Assert . assertTrue ( unmarshalledData . equals ( retrievedData ) ) |
testGetLegacyPodcast ( ) { org . glassfish . jersey . client . ClientConfig clientConfig = new org . glassfish . jersey . client . ClientConfig ( ) ; clientConfig . register ( org . glassfish . jersey . jackson . JacksonFeature . class ) ; javax . ws . rs . client . Client client = javax . ws . rs . client . ClientBuil... | org . junit . Assert . assertTrue ( ( ( response . getStatus ( ) ) == 200 ) ) |
testTruncOpPrimitiveArray ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<trunc(names);<sp>separator=\",<sp>\">" ) ; e . add ( "names" , new int [ ] { 0 , 1 , 2 } ) ; java . lang . String expecting = "0,<sp>1" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale ... | org . junit . Assert . assertEquals ( expecting , e . render ( ) ) |
testDiv ( ) { for ( long n = 2 ; n < 100 ; n ++ ) for ( long r = 1 ; r < n ; r ++ ) { final long a = org . apache . hadoop . examples . pi . math . TestModular . div ( 0 , r , n ) ; final long b = ( ( long ) ( ( ( r * 1.0 ) / n ) * ( 1L << ( org . apache . hadoop . examples . pi . math . TestModular . DIV_VALID_BIT ) )... | org . junit . Assert . assertEquals ( s , b , a ) |
testSetAppEngine_null ( ) { com . google . cloud . tools . eclipse . projectselector . model . GcpProject gcpProject = new com . google . cloud . tools . eclipse . projectselector . model . GcpProject ( "name" , "id" ) ; gcpProject . setAppEngine ( null ) ; "<AssertPlaceHolder>" ; } getAppEngine ( ) { return appEngine ... | org . junit . Assert . assertNull ( gcpProject . getAppEngine ( ) ) |
testThatReturnValueIsFalseIfAllBoundingValuesAreNull ( ) { "<AssertPlaceHolder>" ; } geoBoundsAreValid ( java . lang . Double , java . lang . Double , java . lang . Double , java . lang . Double ) { return ( ( ( ( ( ( ( ( ( northBound != null ) && ( eastBound != null ) ) && ( southBound != null ) ) && ( westBound != nu... | org . junit . Assert . assertFalse ( org . esa . snap . ui . RegionSelectableWorldMapPane . geoBoundsAreValid ( null , null , null , null ) ) |
test3 ( ) { cn . xiaowenjie . retrofitdemo . beans . ResultBean get3 = demo . getWithMultKey ( "param111" , "param222" ) ; System . out . println ( get3 ) ; "<AssertPlaceHolder>" ; } getCode ( ) { return code ; } | org . junit . Assert . assertTrue ( ( ( get3 . getCode ( ) ) == 0 ) ) |
featureMode ( ) { builder . featureMode ( FeatureMode . DOCUMENT ) ; "<AssertPlaceHolder>" ; } toString ( ) { return name ; } | org . junit . Assert . assertEquals ( builder . featureMode . toString ( ) , FeatureMode . DOCUMENT . toString ( ) ) |
usesFirstCache ( ) { com . facebook . buck . io . filesystem . ProjectFilesystem filesystem = com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem . createJavaOnlyFilesystem ( ) ; java . nio . file . Path path = filesystem . getPath ( "world.txt" ) ; filesystem . touch ( path ) ; com . facebook . buck... | org . junit . Assert . assertTrue ( innerCache . willGet ( path ) ) |
testEncode_shortY ( ) { java . lang . String xStr = "CA2E6B0BE8D4C39A" ; java . lang . String yStr = "D8DF35C331D7" ; int refLength = 8 ; byte [ ] exp = de . persosim . simulator . utils . HexString . toByteArray ( ( ( ( "04" + xStr ) + "0000" ) + yStr ) ) ; java . math . BigInteger x = new java . math . BigInteger ( 1... | org . junit . Assert . assertArrayEquals ( exp , de . persosim . simulator . crypto . CryptoUtil . encode ( ecPoint , refLength , CryptoUtil . ENCODING_UNCOMPRESSED ) ) |
testEmptyDiff ( ) { com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription containerDescription = com . vmware . admiral . request . util . TestRequestStateFactory . createContainerDescription ( ) ; com . vmware . admiral . compute . container . ContainerService . ContainerSta... | org . junit . Assert . assertEquals ( 0 , containerDiffs . size ( ) ) |
testSearchWithSiteMemberPermission ( ) { com . liferay . dynamic . data . mapping . model . DDMStructure structure = addStructure ( com . liferay . dynamic . data . mapping . service . test . DDMStructureServiceTest . _classNameId , com . liferay . portal . kernel . util . StringUtil . randomString ( ) ) ; structure = ... | org . junit . Assert . assertEquals ( structures . toString ( ) , 1 , structures . size ( ) ) |
testFalse ( ) { org . mockito . Mockito . when ( persoon . getGeslachtsaanduiding ( ) ) . thenReturn ( Geslachtsaanduiding . VROUW ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkT... | org . junit . Assert . assertFalse ( subject . controleer ( persoon , verzoek ) ) |
testModuleHandlersOrdering ( ) { org . axonframework . config . ModuleConfiguration module1 = mock ( org . axonframework . config . ModuleConfiguration . class ) ; org . axonframework . config . ModuleConfiguration module2 = mock ( org . axonframework . config . ModuleConfiguration . class ) ; org . axonframework . con... | org . junit . Assert . assertNotNull ( configuration ) |
testRespondingGatewayPRPAIN201305UV02 ( ) { System . out . println ( "respondingGatewayPRPAIN201305UV02" ) ; org . hl7 . v3 . PRPAIN201305UV02 body = new org . hl7 . v3 . PRPAIN201305UV02 ( ) ; gov . hhs . fha . nhinc . common . nhinccommon . AssertionType assertion = new gov . hhs . fha . nhinc . common . nhinccommon ... | org . junit . Assert . assertNotNull ( result ) |
testCopyChildFile ( ) { com . google . cloud . tools . eclipse . appengine . newproject . CodeTemplates . copyChildFile ( "favicon.ico" , parent , monitor ) ; "<AssertPlaceHolder>" ; } getFile ( java . lang . String ) { org . eclipse . core . runtime . IPath path = new org . eclipse . core . runtime . Path ( filePath )... | org . junit . Assert . assertTrue ( parent . getFile ( "favicon.ico" ) . exists ( ) ) |
ServiceSourceJavascript ( ) { try { com . fujitsu . dc . test . utils . Http . request ( "box/mkcol-service.txt" ) . with ( "cellPath" , "box/dav-delete.txt" 0 ) . with ( "path" , serviceColPath ) . with ( "token" , AbstractCase . MASTER_TOKEN_NAME ) . returns ( ) . statusCode ( HttpStatus . SC_CREATED ) ; com . fujits... | org . junit . Assert . assertEquals ( jsSource , response . getBody ( ) . trim ( ) ) |
testBuildWithDisabledDefaultCOnstraintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . employee . type . EmployeeType context = new org . lnu . is . domain . employee . type . EmployeeType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is .... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
counterexampleFoundWhenAssertionErrorPassedHasNoMessageIsCorrect ( ) { java . lang . String propertyName = "mySuperProperty" ; java . lang . String [ ] arguments = new java . lang . String [ ] { "first" , "second" , "third" } ; long [ ] seeds = new long [ ] { 12345 , 8842 } ; java . lang . AssertionError error = new ja... | org . junit . Assert . assertThat ( actual . getMessage ( ) , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
calcHttpsProxyNeedProxyTest ( ) { java . net . URL url = new java . net . URL ( "https://www.aliyun.com" ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( com . aliyuncs . http . clients . HttpUtil . class ) ; org . mockito . BDDMockito . given ( com . aliyuncs . http . clients . HttpUtil . needProxy ( ... | org . junit . Assert . assertEquals ( proxy0 , proxy ) |
shouldGetSellerCredentials ( ) { provider = new br . com . uol . pagseguro . api . credential . SystemPropCredentialProvider ( "pagseguro.properties" ) ; br . com . uol . pagseguro . api . credential . Credential expectedCredential = br . com . uol . pagseguro . api . credential . Credential . sellerCredential ( "email... | org . junit . Assert . assertEquals ( expectedCredential , credential ) |
testImplGenWithoutImplWithOptionFalse ( ) { java . lang . String [ ] args = new java . lang . String [ 8 ] ; args [ 0 ] = "generate" ; args [ 1 ] = "-l" ; args [ 2 ] = "java-vertx" ; args [ 3 ] = "-i" ; args [ 4 ] = "testUUID.json" ; args [ 5 ] = "-o" ; args [ 6 ] = "temp/test-server" ; args [ 7 ] = "-DapiImplGeneratio... | org . junit . Assert . assertTrue ( ( ! ( testApiVerticleFile . exists ( ) ) ) ) |
testProcessEmptyList ( ) { java . util . List < java . lang . Long > longList = com . google . common . collect . Lists . newArrayList ( ) ; java . util . List < java . lang . Long > expectedList = com . google . common . collect . Lists . transform ( longList , ( aLong ) -> 2 * aLong ) ; java . util . function . Funct... | org . junit . Assert . assertEquals ( expectedList , org . apache . distributedlog . common . concurrent . FutureUtils . result ( totalFuture ) ) |
shouldHaveConfiguredLints ( ) { victim . setLints ( java . util . Arrays . asList ( "1" , "2" , "3" ) ) ; "<AssertPlaceHolder>" ; } getLints ( ) { return java . util . Collections . unmodifiableCollection ( lints ) ; } | org . junit . Assert . assertEquals ( 3 , victim . getLints ( ) . size ( ) ) |
testNotifySCMFail ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . setBoolean ( YarnConfiguration . SHARED_CACHE_ENABLED , true ) ; org . apache . hadoop . yarn . api . records . LocalResource resource = mock ( org . apache . hadoop . yarn . api . r... | org . junit . Assert . assertFalse ( spied . call ( ) ) |
find_dft_02 ( ) { org . apache . jena . sparql . core . List < org . apache . jena . sparql . core . Quad > x = toList ( dsg . find ( Quad . defaultGraphIRI , null , null , NodeConst . nodeOne ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return prefixes . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , x . size ( ) ) |
test_CaptureFromHFile ( ) { classUnderTest = addWhitePawn ( GenericPosition . h2 ) ; addBlackPawn ( GenericPosition . g3 ) ; ml = classUnderTest . generateMoves ( new eubos . board . Board ( pl ) ) ; expectedMove = new eubos . board . pieces . GenericMove ( GenericPosition . h2 , GenericPosition . g3 ) ; "<AssertPlaceH... | org . junit . Assert . assertTrue ( ml . contains ( expectedMove ) ) |
pushUrl ( ) { java . util . Properties initParameters = new java . util . Properties ( ) ; initParameters . setProperty ( Constants . SERVLET_PARAMETER_PUSH_URL , "foo" ) ; com . vaadin . flow . server . DefaultDeploymentConfiguration config = createDeploymentConfig ( initParameters ) ; "<AssertPlaceHolder>" ; } getPus... | org . junit . Assert . assertThat ( config . getPushURL ( ) , org . hamcrest . Matchers . is ( "foo" ) ) |
testMemoryReferenceCount0 ( ) { com . eclipsesource . v8 . utils . MemoryManager memoryManager = new com . eclipsesource . v8 . utils . MemoryManager ( v8 ) ; "<AssertPlaceHolder>" ; } getObjectReferenceCount ( ) { return ( objectReferences ) - ( v8WeakReferences . size ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , memoryManager . getObjectReferenceCount ( ) ) |
test_Byte ( ) { com . alibaba . dubbo . common . serialize . ObjectOutput objectOutput = serialization . serialize ( url , byteArrayOutputStream ) ; objectOutput . writeByte ( ( ( byte ) ( 123 ) ) ) ; objectOutput . flushBuffer ( ) ; java . io . ByteArrayInputStream byteArrayInputStream = new java . io . ByteArrayInput... | org . junit . Assert . assertEquals ( ( ( byte ) ( 123 ) ) , deserialize . readByte ( ) ) |
test ( ) { if ( ! ( testingEnabled ( ) ) ) { return ; } java . io . File file = null ; try { file = org . geotools . test . TestData . file ( this , org . geotools . coverageio . gdal . jp2mrsid . JP2MrSIDTest . fileName ) ; } catch ( java . io . FileNotFoundException fnfe ) { org . geotools . coverageio . gdal . jp2mr... | org . junit . Assert . assertNotNull ( gc ) |
testBackAndForth ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 ) ; org . apache . arrow . flatbuf . Tensor tensor = org . nd4j . arrow . ArrowSerde . toTensor ( arr ) ; org . nd4j . linalg . api . ndarray . INDArray arr2 = org . nd4j . arrow . Arr... | org . junit . Assert . assertEquals ( arr , arr2 ) |
skipsClassesThatConfiguredAsSkippedInServletContext ( ) { java . util . HashSet < java . lang . Class < ? > > classes = new java . util . HashSet ( java . util . Arrays . asList ( org . everrest . core . servlet . Skip1 . class , org . everrest . core . servlet . Deploy . class , org . everrest . core . servlet . Skip2... | org . junit . Assert . assertEquals ( new java . util . HashSet < java . lang . Class < ? > > ( java . util . Arrays . asList ( org . everrest . core . servlet . Deploy . class ) ) , org . everrest . core . servlet . ComponentFinder . findComponents ( ) ) |
testBuild ( ) { org . lnu . is . domain . employee . type . EmployeeType context = new org . lnu . is . domain . employee . type . EmployeeType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EmployeeType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . l... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
pnrExampleTest ( ) { java . lang . String pnrExample = getMessageText ( gov . gtas . parsers . pnrgov . PnrGovParserTest . PNR_EXAMPLE ) ; gov . gtas . parsers . vo . PnrVo vo = this . parser . parse ( pnrExample ) ; int bagsInPNRExample = 18 ; "<AssertPlaceHolder>" ; } getBags ( ) { return bags ; } | org . junit . Assert . assertEquals ( bagsInPNRExample , vo . getBags ( ) . size ( ) ) |
testAll ( ) { append ( "[groups]" , globalPolicyFile ) ; append ( "group<sp>=<sp>malicious_role" , globalPolicyFile ) ; append ( "[roles]" , globalPolicyFile ) ; append ( "malicious_role<sp>=<sp>*" , globalPolicyFile ) ; org . apache . sentry . policy . common . PolicyEngine policy = new org . apache . sentry . policy ... | org . junit . Assert . assertTrue ( permissions . toString ( ) , permissions . isEmpty ( ) ) |
shouldParseCorrectlydecimal ( ) { java . lang . String text1 = "p<sp>some<sp>decimal[<=2.0,<sp>>=<sp>1.0]" ; org . semanticweb . owlapi . model . OWLDatatype decimal = df . getOWLDatatype ( OWL2Datatype . XSD_DECIMAL ) ; org . semanticweb . owlapi . model . OWLFacetRestriction max = df . getOWLFacetRestriction ( OWLFac... | org . junit . Assert . assertEquals ( expected , dsvf ) |
testGetSendBufferSizeDelegatesToSocket ( ) { when ( mockS . getSendBufferSize ( ) ) . thenReturn ( 654321 ) ; "<AssertPlaceHolder>" ; verify ( mockS ) . getSendBufferSize ( ) ; } getSendBufferSize ( ) { return socket . getSendBufferSize ( ) ; } | org . junit . Assert . assertEquals ( 654321 , ws . getSendBufferSize ( ) ) |
testCustomSerializer ( ) { org . nustaq . serialization . FSTConfiguration FST = org . nustaq . serialization . FSTConfiguration . createDefaultConfiguration ( ) ; FST . registerSerializer ( ser . Bug34 . NonSerializableClass . class , new ser . Bug34 . Serializer ( ) , false ) ; org . nustaq . serialization . FSTObjec... | org . junit . Assert . assertEquals ( ser . Bug34 . NonSerializableClass . class , in . readObject ( ) . getClass ( ) ) |
whenNoStateLimitItDoesntTerminate ( ) { notifier = new com . crawljax . core . ExitNotifier ( 0 ) ; notifier . incrementNumberOfStates ( ) ; notifier . incrementNumberOfStates ( ) ; "<AssertPlaceHolder>" ; } isExitCalled ( ) { return ( latch . getCount ( ) ) == 0 ; } | org . junit . Assert . assertThat ( notifier . isExitCalled ( ) , org . hamcrest . core . Is . is ( false ) ) |
testEncodeMaxInteger ( ) { final int value = Integer . MAX_VALUE ; final byte [ ] expected = kieker . test . common . util . dataformat . VariableLengthEncodingTest . asByteArray ( 255 , 255 , 255 , 255 , 7 ) ; final byte [ ] actual = this . encodeInt ( value ) ; "<AssertPlaceHolder>" ; } encodeInt ( int ) { final int ... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
concurrentInsertions ( ) { org . apache . bookkeeper . util . collections . ConcurrentLongLongHashMap map = new org . apache . bookkeeper . util . collections . ConcurrentLongLongHashMap ( ) ; java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; final in... | org . junit . Assert . assertEquals ( map . size ( ) , ( n * nThreads ) ) |
testAppendEmptyStringLeavesBufferUnchanged ( ) { t1 . append ( "" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getActionMemento ( ) . getNameParmsId ( ) ) + "#" ) + ( getNumber ( ) ) ; } | org . junit . Assert . assertEquals ( name , t1 . toString ( ) ) |
executeQueryLoadSubIdsAndOrgsForMyBrokerCustomers ( ) { customerOrg = createCustomer ( ) ; currentUser = createSupplier ( customerOrg ) ; java . util . List < org . oscm . domobjects . Subscription > list = subscriptionServiceBean . executeQueryLoadSubIdsAndOrgsForMyBrokerCustomers ( ) ; verify ( subscriptionDao , time... | org . junit . Assert . assertNotNull ( list ) |
testOptionAndUnparsed ( ) { final com . lexicalscope . jewel . cli . validation . OptionCollectionImpl validated = validate ( new java . lang . String [ ] { "--name0" , "value0" , "remaining0" } , com . lexicalscope . jewel . cli . validation . TestArgumentValidatorImpl . OptionAndUnparsed . class ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( 1 , validated . getUnparsed ( ) . size ( ) ) |
testRecycleAfterDestroy ( ) { localBufferPool . setNumBuffers ( org . apache . flink . runtime . io . network . buffer . LocalBufferPoolTest . numBuffers ) ; java . util . List < org . apache . flink . runtime . io . network . buffer . Buffer > requests = new java . util . ArrayList < org . apache . flink . runtime . i... | org . junit . Assert . assertEquals ( org . apache . flink . runtime . io . network . buffer . LocalBufferPoolTest . numBuffers , getNumRequestedFromMemorySegmentPool ( ) ) |
testGetRasterNamesToBeExported_exportBandsOnly ( ) { final boolean exportBands = true ; final org . esa . beam . pixex . output . PixExRasterNamesFactory pixExRasterNamesFactory = new org . esa . beam . pixex . output . PixExRasterNamesFactory ( exportBands , false , false , null ) ; final java . lang . String [ ] rast... | org . junit . Assert . assertThat ( rasterNames , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
testStandard ( ) { st = org . apache . servicecomb . foundation . common . http . HttpStatusUtils . getOrCreateByStatusCode ( 200 ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return 200 ; } | org . junit . Assert . assertEquals ( 200 , st . getStatusCode ( ) ) |
testBug_280413_02 ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "grammar<sp>test<sp>with<sp>org.eclipse.xtext.common.Terminals" ) ; _builder . newLine ( ) ; _builder . append ( "generate<sp>test<sp>\'http://test\'" ) ... | org . junit . Assert . assertTrue ( resource . getErrors ( ) . toString ( ) , resource . getErrors ( ) . isEmpty ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . RecentLayoutSetBranch newRecentLayoutSetBranch = addRecentLayoutSetBranch ( ) ; com . liferay . portal . kernel . model . RecentLayoutSetBranch existingRecentLayoutSetBranch = _persistence . fetchByPrimaryKey ( newRecentLayoutSetBranch . getP... | org . junit . Assert . assertEquals ( existingRecentLayoutSetBranch , newRecentLayoutSetBranch ) |
testLogicalConstant ( ) { com . liferay . dynamic . data . mapping . expression . internal . DDMExpressionImpl < java . lang . Boolean > ddmExpression = createDDMExpression ( "TRUE<sp>||<sp>false" ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { java . util . stream . Stream < java . lang . reflect . Method > methodStream ... | org . junit . Assert . assertTrue ( ddmExpression . evaluate ( ) ) |
textKeyBuildingFromRowTimestamp ( ) { org . apache . accumulo . core . data . Key keyBuilt = org . apache . accumulo . core . data . Key . builder ( ) . row ( "foo" ) . timestamp ( 3L ) . build ( ) ; org . apache . accumulo . core . data . Key keyExpected = new org . apache . accumulo . core . data . Key ( "foo" ) ; ke... | org . junit . Assert . assertEquals ( keyExpected , keyBuilt ) |
testSetAttribute ( ) { org . openhubframework . openhub . core . throttling . Attribute attribute = new org . openhubframework . openhub . core . throttling . Attribute ( "crm.op2" , "20/40" ) ; jmx . setAttribute ( attribute ) ; "<AssertPlaceHolder>" ; try { attribute = new org . openhubframework . openhub . core . th... | org . junit . Assert . assertThat ( jmx . getAttribute ( "crm.op2" ) . toString ( ) , org . hamcrest . CoreMatchers . is ( "20/40" ) ) |
templateChanged_DifferentKey ( ) { javax . faces . event . ValueChangeEvent eventMock = getMockValueChangeEventForTemplate ( 2 ) ; org . oscm . ui . dialog . classic . managerevenueshare . ManageRevenueShareModel model = new org . oscm . ui . dialog . classic . managerevenueshare . ManageRevenueShareModel ( ) ; model .... | org . junit . Assert . assertEquals ( 2 , model . getSelectedTemplateKey ( ) ) |
testRemoveChild_1 ( ) { org . eclipse . tracecompass . internal . lttng2 . control . ui . views . model . impl . TraceControlComponent fixture = new org . eclipse . tracecompass . internal . lttng2 . control . ui . views . model . impl . TraceControlComponent ( "" , new org . eclipse . tracecompass . internal . lttng2 ... | org . junit . Assert . assertFalse ( fixture . hasChildren ( ) ) |
testIcebergOrders0 ( ) { try ( java . io . InputStream inputStream = getClass ( ) . getResourceAsStream ( "open-iceberg-orders-0.html" ) ) { org . oxerr . okcoin . rest . dto . IcebergOrder [ ] orders = reader . read ( inputStream , null , StandardCharsets . UTF_8 ) . getOrders ( ) ; "<AssertPlaceHolder>" ; } } getOrde... | org . junit . Assert . assertEquals ( 0 , orders . length ) |
testEqualPolicy2 ( ) { org . linagora . linshare . core . domain . entities . Policy p1 = new org . linagora . linshare . core . domain . entities . Policy ( org . linagora . linshare . core . domain . constants . Policies . MANDATORY ) ; org . linagora . linshare . core . domain . entities . Policy p2 = new org . lina... | org . junit . Assert . assertTrue ( p1 . businessEquals ( p2 ) ) |
testMt_rand_0args ( ) { logger . info ( "mt_rand" ) ; int expResult = - 1562431105 ; int result = com . datumbox . framework . core . common . utilities . PHPMethods . mt_rand ( ) ; "<AssertPlaceHolder>" ; } mt_rand ( ) { return com . datumbox . framework . core . common . utilities . PHPMethods . mt_rand ( 0 , Integer... | org . junit . Assert . assertEquals ( expResult , result ) |
testReceiveString ( ) { transportHandler . setFetchableByte ( de . rub . nds . modifiablevariable . util . ArrayConverter . concatenate ( new byte [ ] { 23 , 3 , 3 , 0 , 4 } , "test" . getBytes ( java . nio . charset . Charset . forName ( "ASCII" ) ) ) ) ; java . lang . String receivedString = socket . receiveString ( ... | org . junit . Assert . assertEquals ( "test" , receivedString ) |
testGetOuderIdentificatieLeeg ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . enums . AanduidingOuder result = repository . getOuderIdentificatie ( 14L ) ; "<AssertPlaceHolder>" ; } getOuderIdentificatie ( java . lang . Integer ) { final nl . bzk . brp . model . algemeen . stamgegeven . verconv . LO3SoortAand... | org . junit . Assert . assertNull ( result ) |
toPOSupportedLanguages_NullInput ( ) { "<AssertPlaceHolder>" ; } toPOLanguages ( java . util . List , java . util . Locale ) { if ( ( languages == null ) || ( languages . isEmpty ( ) ) ) { return null ; } java . util . List < org . oscm . internal . operatorservice . POSupportedLanguage > result = new java . util . Arr... | org . junit . Assert . assertNull ( org . oscm . internal . assembler . SupportedLanguageAssembler . toPOLanguages ( null , currentUserLocale ) ) |
testCreateNodeLongNameTooLong ( ) { char [ ] chars = new char [ 260 ] ; java . util . Arrays . fill ( chars , 'x' ) ; java . lang . String name = new java . lang . String ( chars ) ; org . sagebionetworks . repo . model . Node n = org . sagebionetworks . repo . model . jdo . NodeTestUtils . createNew ( name , creatorUs... | org . junit . Assert . assertNull ( id ) |
isValidChar ( ) { System . out . println ( "isValidChar" ) ; char ch = 8 ; boolean expResult = true ; boolean result = org . krysalis . barcode4j . impl . code128 . Code128LogicImpl . isValidChar ( ch ) ; "<AssertPlaceHolder>" ; } isValidChar ( char ) { return ( ( ch >= 0 ) && ( ch <= 127 ) ) || ( ( ch >= ( org . krysa... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetNextVisibleColumn_NullArgument ( ) { org . eclipse . nebula . widgets . grid . GridColumn [ ] columns = org . eclipse . nebula . widgets . grid . GridTestUtil . createGridColumns ( grid , 5 , SWT . NONE ) ; "<AssertPlaceHolder>" ; } getNextVisibleColumn ( org . eclipse . nebula . widgets . grid . GridColumn ) { ... | org . junit . Assert . assertSame ( columns [ 0 ] , grid . getNextVisibleColumn ( null ) ) |
testToArrayArrayType ( ) { java . lang . String [ ] o = ff . toArray ( new java . lang . String [ 0 ] ) ; "<AssertPlaceHolder>" ; if ( chatterbox ) { System . out . println ( o . getClass ( ) . getName ( ) ) ; } java . util . Vector < java . lang . String > vv = new java . util . Vector < java . lang . String > ( ) ; j... | org . junit . Assert . assertNotNull ( o ) |
testSetVisibleReturnsActionDescriptor ( ) { com . eclipsesource . tabris . ui . Action action = mock ( com . eclipsesource . tabris . ui . Action . class ) ; com . eclipsesource . tabris . internal . ui . ActionDescriptor descriptor = new com . eclipsesource . tabris . internal . ui . ActionDescriptor ( "foo" , action ... | org . junit . Assert . assertSame ( descriptor , actualDescriptor ) |
format_unmatchedCompliance ( ) { final java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( "org.eclipse.jdt.core.compiler.compliance" , "1.4" ) ; final java . lang . String inputCode = "interface<sp>TestObject{List<String><sp>getNames<sp>()<sp>;}" ; final java . lang . St... | org . junit . Assert . assertEquals ( inputCode , outputCode ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.