input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testIsServiceReady_WhenComponentStatusConditionTrue_ServiceReady ( ) { io . fabric8 . kubernetes . api . model . ComponentStatus componentStatus = newComponentStatus ( "Healthy" , "True" ) ; mockComponentStatus ( componentStatus ) ; boolean isServiceReady = this . api . isServiceReady ( ) ; "<AssertPlaceHolder>" ; } is... | org . junit . Assert . assertTrue ( isServiceReady ) |
testDifferentQuartzTimeZones ( ) { final com . google . common . base . Optional < java . lang . String > schedule = com . google . common . base . Optional . of ( "*<sp>30<sp>14<sp>22<sp>3<sp>?<sp>2083" ) ; com . hubspot . singularity . SingularityRequest requestEST = new com . hubspot . singularity . SingularityReque... | org . junit . Assert . assertEquals ( ( nextRunEST - nextRunGMT ) , fiveHoursInMilliseconds ) |
testRelateWithMatrix ( ) { java . sql . Statement st = cx . createStatement ( ) ; java . sql . ResultSet rs = st . executeQuery ( "SELECT<sp>ST_Relate(ST_GeomFromText('POINT(1<sp>2)',4326),<sp>ST_Buffer(ST_GeomFromText('POINT(1<sp>2)',4326),2),<sp>'0FFFFFFF2')" ) ; rs . next ( ) ; boolean result = rs . getBoolean ( 1 )... | org . junit . Assert . assertTrue ( result ) |
readUI16DoesNotSignExtend ( ) { final byte [ ] data = new byte [ ] { - 1 , 0 , 0 , 0 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . LittleDecoder fixture = new com . flagstone . transform . coder . LittleDecoder ( stream ) ... | org . junit . Assert . assertEquals ( 255 , fixture . readUnsignedShort ( ) ) |
validFeatureOneIncludeTagNoScenarioTagsTest ( ) { java . lang . String featureContent = "@featureTag\n" + ( ( "Feature:<sp>test<sp>feature\n" + "\n" ) + "Scenario:<sp>scenario<sp>1" ) ; when ( propertyManager . getIncludeScenarioTags ( ) ) . thenReturn ( "@tag1" ) ; java . util . List < com . trivago . vo . SingleScena... | org . junit . Assert . assertThat ( singleScenariosFromFeature . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
should_apply_comparator_NotEqualIgnoreCase ( ) { final java . lang . String name = "findByNameNotEqualIgnoreCase" ; final java . lang . String expected = "select<sp>e<sp>from<sp>Simple<sp>e<sp>" + "where<sp>upper(e.name)<sp><><sp>upper(?1)" ; java . lang . String result = org . apache . deltaspike . data . impl . build... | org . junit . Assert . assertEquals ( expected , result ) |
link$skip0_AssociationEnd ( ) { org . json . simple . JSONObject body = new org . json . simple . JSONObject ( ) ; try { body . put ( "__id" , toUserDataId ) ; createUserData ( body , HttpStatus . SC_CREATED , Setup . TEST_CELL1 , Setup . TEST_BOX1 , Setup . TEST_ODATA , "Sales" ) ; body . put ( "__id" , fromUserDataId... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
getTablesToRepairRemoveTwoTablesOneWithTwcsTest ( ) { io . cassandrareaper . jmx . JmxProxy proxy = io . cassandrareaper . jmx . JmxProxyTest . mockJmxProxyImpl ( ) ; when ( context . jmxConnectionFactory . connectAny ( cluster ) ) . thenReturn ( proxy ) ; when ( context . jmxConnectionFactory . connectAny ( org . mock... | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "table2" ) , service . getTablesToRepair ( proxy , cluster , unit ) ) |
testWSIntegerValueUpdate ( ) { boolean result = ihcResourceInteractionService . resourceUpdate ( new org . openhab . binding . ihc . internal . ws . resourcevalues . WSIntegerValue ( 400004 , 201 , ( - 1000 ) , 1000 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( result ) |
testGetNameWithArithmeticColumn ( ) { org . sagebionetworks . table . query . model . DerivedColumn element = org . sagebionetworks . table . query . util . SqlElementUntils . createDerivedColumn ( "5+foo" ) ; "<AssertPlaceHolder>" ; } getDisplayName ( ) { java . lang . String name = null ; if ( ( asClause ) != null ) ... | org . junit . Assert . assertEquals ( "5+foo" , element . getDisplayName ( ) ) |
testHaRpcRequestWithTimeoutFailed ( ) { com . baidu . jprotobuf . pbrpc . spring . AnnotationEchoServiceClient annotationEchoServiceClient = ( ( com . baidu . jprotobuf . pbrpc . spring . AnnotationEchoServiceClient ) ( context . getBean ( "echoServiceClient" , com . baidu . jprotobuf . pbrpc . spring . AnnotationEchoS... | org . junit . Assert . assertNotNull ( e ) |
testGetValue_FallbackNull ( ) { when ( primary . getValue ( row ) ) . thenReturn ( null ) ; when ( fallback . getValue ( row ) ) . thenReturn ( null ) ; "<AssertPlaceHolder>" ; verify ( fallbackIf , never ( ) ) . matches ( any ( ) ) ; } getValue ( io . lumify . mapping . column . AbstractColumnDocumentMapping . Row ) {... | org . junit . Assert . assertNull ( instance . getValue ( row ) ) |
testIfDifferenceIsNotChanged ( ) { org . onosproject . net . resource . DiscreteResource res1 = org . onosproject . net . resource . Resources . discrete ( org . onosproject . net . DeviceId . deviceId ( "a" ) ) . resource ( ) ; org . onosproject . net . resource . DiscreteResource res2 = org . onosproject . net . reso... | org . junit . Assert . assertThat ( sut . difference ( other ) , org . hamcrest . Matchers . is ( expected ) ) |
testHashBaseForItemAnswersSkipsMissingResourcesForRichExtendedMatchingItems ( ) { final org . sakaiproject . tool . assessment . data . dao . assessment . ItemData item = newExtendedMatchingItem ( ) ; item . setAnswerOptionsSimpleOrRich ( ItemDataIfc . ANSWER_OPTIONS_RICH ) ; expectServerUrlLookup ( ) ; failResourceLoo... | org . junit . Assert . assertThat ( actualHashBase . toString ( ) , org . hamcrest . CoreMatchers . equalTo ( expectedHashBase . toString ( ) ) ) |
byteTest ( ) { java . sql . PreparedStatement ps = sharedConnection . prepareStatement ( "insert<sp>into<sp>bytetest<sp>(a)<sp>values<sp>(?)" ) ; ps . setByte ( 1 , Byte . MAX_VALUE ) ; "<AssertPlaceHolder>" ; try ( java . sql . ResultSet rs = org . mariadb . jdbc . DatatypeTest . getResultSet ( "select<sp>a<sp>from<sp... | org . junit . Assert . assertFalse ( ps . execute ( ) ) |
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . StarAddedEvent event = new com . github . seratch . jslack . api . model . event . StarAddedEvent ( ) ; java . lang . String gen... | org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) ) |
testSetStatus ( ) { io . lumify . sql . model . user . SqlUser user = ( ( io . lumify . sql . model . user . SqlUser ) ( sqlUserRepository . addUser ( "123" , "abc" , null , null , new java . lang . String [ 0 ] ) ) ) ; sqlUserRepository . setStatus ( user . getUserId ( ) , UserStatus . ACTIVE ) ; io . lumify . sql . m... | org . junit . Assert . assertEquals ( UserStatus . ACTIVE , testUser . getUserStatus ( ) ) |
testEqualsWithRiakObject ( ) { final com . basho . riak . client . core . query . RiakObject riakObject1 = com . basho . riak . client . core . query . RiakObjectTest . CreateFilledObject ( ) ; final com . basho . riak . client . core . query . RiakObject riakObject2 = com . basho . riak . client . core . query . RiakO... | org . junit . Assert . assertEquals ( riakObject1 , riakObject2 ) |
getMatchingLinesOfTextShouldFindCorrectLinesWhenFirstAndLastLinesHaveExtraText ( ) { final java . util . List < net . usikkert . kouchat . android . util . Line > lines = net . usikkert . kouchat . android . util . RobotiumTestUtils . getMatchingLinesOfText ( "[17:02:41]<sp>***<sp>Tina<sp>aborted<sp>reception<sp>of<sp>... | org . junit . Assert . assertEquals ( 3 , lines . size ( ) ) |
computeFactor_OverOneUsageForHour ( ) { long startTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-01-01<sp>00:59:59" ) ; long endTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-01-01<sp>02:00:00" ) ; org . oscm . billingservice . service . model . BillingInput billi... | org . junit . Assert . assertEquals ( 3 , factor , 0 ) |
testCreateBusinessObjectDefinitionSubjectMatterExpertTrimParameters ( ) { businessObjectDefinitionDaoTestHelper . createBusinessObjectDefinitionEntity ( org . finra . herd . service . BDEF_NAMESPACE , org . finra . herd . service . BDEF_NAME , org . finra . herd . service . DATA_PROVIDER_NAME , org . finra . herd . ser... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpert ( resultBusinessObjectDefinitionSubjectMatterExpert . getId ( ) , new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpertKey ( BDEF_NAMESPACE , BDEF_NAME , USER... |
createFormField ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . module . tests . FORM_FIELD ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDe... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
testPostConstruct ( ) { com . sun . mail . util . logging . MailHandler instance = new com . sun . mail . util . logging . MailHandler ( com . sun . mail . util . logging . MailHandlerTest . createInitProperties ( "" ) ) ; com . sun . mail . util . logging . MailHandlerTest . InternalErrorManager em = new com . sun . m... | org . junit . Assert . assertEquals ( true , em . exceptions . isEmpty ( ) ) |
test2 ( ) { org . esa . s2tbx . dataio . s2 . l1c . IL1cGranuleMetadata granuleMetadata = org . esa . s2tbx . dataio . s2 . l1c . L1cMetadataFactory . createL1cGranuleMetadata ( new org . esa . s2tbx . dataio . VirtualPath ( buildPathResource ( "metadata/S2A_OPER_MTD_L1C_TL_CGS1_20130621T120000_A000065_T14SLF.xml" ) , ... | org . junit . Assert . assertNotNull ( granuleMetadata ) |
setRawValueForNullOptional ( ) { optionalSubject . setRawValue ( null ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( null , optionalSubject . getValue ( ) ) |
testGetTrustMode ( ) { gov . hhs . fha . nhinc . patientdiscovery . response . VerifyMode verifyMode = new gov . hhs . fha . nhinc . patientdiscovery . response . VerifyMode ( ) ; gov . hhs . fha . nhinc . patientdiscovery . response . TrustMode trustMode = verifyMode . getTrustMode ( ) ; "<AssertPlaceHolder>" ; } getT... | org . junit . Assert . assertNotNull ( trustMode ) |
stripColor ( ) { java . lang . StringBuilder subject = new java . lang . StringBuilder ( ) ; java . lang . StringBuilder expected = new java . lang . StringBuilder ( ) ; final java . lang . String filler = "test" ; for ( org . bukkit . ChatColor color : org . bukkit . ChatColor . values ( ) ) { subject . append ( color... | org . junit . Assert . assertThat ( org . bukkit . ChatColor . stripColor ( subject . toString ( ) ) , org . hamcrest . CoreMatchers . is ( expected . toString ( ) ) ) |
deveObterQuantidadeItemEfetivamenteExportadoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemExportacaoIndireta exportacaoIndireta = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemExportacaoIndireta ( ) ; final java . lang . String quan... | org . junit . Assert . assertEquals ( quantidadeItemEfetivamenteExportado , exportacaoIndireta . getQuantidadeItemEfetivamenteExportado ( ) ) |
testParse ( ) { java . time . Duration duration = java . time . Duration . ofSeconds ( 323 , 1500000 ) ; java . time . Duration val1 = type . parse ( "PT5M23.0015S" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return baseType . parse ( value ) ; } | org . junit . Assert . assertEquals ( duration , val1 ) |
testRejectNullSubnetIPv4 ( ) { "<AssertPlaceHolder>" ; } isValidIpv4Subnet ( java . lang . String ) { java . lang . String ip ; java . lang . String subnet ; java . util . regex . Matcher ipMatcher ; if ( in == null ) { return false ; } ipMatcher = org . openstack . atlas . api . validation . util . IPString . IPUtils ... | org . junit . Assert . assertFalse ( org . openstack . atlas . api . validation . util . IPString . IPUtils . isValidIpv4Subnet ( null ) ) |
testGetCurrentUser ( ) { UserProfile user = smartsheet . userResources ( ) . getCurrentUser ( ) ; Account account = user . getAccount ( ) ; "<AssertPlaceHolder>" ; } getAccount ( ) { return account ; } | org . junit . Assert . assertNotNull ( user ) |
loadDrivers ( ) { java . util . List < org . osgi . service . device . DriverLocator > locators = new java . util . ArrayList < org . osgi . service . device . DriverLocator > ( ) ; org . osgi . service . device . DriverLocator dl = org . mockito . Mockito . mock ( org . osgi . service . device . DriverLocator . class ... | org . junit . Assert . assertEquals ( "" , 2 , refs . size ( ) ) |
testRetrieveAllQueryMetacards ( ) { ddf . catalog . data . Result result = new ddf . catalog . data . impl . ResultImpl ( new ddf . catalog . data . impl . MetacardImpl ( ) ) ; ddf . catalog . operation . QueryResponse queryResponse = mock ( ddf . catalog . operation . QueryResponse . class ) ; doReturn ( java . util .... | org . junit . Assert . assertThat ( statusCode , org . hamcrest . CoreMatchers . is ( 200 ) ) |
test_paramaterSetting_Config_setConfiguration_on_top_level_class ( ) { org . milyn . cdr . SmooksResourceConfiguration config = new org . milyn . cdr . SmooksResourceConfiguration ( ) ; org . milyn . cdr . MyContentDeliveryUnit5 cdu = new org . milyn . cdr . MyContentDeliveryUnit5 ( ) ; org . milyn . cdr . Configurator... | org . junit . Assert . assertNotNull ( cdu . config ) |
testAddValueObject ( ) { final org . apache . commons . lang3 . mutable . MutableByte mutNum = new org . apache . commons . lang3 . mutable . MutableByte ( ( ( byte ) ( 1 ) ) ) ; mutNum . add ( java . lang . Integer . valueOf ( 1 ) ) ; "<AssertPlaceHolder>" ; } byteValue ( ) { return value ; } | org . junit . Assert . assertEquals ( ( ( byte ) ( 2 ) ) , mutNum . byteValue ( ) ) |
testIntrospectOptionalVersion ( ) { com . jmethods . catatumbo . impl . EntityMetadata entityMetadata = com . jmethods . catatumbo . impl . EntityIntrospector . introspect ( com . jmethods . catatumbo . entities . OptionalVersion . class ) ; com . jmethods . catatumbo . impl . PropertyMetadata propertyMetadata = entity... | org . junit . Assert . assertFalse ( propertyMetadata . isOptional ( ) ) |
string_ends_with_apache_commons ( ) { boolean isAnchor = org . apache . commons . lang3 . StringUtils . endsWith ( "http://www.leveluplunch.com/#" , "#" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( isAnchor ) |
isComplex_shouldReturnTrueIfTheConceptIsComplex ( ) { org . openmrs . ConceptDatatype cd = new org . openmrs . ConceptDatatype ( ) ; cd . setName ( "Complex" ) ; cd . setHl7Abbreviation ( "ED" ) ; org . openmrs . ConceptComplex complexConcept = new org . openmrs . ConceptComplex ( ) ; complexConcept . setDatatype ( cd ... | org . junit . Assert . assertTrue ( obs . isComplex ( ) ) |
testIPv4toURL ( ) { try { final java . lang . String addressString = "192.168.0.1" ; java . net . InetAddress address = java . net . InetAddress . getByName ( addressString ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; ... | org . junit . Assert . assertEquals ( addressString , org . apache . flink . util . NetUtils . ipAddressToUrlString ( address ) ) |
getImpressionRowsTest ( ) { com . intuit . wasabi . experimentobjects . Experiment . ID experimentId = Experiment . ID . newInstance ( ) ; com . intuit . wasabi . analyticsobjects . Parameters parameters = mock ( com . intuit . wasabi . analyticsobjects . Parameters . class , com . intuit . wasabi . repository . databa... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( expected ) ) |
compareToInputNotNullOutputZero ( ) { final org . sejda . sambox . cos . COSObjectKey objectUnderTest = new org . sejda . sambox . cos . COSObjectKey ( 0L , 0 ) ; final org . sejda . sambox . cos . COSObjectKey other = new org . sejda . sambox . cos . COSObjectKey ( 0L , 0 ) ; final int retval = objectUnderTest . compa... | org . junit . Assert . assertEquals ( 0 , retval ) |
testExists_False ( ) { initializeExpectedDataset ( 1 ) ; com . google . cloud . bigquery . BigQuery [ ] expectedOptions = new BigQuery . DatasetOption [ ] { BigQuery . DatasetOption . fields ( ) } ; expect ( bigquery . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( bigquery . getDataset ( com . google . cloud ... | org . junit . Assert . assertFalse ( dataset . exists ( ) ) |
when_jobSubmitted_Then_executedSuccessfully ( ) { java . lang . String sourceName = "source" ; java . lang . String sinkName = "sink" ; fillListWithInts ( instance . getList ( sourceName ) , 10 ) ; com . hazelcast . jet . pipeline . Pipeline p = com . hazelcast . jet . pipeline . Pipeline . create ( ) ; p . drawFrom ( ... | org . junit . Assert . assertEquals ( 10 , instance . getList ( sinkName ) . size ( ) ) |
testTransformWithOneFunction ( ) { com . liferay . portal . dao . sql . transformer . SQLTransformer sqlTransformer = new com . liferay . portal . dao . sql . transformer . DefaultSQLTransformer ( new java . util . function . Function [ ] { _dummyFunction } ) ; "<AssertPlaceHolder>" ; } transform ( java . lang . String... | org . junit . Assert . assertNull ( sqlTransformer . transform ( null ) ) |
testFindAll ( ) { logger . debug ( "find<sp>All" ) ; java . util . List < fr . valtech . angularspring . app . domain . User > all = userDAO . findAll ( ) ; "<AssertPlaceHolder>" ; } findAll ( ) { return ( ( java . util . List < fr . valtech . angularspring . app . domain . User > ) ( em . createQuery ( "FROM<sp>User" ... | org . junit . Assert . assertThat ( all . size ( ) , org . hamcrest . Matchers . is ( 3 ) ) |
testGetWorld ( ) { System . out . println ( "getWorld" ) ; mudmap2 . backend . World world = new mudmap2 . backend . World ( ) ; mudmap2 . frontend . GUIElement . WorldPanel . WorldPanel instance = new mudmap2 . frontend . GUIElement . WorldPanel . WorldPanel ( null , world , false ) ; "<AssertPlaceHolder>" ; } getWorl... | org . junit . Assert . assertEquals ( world , instance . getWorld ( ) ) |
testLineCount ( ) { com . cloudera . flume . core . EventSource src = new com . cloudera . flume . handlers . debug . NoNlASCIISynthSource ( 25 , 100 , 1 ) ; src . open ( ) ; com . cloudera . flume . reporter . builder . SimpleRegexReporterBuilder b = new com . cloudera . flume . reporter . builder . SimpleRegexReporte... | org . junit . Assert . assertEquals ( 5 , sinks . size ( ) ) |
saveBrandingUrl ( ) { org . oscm . domobjects . Marketplace mp = new org . oscm . domobjects . Marketplace ( ) ; org . oscm . marketplace . bean . MarketplaceServiceBean brandMgmtBean = setupWithMock ( mp ) ; brandMgmtBean . saveBrandingUrl ( voMarketplace , org . oscm . marketplace . bean . MarketplaceServiceBeanBrand... | org . junit . Assert . assertEquals ( org . oscm . marketplace . bean . MarketplaceServiceBeanBrandingIT . BRANDING_URL , mp . getBrandingUrl ( ) ) |
testFindAll ( ) { org . oscarehr . PMmodule . model . CriteriaType cT1 = new org . oscarehr . PMmodule . model . CriteriaType ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( cT1 ) ; dao . persist ( cT1 ) ; org . oscarehr . PMmodule . model . CriteriaType cT2 = new org... | org . junit . Assert . assertTrue ( true ) |
testAdder3 ( ) { java . io . ByteArrayInputStream inputStream = new java . io . ByteArrayInputStream ( "2<sp>+<sp>3\n" . getBytes ( ) ) ; be . fedict . eid . applet . tests . javacc . adder3 . Adder3 adder = new be . fedict . eid . applet . tests . javacc . adder3 . Adder3 ( inputStream ) ; int result = adder . Start (... | org . junit . Assert . assertEquals ( 5 , result ) |
testGetAuthorsCount ( ) { java . math . BigInteger authorCount = com . iluwatar . cqrs . IntegrationTest . queryService . getAuthorsCount ( ) ; "<AssertPlaceHolder>" ; } getAuthorsCount ( ) { java . math . BigInteger authorcount = null ; try ( org . hibernate . Session session = sessionFactory . openSession ( ) ) { org... | org . junit . Assert . assertEquals ( new java . math . BigInteger ( "2" ) , authorCount ) |
envRootVariableInNdkSearchOrderIsUsed ( ) { java . nio . file . Path envDir = createTmpNdkVersions ( com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver . NDK_POST_R11_VERSION_FILENAME , "ndk-dir-r17c1" , "Pkg.Desc<sp>=<sp>Android<sp>NDK\nPkg.Revision<sp>=<sp>17.2.4988734.1" ) [ 0 ] ; com . fa... | org . junit . Assert . assertEquals ( envDir , resolver . getNdkOrThrow ( ) ) |
readOrderedLeafListDataAllTest ( ) { doReturn ( immediateFluentFuture ( java . util . Optional . of ( org . opendaylight . restconf . nb . rfc8040 . rests . utils . ReadDataTransactionUtilTest . DATA . orderedLeafSetNode1 ) ) ) . when ( read ) . read ( LogicalDatastoreType . OPERATIONAL , org . opendaylight . restconf ... | org . junit . Assert . assertEquals ( expectedData , normalizedNode ) |
calculateNumberOfSheepForEachTerrainTest ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatusExtended bse = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatusExtended ( 4 ) ; java . util . Map < it . polimi . deib . pr... | org . junit . Assert . assertEquals ( results . get ( terrain ) , map . get ( terrain ) ) |
testCatchException_ObjExc_superClassOfExpectedThrown ( ) { try { com . googlecode . catchexception . CatchException . catchException ( ( ) -> list . get ( 0 ) , com . googlecode . catchexception . ArrayIndexOutOfBoundsException . class ) ; org . junit . Assert . fail ( "IndexOutOfBoundsException<sp>is<sp>expected<sp>(s... | org . junit . Assert . assertNull ( com . googlecode . catchexception . CatchException . caughtException ( ) ) |
testGetAuthenticator ( ) { org . apache . hadoop . security . authentication . client . Authenticator authenticator = org . mockito . Mockito . mock ( org . apache . hadoop . security . authentication . client . Authenticator . class ) ; org . apache . hadoop . security . authentication . client . AuthenticatedURL aURL... | org . junit . Assert . assertEquals ( authenticator , aURL . getAuthenticator ( ) ) |
testPrettyPrint ( ) { java . lang . Double testAss = 50.0 ; java . lang . Double testSem = 55.0 ; java . lang . Double testCont = 55.0 ; java . lang . String expectedResult = ( ( ( ( ( ( ( ( ( "Dear<sp>student<sp>you<sp>have<sp>attained:\n" + "Assignment:<sp>" ) + testAss ) + "%\n" ) + "Semester<sp>test:<sp>" ) + testS... | org . junit . Assert . assertEquals ( expectedResult , result ) |
halfClosed_runtimeExceptionCancelsCall ( ) { io . grpc . internal . ServerImpl . JumpToApplicationThreadServerStreamListener listener = new io . grpc . internal . ServerImpl . JumpToApplicationThreadServerStreamListener ( executor . getScheduledExecutorService ( ) , executor . getScheduledExecutorService ( ) , stream ,... | org . junit . Assert . assertSame ( expectedT , t ) |
testAbsoluteNapiMountToDataset ( ) { org . eclipse . january . dataset . Dataset dummyData = org . eclipse . january . dataset . DatasetFactory . createFromObject ( new int [ ] { 0 , 1 , 2 } ) ; dummyData . setName ( "d" 0 ) ; try ( org . eclipse . dawnsci . nexus . NexusFile origin = org . eclipse . dawnsci . nexus . ... | org . junit . Assert . assertFalse ( group . containsDataNode ( "d" ) ) |
isStorageCrossClusterMigrationTestStorageTypeEqualsCluster ( ) { org . mockito . Mockito . doReturn ( 1L ) . when ( hostMock ) . getClusterId ( ) ; org . mockito . Mockito . doReturn ( 2L ) . when ( storagePoolVoMock ) . getClusterId ( ) ; org . mockito . Mockito . doReturn ( ScopeType . CLUSTER ) . when ( storagePoolV... | org . junit . Assert . assertTrue ( returnedValue ) |
testSetGlobalValues ( ) { System . out . println ( "<sp>setGlobalValues" ) ; final java . util . Map < java . lang . String , java . lang . Object > table = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; table . put ( "foo" , 1 ) ; table . put ( "bar" , 2 ) ; org . geotools . filter . f... | org . junit . Assert . assertEquals ( table . get ( name ) , value ) |
linuxCommandBuilderDriverTest ( ) { org . apache . reef . runtime . common . client . api . JobSubmissionEvent event = mock ( org . apache . reef . runtime . common . client . api . JobSubmissionEvent . class ) ; org . apache . reef . util . Optional < java . lang . Integer > memory = org . apache . reef . util . Optio... | org . junit . Assert . assertEquals ( expected , actual ) |
notBeforeDateIsCorrect ( ) { java . util . Date notBefore = helpers . CertificateHelper . stringToDate ( "Aug<sp>15<sp>10:56:49<sp>2012<sp>GMT" ) ; "<AssertPlaceHolder>" ; } getNotBefore ( ) { return certificate . getNotBefore ( ) ; } | org . junit . Assert . assertEquals ( notBefore , certificate . getNotBefore ( ) ) |
testBuildWithParametersAndDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "LieToMe" ; java . lang . String name = "fdsfds" ; org . lnu . is . domain . job . type . JobType context = new org . lnu . is . domain . job . type . JobType ( ) ; conte... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . reporters . FlexibleFileWriterGui instance = new kg . apc . jmeter . reporters . FlexibleFileWriterGui ( ) ; java . lang . String result = instance . getLabelResource ( ) ; "<AssertPlaceHolder>" ; } getLabelResource ( ) { ret... | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
initiallyEmpty ( ) { com . vaadin . ui . TextField textField = new com . vaadin . ui . TextField ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; } | org . junit . Assert . assertTrue ( textField . isEmpty ( ) ) |
testNotNullOptions ( ) { fr . opensagres . xdocreport . converter . Options options = fr . opensagres . xdocreport . converter . Options . getFrom ( "DOCX" ) ; fr . opensagres . poi . xwpf . converter . pdf . PdfOptions pdfOptions = fr . opensagres . xdocreport . converter . docx . poi . itext . XWPF2PDFViaITextConvert... | org . junit . Assert . assertNotNull ( pdfOptions ) |
testBadLocation ( ) { textViewer . setDocument ( null ) ; org . eclipse . jface . text . hyperlink . IHyperlink [ ] hyperlinks = detectHyperlinks ( 10 , 0 ) ; "<AssertPlaceHolder>" ; } detectHyperlinks ( int , int ) { return detector . detectHyperlinks ( textViewer , new org . eclipse . jface . text . Region ( offset ,... | org . junit . Assert . assertNull ( hyperlinks ) |
virtOnly ( ) { java . lang . String expected = "Pool<sp>is<sp>restricted<sp>to<sp>virtual<sp>guests:<sp>\"pool10\"." ; try { bindByPoolErrorTest ( "rulefailed.virt.only" ) ; org . junit . Assert . fail ( ) ; } catch ( org . candlepin . common . exceptions . ForbiddenException e ) { "<AssertPlaceHolder>" ; } } getMessag... | org . junit . Assert . assertEquals ( expected , e . getMessage ( ) ) |
shouldNotLoadPropertyWhenLoaded ( ) { final uk . gov . gchq . gaffer . data . element . ElementValueLoader elementLoader = mock ( uk . gov . gchq . gaffer . data . element . ElementValueLoader . class ) ; final java . lang . String propertyName = "property<sp>name" ; final java . lang . String exceptedPropertyValue = "... | org . junit . Assert . assertEquals ( exceptedPropertyValue , propertyValue ) |
parseEmpty ( ) { java . lang . String json = "{}" ; net . vvakame . util . jsonpullparser . JsonPullParser parser = net . vvakame . util . jsonpullparser . JsonPullParser . newParser ( json ) ; net . vvakame . util . jsonpullparser . util . JsonHash jsonHash = net . vvakame . util . jsonpullparser . util . JsonHash . f... | org . junit . Assert . assertThat ( jsonHash . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testRandomByteArrayTransfer2 ( ) { byte [ ] value = new byte [ ( io . netty . buffer . AbstractByteBufTest . BLOCK_SIZE ) * 2 ] ; for ( int i = 0 ; i < ( ( ( buffer . capacity ( ) ) - ( io . netty . buffer . AbstractByteBufTest . BLOCK_SIZE ) ) + 1 ) ; i += io . netty . buffer . AbstractByteBufTest . BLOCK_SIZE ) { ran... | org . junit . Assert . assertEquals ( expectedValue . getByte ( j ) , value [ j ] ) |
testReActivateNotificationSource ( ) { registration . setActive ( true ) ; registration . reActivateNotificationSource ( ) ; "<AssertPlaceHolder>" ; verify ( mount ) . invokeCreateSubscription ( stream , java . util . Optional . empty ( ) ) ; } isActive ( ) { return org . opendaylight . netconf . callhome . protocol . ... | org . junit . Assert . assertTrue ( registration . isActive ( ) ) |
contentTypeShouldNotEqualWithNull ( ) { java . lang . String contentTypeString = "text/just+for+test" ; com . navercorp . volleyextensions . volleyer . http . ContentType contentType = com . navercorp . volleyextensions . volleyer . http . ContentType . createContentType ( contentTypeString ) ; com . navercorp . volley... | org . junit . Assert . assertTrue ( ( ( contentType . equals ( nullContentType ) ) == false ) ) |
testMissingPublicKey ( ) { logger . info ( LinShareTestConstants . BEGIN_TEST ) ; java . security . interfaces . RSAPublicKey key = org . linagora . linshare . core . utils . PemRsaKeyHelper . loadSSHPublicKeyFromFile ( ( ( pemPublicKeyPath ) + "foo" ) ) ; "<AssertPlaceHolder>" ; logger . info ( LinShareTestConstants .... | org . junit . Assert . assertEquals ( null , key ) |
shouldDecodeLegacyBinary ( ) { com . couchbase . client . java . document . BinaryDocument document = converter . decode ( "id" , com . couchbase . client . deps . io . netty . buffer . Unpooled . copiedBuffer ( "value" , CharsetUtil . UTF_8 ) , 0 , 0 , TranscoderUtils . BINARY_COMPAT_FLAGS , ResponseStatus . SUCCESS )... | org . junit . Assert . assertEquals ( "value" , document . content ( ) . toString ( CharsetUtil . UTF_8 ) ) |
backhaulViolationAtAct2_shouldWork ( ) { buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore ( ) ; com . graphhopper . jsprit . core . analysis . SolutionAnalyser analyser = new com . graphhopper . jsprit . core . analysis . SolutionAnalyser ( vrp , solution , vrp . getTransportCosts ( ) ) ; com . grap... | org . junit . Assert . assertFalse ( violation ) |
createTypeFromClass ( ) { com . baidu . unbiz . easymapper . metadata . Type < ? > type = com . baidu . unbiz . easymapper . metadata . TypeFactory . valueOf ( "java.util.List" ) ; "<AssertPlaceHolder>" ; } getRawType ( ) { return getType ( ) . getRawType ( ) ; } | org . junit . Assert . assertEquals ( java . util . List . class , type . getRawType ( ) ) |
testLines ( ) { org . springframework . mock . web . MockHttpServletResponse resp = getAsServletResponse ( "wfs?request=GetFeature&version=1.1.0&typeName=Lines&outputFormat=dxf" ) ; java . lang . String sResponse = testBasicResult ( resp , "Lines" ) ; int pos = getGeometrySearchStart ( sResponse ) ; "<AssertPlaceHolder... | org . junit . Assert . assertTrue ( ( pos != ( - 1 ) ) ) |
lazyLoadingDetachWarning ( ) { javax . persistence . EntityManager em = factory . createEntityManager ( ) ; org . meri . jpa . relationships . entities . Person simon = em . find ( org . meri . jpa . relationships . entities . Person . class , org . meri . jpa . relationships . SIMON_SLASH_ID ) ; em . detach ( simon ) ... | org . junit . Assert . assertNull ( simon . getTwitterAccounts ( ) ) |
testChangeSessionId ( ) { javax . servlet . http . HttpServletRequest wrappedSimple = mock ( javax . servlet . http . HttpServletRequest . class ) ; com . amadeus . session . servlet . HttpRequestWrapper req = new com . amadeus . session . servlet . HttpRequestWrapper ( wrappedSimple , servletContext ) ; com . amadeus ... | org . junit . Assert . assertEquals ( com . amadeus . session . servlet . TestHttpRequestWrapper . SESSION_ID , id ) |
testContextBoundConstraintValidatorFactory ( ) { final java . util . Set < javax . validation . ConstraintViolation < org . apache . bval . jsr . ContextConstraintValidatorFactoryTest . Example > > violations = validator . validate ( new org . apache . bval . jsr . ContextConstraintValidatorFactoryTest . Example ( ) ) ... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
whenAddItemThatAddInMassive ( ) { ru . java_edu . start . Tracker track = new ru . java_edu . start . Tracker ( ) ; ru . java_edu . start . Task task1 = new ru . java_edu . start . Task ( "pervaja<sp>zajavka" , "eto<sp>pervaja<sp>zajavka" ) ; "<AssertPlaceHolder>" ; } addItem ( ru . szhernovoy . tracker . models . Task... | org . junit . Assert . assertNotNull ( track . addItem ( task1 ) ) |
testCreateAgentWithRights ( ) { net . maritimecloud . identityregistry . model . database . Organization actingOrg = mock ( net . maritimecloud . identityregistry . model . database . Organization . class ) ; actingOrg . setMrn ( "urn:mrn:mcp:org:agent" ) ; net . maritimecloud . identityregistry . model . database . Or... | org . junit . Assert . assertTrue ( false ) |
isPackageLocalMethodAndTestingRequired_A$MethodMeta$TestingTarget ( ) { org . junithelper . core . meta . MethodMeta methodMeta = new org . junithelper . core . meta . MethodMeta ( ) ; methodMeta . accessModifier = org . junithelper . core . meta . AccessModifier . PackageLocal ; org . junithelper . core . config . Tes... | org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) ) |
testCloseThreadGroup ( ) { final java . util . concurrent . atomic . AtomicBoolean flag = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; final java . util . concurrent . CountDownLatch passedCloseCall = new java . util . concurrent . CountDownLatch ( 1 ) ; java . lang . Thread t = SQSSession . SESSIO... | org . junit . Assert . assertTrue ( flag . get ( ) ) |
shouldReturnAllOperationsAsOperationDetails ( ) { final java . util . Set < java . lang . Class < ? extends uk . gov . gchq . gaffer . operation . Operation > > expectedOperations = client . getDefaultGraphFactory ( ) . getGraph ( ) . getSupportedOperations ( ) ; final javax . ws . rs . core . Response response = ( ( u... | org . junit . Assert . assertTrue ( opDetailClasses . contains ( clazz . getName ( ) ) ) |
testJoinerConfigWithSelectedFields ( ) { io . cdap . plugin . batch . joiner . JoinerConfig config = new io . cdap . plugin . batch . joiner . JoinerConfig ( ( "film.film_id=filmActor.film_id=filmCategory.film_id&" + "film.film_name=filmActor.film_name=filmCategory.film_name" ) , io . cdap . plugin . batch . joiner . J... | org . junit . Assert . assertEquals ( expected . build ( ) , config . getPerStageSelectedFields ( ) ) |
getTimestamp ( ) { long timestamp = java . lang . System . currentTimeMillis ( ) ; long input = 1000 ; long output = 2000 ; long inputRates = 10 ; long outputRates = 20 ; result = new com . ctrip . xpipe . redis . core . proxy . monitor . SessionTrafficResult ( timestamp , input , output , inputRates , outputRates ) ; ... | org . junit . Assert . assertEquals ( timestamp , result . getTimestamp ( ) ) |
accountServiceEventShouldHave2Itmems ( ) { rae = mapper . map ( dae , rae . getClass ( ) ) ; "<AssertPlaceHolder>" ; } getLoadBalancerServiceEvents ( ) { if ( ( loadBalancerServiceEvents ) == null ) { loadBalancerServiceEvents = new java . util . ArrayList < org . openstack . atlas . service . domain . events . pojos .... | org . junit . Assert . assertEquals ( 2 , rae . getLoadBalancerServiceEvents ( ) . size ( ) ) |
testReadEmptyFile ( ) { try { com . emc . storageos . systemservices . impl . healthmonitor . FileReadUtil . readFirstLine ( com . emc . storageos . systemservices . impl . healthmonitor . FileReadUtilTest . TEST_EMPTY_FILE_PATH ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlace... | org . junit . Assert . assertTrue ( true ) |
test_String_array ( ) { com . gh . mygreen . xlsmapper . xml . OgnlValueFormatter formatter = new com . gh . mygreen . xlsmapper . xml . OgnlValueFormatter ( ) ; java . lang . String exp = formatter . format ( new java . lang . String [ ] { "Hello" , "こ\"んにちは" } ) ; org . junit . Assert . assertThat ( exp , is ( "new<s... | org . junit . Assert . assertArrayEquals ( ( ( java . lang . String [ ] ) ( evalOgnl ( exp ) ) ) , new java . lang . String [ ] { "Hello" , "こ\"んにちは" } ) |
testGetChainID ( ) { org . openscience . cdk . interfaces . IPDBAtom atom = ( ( org . openscience . cdk . interfaces . IPDBAtom ) ( newChemObject ( ) ) ) ; atom . setSymbol ( "C" ) ; atom . setChainID ( "123" ) ; "<AssertPlaceHolder>" ; } getChainID ( ) { return chainID ; } | org . junit . Assert . assertEquals ( "123" , atom . getChainID ( ) ) |
should_verify_null_password ( ) { org . mamute . model . User user = user ( org . mamute . validators . SignupValidatorTest . VALID_USER_NAME , org . mamute . validators . SignupValidatorTest . VALID_EMAIL ) ; boolean valid = signupValidator . validate ( user , null , null ) ; "<AssertPlaceHolder>" ; } validate ( org .... | org . junit . Assert . assertFalse ( valid ) |
testScanning ( ) { final org . jboss . shrinkwrap . api . Archive < ? > archive = create ( org . jboss . shrinkwrap . api . BeanArchive . class ) . addClass ( org . jboss . weld . environment . se . test . builder . scanning . EmbeddedApplication . class ) ; final java . io . File jar = java . io . File . createTempFil... | org . junit . Assert . assertEquals ( 10 , payload . intValue ( ) ) |
testEntityLinkingEnhancementEngine ( ) { org . apache . stanbol . enhancer . servicesapi . ContentItem ci = initContentItem ( ) ; org . apache . stanbol . enhancer . engines . entitytagging . impl . NamedEntityTaggingEngine entityLinkingEngine = initEngine ( true , true , true ) ; entityLinkingEngine . computeEnhanceme... | org . junit . Assert . assertEquals ( 3 , entityAnnotationCount ) |
shouldHandleFlipBeanFailedExceptionGivenFipWithBeanFailed ( ) { java . lang . String response = flipControllerAdvice . handleFlipBeanFailedException ( new org . flips . exception . FlipBeanFailedException ( "test" ) ) ; "<AssertPlaceHolder>" ; } handleFlipBeanFailedException ( org . flips . exception . FlipBeanFailedEx... | org . junit . Assert . assertEquals ( "test" , response ) |
testPow ( ) { javax . measure . Unit < ? > result = one . pow ( 10 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( one , result ) |
disallowsNullKeyAndNullValue ( ) { "<AssertPlaceHolder>" ; } okToAdd ( java . lang . Object , java . lang . Object ) { return true ; } | org . junit . Assert . assertFalse ( generator . okToAdd ( null , null ) ) |
testDefaultValue ( ) { java . lang . String INPUT = "My<sp>Default" ; com . thinkbiganalytics . policy . standardization . DefaultValueStandardizer standardizer = new com . thinkbiganalytics . policy . standardization . DefaultValueStandardizer ( INPUT ) ; com . thinkbiganalytics . policy . rest . model . FieldStandard... | org . junit . Assert . assertEquals ( INPUT , convertedPolicy . getDefaultStr ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.