input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSerialization ( ) { org . jfree . data . time . TimeSeries s1 = new org . jfree . data . time . TimeSeries ( "A<sp>test" ) ; s1 . add ( new org . jfree . data . time . Year ( 2000 ) , 13.75 ) ; s1 . add ( new org . jfree . data . time . Year ( 2001 ) , 11.9 ) ; s1 . add ( new org . jfree . data . time . Year ( 2002... | org . junit . Assert . assertTrue ( s1 . equals ( s2 ) ) |
refineTest ( ) { java . lang . String acpString = "C0C1O2O3<sp>0:1(1),0:3(1),1:2(1),2:3(1)" ; org . openscience . cdk . interfaces . IAtomContainer ac = org . openscience . cdk . group . AtomContainerPrinter . fromString ( acpString , org . openscience . cdk . group . AtomDiscretePartitionRefinerTest . builder ) ; org ... | org . junit . Assert . assertEquals ( 2 , autG . order ( ) ) |
editUser ( ) { de . blizzy . documentr . access . User user = new de . blizzy . documentr . access . User ( "user" , "pw" , "email" , false ) ; when ( userStore . getUser ( "user" ) ) . thenReturn ( user ) ; java . lang . String view = userController . editUser ( "user" , model ) ; "<AssertPlaceHolder>" ; verify ( mode... | org . junit . Assert . assertEquals ( "/user/edit" , view ) |
shouldReturnSame ( ) { org . simmetrics . StringMetric s = new org . simmetrics . metrics . StringMetrics . ForString ( metric ) ; "<AssertPlaceHolder>" ; } create ( org . simmetrics . Metric ) { if ( metric instanceof org . simmetrics . StringMetric ) { return ( ( org . simmetrics . StringMetric ) ( metric ) ) ; } ret... | org . junit . Assert . assertSame ( s , org . simmetrics . metrics . StringMetrics . create ( s ) ) |
applyIpTest ( ) { final com . cloud . network . Network network = mock ( com . cloud . network . Network . class ) ; when ( network . getBroadcastDomainType ( ) ) . thenReturn ( BroadcastDomainType . Lswitch ) ; when ( network . getId ( ) ) . thenReturn ( com . cloud . network . element . NiciraNvpElementTest . NETWORK... | org . junit . Assert . assertTrue ( element . applyIps ( network , ipAddresses , services ) ) |
testByteStaxUnmarshaller ( ) { com . amazonaws . transform . SimpleTypeStaxUnmarshallers . ByteStaxUnmarshaller unmarshaller = SimpleTypeStaxUnmarshallers . ByteStaxUnmarshaller . getInstance ( ) ; java . lang . Byte unmarshalled = unmarshaller . unmarshall ( getContext ( "127" ) ) ; "<AssertPlaceHolder>" ; } valueOf (... | org . junit . Assert . assertEquals ( unmarshalled , java . lang . Byte . valueOf ( "127" ) ) |
testEqualsSelf ( ) { org . jfree . data . time . Minute minute = new org . jfree . data . time . Minute ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; mdz . hc . Pro... | org . junit . Assert . assertTrue ( minute . equals ( minute ) ) |
testThreeParamConstructor ( ) { final java . lang . String strData = "foobar" ; final byte [ ] contents = strData . getBytes ( ) ; java . io . InputStream input = new java . io . ByteArrayInputStream ( contents ) ; byte [ ] boundary = org . apache . commons . fileupload2 . MultipartStreamTest . BOUNDARY_TEXT . getBytes... | org . junit . Assert . assertNotNull ( ms ) |
checkColumnType ( ) { "<AssertPlaceHolder>" ; } getSupportedColumnType ( ) { return org . drools . workbench . models . guided . dtable . shared . model . ActionRetractFactCol52 . class ; } | org . junit . Assert . assertEquals ( org . drools . workbench . models . guided . dtable . shared . model . ActionRetractFactCol52 . class , builder . getSupportedColumnType ( ) ) |
testRunSetsInstantStoppedUponSuccess ( ) { edu . illinois . library . cantaloupe . async . AuditableFutureTask < ? > task = new edu . illinois . library . cantaloupe . async . AuditableFutureTask ( ( ) -> "" ) ; task . run ( ) ; final long delta = ( java . time . Instant . now ( ) . toEpochMilli ( ) ) - ( task . getIns... | org . junit . Assert . assertTrue ( ( delta < 10 ) ) |
shouldReturnCountForGivenCriteriaQueryWithGivenIndexNameForSpecificIndex ( ) { cleanUpIndices ( ) ; java . lang . String documentId1 = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity1 = org . springframework . data . elasticsearch . entities . SampleEntity . bui... | org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) ) |
set_string_enablesChaining ( ) { "<AssertPlaceHolder>" ; } set ( int , org . eclipse . ui . internal . IChangeListener ) { setState ( new java . lang . Integer ( newValue ) , source ) ; } | org . junit . Assert . assertSame ( object , object . set ( "a" , "foo" ) ) |
testTranslateAsync_sync ( ) { java . lang . String value = translateService . translateAsync ( new com . hp . alm . ali . idea . translate . filter . TranslatorSync ( ) , "VALUE" , false , new com . hp . alm . ali . idea . translate . ValueCallback ( ) { @ com . hp . alm . ali . idea . translate . Override public void ... | org . junit . Assert . assertEquals ( "value" , value ) |
insertTest ( ) { org . bugkillers . core . domain . QuestionDO questionDO = new org . bugkillers . core . domain . QuestionDO ( ) ; questionDO . setUserId ( 1 ) ; questionDO . setQuestionTitle ( "Java<sp>" ) ; questionDO . setQuestionSummary ( "Java" ) ; questionDO . setQuestionText ( "Java" ) ; org . bugkillers . core... | org . junit . Assert . assertTrue ( true ) |
testProcessorEvents3 ( ) { java . lang . String events = recordRichStringProcessorEvents ( ( "\'\'\'\n" + ( ( "�IF<sp>true�\n" + "�ENDIF�\n" ) + "'''" ) ) ) ; java . lang . String expected = "announceNextLiteral()\n" + ( ( ( ( ( ( ( ( ( ( ( ( "acceptTemplateText()\n" + "acceptTemplateLineBreak()\n" ) + "acceptTemplateT... | org . junit . Assert . assertEquals ( expected , events ) |
UmlLinkType_VariableInstance_GenericType_MultipleTypeParameters ( ) { java . lang . String fromClass = "domain.direct.violating.DeclarationVariableInstance_GenericType_MultipleTypeParameters" ; java . lang . String toClass = "technology.direct.dao.FriendsDAO" ; java . lang . String fromAttribute = "hashMap" ; boolean i... | org . junit . Assert . assertTrue ( isUmlLinkDetectedViaClass ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) ) |
listIterator_previous ( ) { for ( int i = 0 ; i < 5 ; ++ i ) it . next ( ) ; for ( int i = 5 ; i > 0 ; -- i ) "<AssertPlaceHolder>" ; } previous ( ) { if ( ( index ) <= 0 ) throw new com . machinezoo . sourceafis . NoSuchElementException ( ) ; -- ( index ) ; return get ( index ) ; } | org . junit . Assert . assertEquals ( i , ( ( int ) ( it . previous ( ) ) ) ) |
testIsDetail_Initial ( ) { "<AssertPlaceHolder>" ; } isDetail ( ) { checkWidget ( ) ; return detail ; } | org . junit . Assert . assertTrue ( column . isDetail ( ) ) |
testCreateImmunizationsSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . ImmunizationsSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . createImmunizationsSectionBuilde... | org . junit . Assert . assertNotNull ( section ) |
findByNameTest ( ) { com . yong . orders . model . User result = dao . findByName ( "testUser" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( user , result ) |
loadGroupFromAlias ( ) { dynamicSetUp ( ) ; java . util . List < java . lang . String > logMessages = captureLogMessages ( 20 ) ; java . lang . String aliasname = "Rubbles" ; boolean isAlias = false ; try { j . jenkins . getSecurityRealm ( ) . loadGroupByGroupname ( aliasname ) ; } catch ( java . lang . Exception e ) {... | org . junit . Assert . assertTrue ( isAlias ) |
testGet_empty ( ) { org . eclipse . smarthome . core . items . MetadataKey key = new org . eclipse . smarthome . core . items . MetadataKey ( "namespace" , "itemName" ) ; org . eclipse . smarthome . core . items . Metadata res = registry . get ( key ) ; "<AssertPlaceHolder>" ; } get ( K ) { if ( key == null ) { throw n... | org . junit . Assert . assertNull ( res ) |
shouldReturnHeliosNonEmptyHostnameWithNoHostname ( ) { com . spotify . logging . LoggingConfigurator . configureDefaults ( ) ; "<AssertPlaceHolder>" ; } getLoggingContextHostnameProperty ( ) { final ch . qos . logback . classic . Logger accessPointLogger = ( ( ch . qos . logback . classic . Logger ) ( org . slf4j . Log... | org . junit . Assert . assertNotNull ( getLoggingContextHostnameProperty ( ) ) |
testCreateSubnetworkWithOptions ( ) { initializeExpectedNetwork ( 3 ) ; com . google . cloud . compute . deprecated . Operation operation = new com . google . cloud . compute . deprecated . Operation . Builder ( serviceMockReturnsOptions ) . setOperationId ( com . google . cloud . compute . deprecated . RegionOperation... | org . junit . Assert . assertSame ( operation , network . createSubnetwork ( com . google . cloud . compute . deprecated . NetworkTest . SUBNETWORK1 , com . google . cloud . compute . deprecated . NetworkTest . IP_RANGE , Compute . OperationOption . fields ( ) ) ) |
testGetCompilePathWithInternalLibrary ( ) { final org . oscm . build . ant . PathBuilderTest . ProjectStub projectA = new org . oscm . build . ant . PathBuilderTest . ProjectStub ( "project-a" ) ; projectA . addLibraries ( org . oscm . build . ant . PathBuilderTest . LIB ) ; org . apache . tools . ant . types . Path pa... | org . junit . Assert . assertEquals ( java . util . Collections . singletonList ( absospath ( org . oscm . build . ant . PathBuilderTest . LIB ) ) , java . util . Arrays . asList ( path . list ( ) ) ) |
testTransposeNull ( ) { "<AssertPlaceHolder>" ; } transpose ( org . apache . commons . functor . BinaryProcedure ) { return null == p ? null : new org . apache . commons . functor . core . composite . TransposedProcedure < R , L > ( p ) ; } | org . junit . Assert . assertNull ( org . apache . commons . functor . core . composite . TransposedProcedure . transpose ( null ) ) |
createSamplerSamplingRate_Negative ( ) { com . navercorp . pinpoint . profiler . sampler . SamplerFactory samplerFactory = new com . navercorp . pinpoint . profiler . sampler . SamplerFactory ( ) ; com . navercorp . pinpoint . bootstrap . sampler . Sampler sampler = samplerFactory . createSampler ( true , ( - 1 ) ) ; b... | org . junit . Assert . assertFalse ( sampling ) |
testBuildWithDisabledSecurityConstraintsWithOrderBy ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . asset . state . AssetState context = new org . lnu . is . domain . asset . state . AssetState ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "name" , org... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
shouldAcceptSessionPersistence ( ) { org . openstack . atlas . api . validation . validators . SessionPersistence persistence = new org . openstack . atlas . api . validation . validators . SessionPersistence ( ) ; persistence . setPersistenceType ( org . openstack . atlas . docs . loadbalancers . api . v1 . Persistenc... | org . junit . Assert . assertTrue ( result . passedValidation ( ) ) |
shouldApplyLabelTokenCommandToTheStoreInRecovery ( ) { final org . neo4j . kernel . impl . api . BatchTransactionApplier applier = newApplier ( true ) ; final org . neo4j . kernel . impl . store . record . LabelTokenRecord before = new org . neo4j . kernel . impl . store . record . LabelTokenRecord ( 42 ) ; final org .... | org . junit . Assert . assertFalse ( result ) |
checkNullNonce ( ) { final com . amazonaws . encryptionsdk . model . CipherBlockHeaders cipherBlockHeaders = new com . amazonaws . encryptionsdk . model . CipherBlockHeaders ( ) ; cipherBlockHeaders . setNonceLength ( ( ( short ) ( nonceLen_ ) ) ) ; "<AssertPlaceHolder>" ; } getNonce ( ) { return ( nonce_ ) != null ? n... | org . junit . Assert . assertArrayEquals ( null , cipherBlockHeaders . getNonce ( ) ) |
bytes ( ) { byte [ ] bytes = "TheString" . getBytes ( ) ; org . sejda . sambox . cos . COSString other = org . sejda . sambox . cos . COSString . parseLiteral ( "A<sp>string" ) ; other . setValue ( bytes ) ; "<AssertPlaceHolder>" ; } newInstance ( byte [ ] ) { return new org . sejda . sambox . cos . COSString ( value )... | org . junit . Assert . assertEquals ( org . sejda . sambox . cos . COSString . newInstance ( bytes ) , other ) |
testConvertDateWithNull ( ) { final java . lang . String date = ( ( java . lang . String ) ( converter . convert ( java . lang . String . class , null ) ) ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Class , java . lang . Object ) { if ( value == null ) { return null ; } else { if ( value instanceof java . lan... | org . junit . Assert . assertNull ( date ) |
testGetDurationReturnsConstructorValue ( ) { final org . apache . logging . log4j . core . appender . rolling . action . IfLastModified filter = org . apache . logging . log4j . core . appender . rolling . action . IfLastModified . createAgeCondition ( org . apache . logging . log4j . core . appender . rolling . action... | org . junit . Assert . assertEquals ( 0 , filter . getAge ( ) . compareTo ( org . apache . logging . log4j . core . appender . rolling . action . Duration . parse ( "P7D" ) ) ) |
processorStateTestMultiplePushesPopAndPeek ( ) { com . itextpdf . svg . processors . impl . ProcessorState testProcessorState = new com . itextpdf . svg . processors . impl . ProcessorState ( ) ; com . itextpdf . svg . renderers . ISvgNodeRenderer rendererOne = new com . itextpdf . svg . dummy . renderers . impl . Dumm... | org . junit . Assert . assertTrue ( result ) |
testUserInputToValue_changeValueToNull ( ) { fieldUnderTest . userInputToValue ( "2.0" ) ; fieldUnderTest . userInputToValue ( "" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return generator . getValue ( item , itemId , propertyId ) ; } | org . junit . Assert . assertThat ( fieldUnderTest . getValue ( ) , org . hamcrest . CoreMatchers . is ( ( ( java . lang . Integer ) ( null ) ) ) ) |
test_output_type11 ( ) { java . lang . String matlab_function = "ones" ; int numout = 1 ; java . lang . Object [ ] argsT = new java . lang . Object [ 3 ] ; argsT [ 0 ] = 1 ; argsT [ 1 ] = 1 ; argsT [ 2 ] = 1 ; argsT [ 2 ] = "uint16" ; java . lang . Object [ ] output = null ; try { output = br . com . embraer . massif .... | org . junit . Assert . assertEquals ( 1 , result [ 0 ] , 0 ) |
testCapitalizeWords1 ( ) { java . lang . Object s = "" ; java . lang . String expResult = "" ; java . lang . String result = org . thymeleaf . util . StringUtils . capitalizeWords ( s ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testGetAddress ( ) { opts . parseArgs ( org . apache . accumulo . server . ServerOptsTest . class . getName ( ) , new java . lang . String [ ] { "-a" , "1.2.3.4" } ) ; "<AssertPlaceHolder>" ; } getAddress ( ) { if ( ( address ) != null ) return address ; return "0.0.0.0" ; } | org . junit . Assert . assertEquals ( "1.2.3.4" , opts . getAddress ( ) ) |
execute_instanceNotAvailable_operationFromQueue ( ) { org . oscm . app . domain . ServiceInstance si = spy ( new org . oscm . app . domain . ServiceInstance ( ) ) ; doReturn ( false ) . when ( si ) . isAvailable ( ) ; doReturn ( si ) . when ( instanceDAO ) . getInstanceById ( anyString ( ) ) ; org . oscm . operation . ... | org . junit . Assert . assertNull ( result . getErrorMessage ( ) ) |
testDeleteOutputDirectoryWhenErrorIsRaisedPullingSegmentFiles ( ) { final java . io . File outDir = java . nio . file . Files . createTempDirectory ( "druid" ) . toFile ( ) ; try { expect ( azureStorage . getBlobInputStream ( org . apache . druid . storage . azure . AzureDataSegmentPullerTest . containerName , org . ap... | org . junit . Assert . assertFalse ( outDir . exists ( ) ) |
extract ( ) { java . io . File f = sampleDir . getFile ( file ) ; org . apache . poi . hssf . record . crypto . Biff8EncryptionKey . setCurrentUserPassword ( password ) ; try ( org . apache . poi . extractor . POITextExtractor te = org . apache . poi . ooxml . extractor . ExtractorFactory . createExtractor ( f ) ) { ja... | org . junit . Assert . assertEquals ( expected , actual ) |
recognize_flags_with_arguments ( ) { java . lang . String [ ] flagsWithArguments = new java . lang . String [ ] { "t" , "v" , "q" , "V" } ; final java . lang . StringBuilder queryBuilder = new java . lang . StringBuilder ( ) ; for ( java . lang . String flag : flagsWithArguments ) { queryBuilder . append ( "-" ) . appe... | org . junit . Assert . assertThat ( subject . getSearchValue ( ) , org . hamcrest . Matchers . is ( "is<sp>wrong" ) ) |
testReadNotFromZero ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 20 ; i ++ ) { int length = randomInt ( 100 , 500 ) ; java . lang . String random = randomString ( length ) ; sb . append ( random ) ; commandStore . appendCommands ( io . netty . buffer . Unpooled . wr... | org . junit . Assert . assertEquals ( sb . substring ( ( ( int ) ( offset ) ) ) , result ) |
testScanCloseAfterCommit ( ) { for ( int i = 0 ; i < ( com . geophile . erdo . OrderedMapTransactionTest . N ) ; i ++ ) { map . put ( com . geophile . erdo . TestRecord . createRecord ( i , null ) ) ; } com . geophile . erdo . Cursor cursor = map . first ( ) ; db . commitTransaction ( ) ; cursor . close ( ) ; "<AssertP... | org . junit . Assert . assertNull ( cursor . next ( ) ) |
testSetConnectionProvide ( ) { org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ConnectionProvider connectionProvider = mock ( org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ConnectionProvider . class ) ; factory . setConnectionProvid... | org . junit . Assert . assertThat ( factory . getConnectionProvider ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( connectionProvider ) ) ) |
testGetBio_1 ( ) { org . jinstagram . entity . users . feed . UserFeedData fixture = new org . jinstagram . entity . users . feed . UserFeedData ( ) ; fixture . setBio ( "" ) ; fixture . setId ( "" ) ; fixture . setFirstName ( "" ) ; fixture . setLastName ( "" ) ; fixture . setUserName ( "" ) ; fixture . setProfilePict... | org . junit . Assert . assertEquals ( "" , result ) |
shouldBuildRandomTimeBasedTimestampWhenPropertyIsNull ( ) { final uk . gov . gchq . gaffer . store . schema . Schema schema = new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( ) . json ( uk . gov . gchq . gaffer . commonutil . StreamUtil . schemas ( getClass ( ) ) ) . build ( ) ; serialisation = new uk... | org . junit . Assert . assertEquals ( n , timestamps . size ( ) ) |
testGetWikiPage ( ) { System . out . println ( "getWikiPage" ) ; kg . apc . jmeter . graphs . AbstractGraphPanelVisualizer instance = new kg . apc . jmeter . graphs . AbstractGraphPanelVisualizerTest . AbstractGraphPanelVisualizerImpl ( ) ; java . lang . String expResult = "" ; java . lang . String result = instance . ... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetWiki ( ) { com . dremio . service . namespace . NamespaceKey spacePath = new com . dremio . service . namespace . NamespaceKey ( "testspace" ) ; java . util . List < java . lang . String > vdsPath = java . util . Arrays . asList ( spacePath . getRoot ( ) , "testVDS" ) ; createSpaceAndVDS ( spacePath , vdsPath ) ... | org . junit . Assert . assertEquals ( wiki . getText ( ) , newWiki . getText ( ) ) |
customActivationStrategy ( ) { loadWithDefaults ( new java . lang . Class [ ] { org . togglz . spring . boot . autoconfigure . TogglzAutoConfigurationTest . FeatureProviderConfig . class , org . togglz . spring . boot . autoconfigure . TogglzAutoConfigurationTest . ActivationStrategyConfig . class } ) ; org . togglz . ... | org . junit . Assert . assertTrue ( featureManager . getActivationStrategies ( ) . contains ( customActivationStrategy ) ) |
modulus ( ) { dk . alexandra . fresco . framework . builder . numeric . field . MersennePrimeModulus modulus = new dk . alexandra . fresco . framework . builder . numeric . field . MersennePrimeModulus ( 160 , 47 ) ; java . util . Random random = new java . util . Random ( 1098069923225L ) ; for ( int i = 0 ; i < 50 ; ... | org . junit . Assert . assertThat ( mod , org . hamcrest . core . Is . is ( value . mod ( modulus . getPrime ( ) ) ) ) |
testGetEndTime ( ) { long result = fixture . getEndTime ( ) ; "<AssertPlaceHolder>" ; } getEndTime ( ) { return fEnd ; } | org . junit . Assert . assertTrue ( ( 0L < result ) ) |
testHasAllRolesTwoRolesFailTwoProfiles ( ) { final org . pac4j . core . authorization . authorizer . RequireAllRolesAuthorizer authorizer = new org . pac4j . core . authorization . authorizer . RequireAllRolesAuthorizer ( new java . lang . String [ ] { org . pac4j . core . authorization . authorizer . RequireAllRolesAu... | org . junit . Assert . assertFalse ( authorizer . isAuthorized ( context , profiles ) ) |
testFromJson ( ) { com . redhat . lightblue . query . RValueExpression expResult = new com . redhat . lightblue . query . RValueExpression ( com . redhat . lightblue . util . Path . ANYPATH ) ; com . redhat . lightblue . query . RValueExpression result = com . redhat . lightblue . query . RValueExpression . fromJson ( ... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetLastEventTimeInSubsequentRequests ( ) { org . eclipse . rap . rwt . testfixture . internal . Fixture . fakePhase ( PhaseId . READ_DATA ) ; int eventTime1 = org . eclipse . swt . internal . events . EventUtil . getLastEventTime ( ) ; simulateNewRequest ( ) ; java . lang . Thread . sleep ( 5 ) ; int eventTime2 = o... | org . junit . Assert . assertTrue ( ( eventTime1 < eventTime2 ) ) |
testCountUsers ( ) { login ( "admin" ) ; final org . appfuse . webapp . server . services . UsersSearchCriteria searchCriteria = new org . appfuse . webapp . server . services . UsersSearchCriteria ( ) ; final long count = userRequestService . countUsers ( searchCriteria ) ; "<AssertPlaceHolder>" ; } countUsers ( org .... | org . junit . Assert . assertTrue ( ( count > 0 ) ) |
testFetchAndLockWithDifferentTenant ( ) { identityService . setAuthentication ( "aUserId" , null , java . util . Arrays . asList ( "tenantTwo" ) ) ; java . util . List < org . camunda . bpm . engine . externaltask . LockedExternalTask > externalTasks = externalTaskService . fetchAndLock ( 1 , org . camunda . bpm . engi... | org . junit . Assert . assertEquals ( 0 , externalTasks . size ( ) ) |
testStrings ( ) { com . google . gson . JsonObject jo1 = newTestObject ( ) ; org . apache . edgent . function . Function < com . google . gson . JsonObject , java . lang . String > asString = org . apache . edgent . topology . json . JsonFunctions . asString ( ) ; org . apache . edgent . function . Function < java . la... | org . junit . Assert . assertEquals ( jo2 , jo1 ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . dynamic . data . mapping . model . DDMTemplateLink > ddmTemplateLinks = _persistence . fe... | org . junit . Assert . assertTrue ( ddmTemplateLinks . isEmpty ( ) ) |
testEquals ( ) { org . jfree . chart . axis . StandardTickUnitSource t1 = new org . jfree . chart . axis . StandardTickUnitSource ( ) ; org . jfree . chart . axis . StandardTickUnitSource t2 = new org . jfree . chart . axis . StandardTickUnitSource ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ... | org . junit . Assert . assertTrue ( t1 . equals ( t2 ) ) |
checkNeoProperties ( ) { org . neo4j . graphdb . Node neoNode = org . neo4j . rest . graphdb . MatrixDatabaseTest . mdg . getNeoNode ( ) ; boolean isSetupCorrectly = false ; if ( ( neoNode . getProperty ( "age" ) . equals ( 29 ) ) && ( neoNode . getProperty ( "name" ) . equals ( "Thomas<sp>Anderson" ) ) ) { isSetupCorr... | org . junit . Assert . assertTrue ( isSetupCorrectly ) |
backhaulViolationAtAct2_shouldWork ( ) { buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore ( ) ; jsprit . core . reporting . SolutionPrinter . print ( vrp , solution , SolutionPrinter . Print . VERBOSE ) ; jsprit . core . analysis . SolutionAnalyser analyser = new jsprit . core . analysis . SolutionA... | org . junit . Assert . assertFalse ( violation ) |
shouldNotFindFieldDependencies ( ) { ch . jalu . injector . handlers . instantiation . Resolution < ch . jalu . injector . handlers . instantiation . StandardInjectionTest . NoFieldScanClass > injection = provider . safeGet ( ch . jalu . injector . handlers . instantiation . StandardInjectionTest . NoFieldScanClass . c... | org . junit . Assert . assertThat ( injection . getDependencies ( ) , org . hamcrest . Matchers . empty ( ) ) |
testMatchAnyCommunity ( ) { org . batfish . datamodel . routing_policy . expr . CommunityHalvesExpr expr = new org . batfish . datamodel . routing_policy . expr . CommunityHalvesExpr ( new org . batfish . datamodel . routing_policy . expr . LiteralCommunityHalf ( 1 ) , new org . batfish . datamodel . routing_policy . e... | org . junit . Assert . assertThat ( expr , matchAnyCommunity ( null , communityCandidates ) ) |
testNotfound ( ) { final ch . cyberduck . core . local . FileWatcher watcher = new ch . cyberduck . core . local . FileWatcher ( new ch . cyberduck . core . io . watchservice . FSEventWatchService ( ) ) ; final ch . cyberduck . core . Local file = new ch . cyberduck . core . Local ( ( ( java . lang . System . getProper... | org . junit . Assert . assertFalse ( file . exists ( ) ) |
test_permanent_block_limit_reached_10 ( ) { final net . ripe . db . whois . common . domain . BlockEvents blockEvents = net . ripe . db . whois . common . domain . BlockEventsTest . createBlockEvents ( prefix , 10 ) ; "<AssertPlaceHolder>" ; } isPermanentBlockRequired ( ) { return ( getTemporaryBlockCount ( ) ) >= ( ne... | org . junit . Assert . assertThat ( blockEvents . isPermanentBlockRequired ( ) , org . hamcrest . Matchers . is ( true ) ) |
test ( ) { java . lang . String test = DriverManagerDatabase . instance . get ( ) ; "<AssertPlaceHolder>" ; System . out . print ( test ) ; } get ( ) { java . sql . ResultSet rs = null ; java . sql . PreparedStatement statement = null ; java . sql . Connection connection = null ; java . lang . StringBuilder out = new j... | org . junit . Assert . assertTrue ( ( test != null ) ) |
testSelectFromCtas ( ) { java . util . HashSet < java . lang . String > expected = com . google . common . collect . Sets . newHashSet ( "Hello" , "World" , "!" ) ; java . util . HashSet < java . lang . String > actual = com . google . common . collect . Sets . newHashSet ( hiveShell . executeQuery ( "select<sp>a.s<sp>... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetBagSubSchemaConfigured ( ) { java . lang . System . setProperty ( HCatConstants . HCAT_PIG_INNER_TUPLE_NAME , "t" ) ; java . lang . System . setProperty ( HCatConstants . HCAT_PIG_INNER_FIELD_NAME , "FIELDNAME_tuple" ) ; org . apache . pig . impl . util . UDFContext . getUDFContext ( ) . setClientSystemProps ( j... | org . junit . Assert . assertEquals ( expected . toString ( ) , actual . toString ( ) ) |
testSetIndex ( ) { co . nubetech . hiho . mapreduce . lib . db . ColumnInfo cInfo = new co . nubetech . hiho . mapreduce . lib . db . ColumnInfo ( 1 , java . sql . Types . INTEGER , "name" ) ; cInfo . setIndex ( 2 ) ; "<AssertPlaceHolder>" ; } getIndex ( ) { return index ; } | org . junit . Assert . assertEquals ( 2 , cInfo . getIndex ( ) ) |
testMMul ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 1 , 2 , 3 } , new double [ ] { 4 , 5 , 6 } } ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double... | org . junit . Assert . assertEquals ( getFailureMessage ( ) , assertion , test ) |
testCEchoSuccess_KnownRemoteAE ( ) { long time ; org . dcm4chee . archive . echo . scu . CEchoSCPTool scpTool = new org . dcm4chee . archive . echo . scu . CEchoSCPTool ( org . dcm4chee . archive . echo . scu . CEchoSCUServiceTest . REMOTE_AET , "localhost" , org . dcm4chee . archive . echo . scu . CEchoSCUServiceTest ... | org . junit . Assert . assertTrue ( ( time >= 0 ) ) |
should_handle_isNew_onJsonNode ( ) { com . fasterxml . jackson . databind . ObjectMapper om = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; com . fasterxml . jackson . databind . node . ObjectNode onode = om . createObjectNode ( ) ; onode . put ( "_id" , "jsonNode_id" ) ; onode . put ( "otherField" , "o... | org . junit . Assert . assertTrue ( org . ektorp . util . Documents . isNew ( onode ) ) |
test_convertedTo_CurrencyUnit_BigDecimal_sameCurrencyCorrectFactor ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_33 . convertedTo ( org . joda . money . TestBigMoney . GBP , org . joda . money . TestBigMoney . bd ( "1.00000" ) ) ; "<AssertPlaceHolder>" ; } bd ( java . lang . Strin... | org . junit . Assert . assertEquals ( org . joda . money . TestBigMoney . GBP_2_33 , test ) |
shouldHaveSpecifiedReportFolder ( ) { java . io . File folder = new java . io . File ( "/foo" ) ; com . oracle . bedrock . testsupport . junit . JUnitReporter reporter = new com . oracle . bedrock . testsupport . junit . JUnitReporterTest . JUnitReporterStub ( folder ) ; "<AssertPlaceHolder>" ; } getReportFolder ( ) { ... | org . junit . Assert . assertThat ( reporter . getReportFolder ( ) , org . hamcrest . CoreMatchers . is ( folder ) ) |
testIsEC2_fromProperties_withEC2 ( ) { com . hazelcast . simulator . common . SimulatorProperties properties = com . hazelcast . simulator . utils . CloudProviderUtilsTest . getSimulatorProperties ( com . hazelcast . simulator . utils . CloudProviderUtils . PROVIDER_EC2 ) ; "<AssertPlaceHolder>" ; } isEC2 ( com . hazel... | org . junit . Assert . assertTrue ( com . hazelcast . simulator . utils . CloudProviderUtils . isEC2 ( properties ) ) |
testCopyTablesToLocal ( ) { org . apache . hadoop . mapreduce . TaskAttemptContext context = getTaskAttemptContext ( true , true , true ) ; ssTableColumnRecordReader . initialize ( inputSplit , context ) ; doCallRealMethod ( ) . when ( ssTableColumnRecordReader ) . copyTablesToLocal ( any ( org . apache . hadoop . fs .... | org . junit . Assert . assertEquals ( 2 , ssTableColumnRecordReader . getComponentSize ( ) ) |
testIndexOfLang294 ( ) { org . apache . commons . lang3 . text . StrBuilder sb = new org . apache . commons . lang3 . text . StrBuilder ( "onetwothree" ) ; sb . deleteFirst ( "three" ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . Object ) { long longLen = length ; if ( longLen > ( Integer . MAX_VALUE ) ) { throw... | org . junit . Assert . assertEquals ( ( - 1 ) , sb . indexOf ( "three" ) ) |
testGetTagsFromTermURL ( ) { final java . util . concurrent . ConcurrentHashMap < java . lang . String , net . yacy . cora . lod . vocabulary . Tagging > vocabularies = new java . util . concurrent . ConcurrentHashMap < java . lang . String , net . yacy . cora . lod . vocabulary . Tagging > ( ) ; final net . yacy . cor... | org . junit . Assert . assertEquals ( 0 , tags . size ( ) ) |
testComputeSize_withMarkupEnabled ( ) { button . setText ( "foo<sp>bar" ) ; org . eclipse . swt . graphics . Point textExtent = button . computeSize ( SWT . DEFAULT , SWT . DEFAULT ) ; button . setData ( RWT . MARKUP_ENABLED , Boolean . TRUE ) ; button . setText ( "<span>foo</span>" ) ; org . eclipse . swt . graphics .... | org . junit . Assert . assertTrue ( ( ( markupExtent . x ) < ( textExtent . x ) ) ) |
testAppendMultipleEvents ( ) { for ( int i = 0 ; i < 10 ; i ++ ) { ch . qos . logback . classic . spi . ILoggingEvent event = createLoggingEvent ( ) ; appender . append ( event ) ; } java . sql . Statement stmt = connectionSource . getConnection ( ) . createStatement ( ) ; java . sql . ResultSet rs = null ; rs = stmt .... | org . junit . Assert . assertEquals ( 10 , count ) |
testEqualsWithSameInstance ( ) { edu . illinois . library . cantaloupe . operation . ReductionFactor rf = new edu . illinois . library . cantaloupe . operation . ReductionFactor ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( rf , rf ) |
addItemCommy ( ) { ru . szhernovoy . start . Tracker track = new ru . szhernovoy . start . Tracker ( ) ; java . lang . String nameTask1 = "pervaja<sp>zajavka" ; java . lang . String [ ] answerForAdd = new java . lang . String [ ] { "0" , "pervaja<sp>zajavka" , "eto<sp>pervaja<sp>zajavka" , "y" } ; new ru . szhernovoy .... | org . junit . Assert . assertNotNull ( track . getCommentary ( listTask [ 0 ] ) ) |
shouldNotMatchAgainstTemplateThatDoesNotMatch ( ) { org . openqa . selenium . grid . web . UrlTemplate . Match match = new org . openqa . selenium . grid . web . UrlTemplate ( "/session/cake" ) . match ( "/i/like/peas" ) ; "<AssertPlaceHolder>" ; } match ( org . openqa . selenium . remote . http . HttpRequest ) { retur... | org . junit . Assert . assertNull ( match ) |
testArchiveSerializeApplicationVersion ( ) { underTest . setArchive ( true ) ; underTest . setMarshallerMap ( liveMarshallerMap ) ; org . dataconservancy . packaging . tool . ser . ApplicationVersionConverter applicationVersionConverter = spy ( new org . dataconservancy . packaging . tool . ser . ApplicationVersionConv... | org . junit . Assert . assertTrue ( ( ( result . size ( ) ) > 1 ) ) |
saveObs_shouldSetVoidReasonMessageToChangeMessage ( ) { java . lang . String changeMessage = "Testing<sp>TRUNK-3701" ; int obsId = 7 ; org . openmrs . api . ObsService obsService = org . openmrs . api . context . Context . getObsService ( ) ; org . openmrs . Obs obs = obsService . getObs ( obsId ) ; obs . setComment ( ... | org . junit . Assert . assertEquals ( changeMessage , obs . getVoidReason ( ) ) |
testGetServerContext ( ) { javax . net . ssl . SSLContext context = sslContextFactory . getServerContext ( ) ; "<AssertPlaceHolder>" ; } getServerContext ( ) { java . lang . String algorithm = java . security . Security . getProperty ( "ssl.KeyManagerFactory.algorithm" ) ; if ( algorithm == null ) { algorithm = "SunX50... | org . junit . Assert . assertNotNull ( context ) |
testLanguagePrioritiesTranslation_with_no_translation ( ) { java . util . Map < java . lang . String , java . lang . Double > languagePriorityMap = languagePriorityParser . parseToLanguagePriorityMap ( null ) ; "<AssertPlaceHolder>" ; } parseToLanguagePriorityMap ( java . lang . String ) { if ( org . springframework . ... | org . junit . Assert . assertThat ( languagePriorityMap . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) ) |
testAddAndCheck ( ) { int big = Integer . MAX_VALUE ; int bigNeg = Integer . MIN_VALUE ; "<AssertPlaceHolder>" ; try { org . apache . commons . math3 . util . ArithmeticUtils . addAndCheck ( big , 1 ) ; org . junit . Assert . fail ( "Expecting<sp>MathArithmeticException" ) ; } catch ( org . apache . commons . math3 . e... | org . junit . Assert . assertEquals ( big , org . apache . commons . math3 . util . ArithmeticUtils . addAndCheck ( big , 0 ) ) |
excludeInCaseOfProjectStageIntegrationTest ( ) { org . apache . deltaspike . test . core . api . exclude . StdBean stdBean = org . apache . deltaspike . core . api . provider . BeanProvider . getContextualReference ( org . apache . deltaspike . test . core . api . exclude . StdBean . class , true ) ; "<AssertPlaceHolde... | org . junit . Assert . assertNull ( stdBean ) |
testEquals ( ) { "<AssertPlaceHolder>" ; } equals ( java . util . Date , java . util . Date ) { return com . liferay . portal . kernel . util . DateUtil . equals ( date1 , date2 ) ; } | org . junit . Assert . assertEquals ( com . liferay . portal . kernel . util . DateUtil . equals ( null , new java . util . Date ( ) ) , com . liferay . portal . kernel . util . DateUtil . equals ( new java . util . Date ( ) , null ) ) |
testString ( ) { final java . lang . String a = "" ; final java . lang . String b = "Hello<sp>world" ; final long sizeA = org . jboss . libra . Libra . getDeepObjectSize ( a ) ; final long sizeB = org . jboss . libra . Libra . getDeepObjectSize ( b ) ; "<AssertPlaceHolder>" ; } getDeepObjectSize ( java . lang . Object ... | org . junit . Assert . assertTrue ( ( sizeB > sizeA ) ) |
minReducerReturnsNullInCaseOfEmptyList ( ) { io . datakernel . jmx . JmxReducerMin minReducer = new io . datakernel . jmx . JmxReducerMin ( ) ; java . util . List < java . lang . Number > numbers = new java . util . ArrayList ( ) ; "<AssertPlaceHolder>" ; } reduce ( io . datakernel . functional . BiFunction ) { return ... | org . junit . Assert . assertNull ( minReducer . reduce ( numbers ) ) |
vindPartijIdOpCodeGeenResultaat ( ) { when ( partijCache . geefPartij ( "000001" ) ) . thenReturn ( null ) ; final java . lang . Short id = service . vindPartijIdOpCode ( "000001" ) ; "<AssertPlaceHolder>" ; } vindPartijIdOpCode ( java . lang . String ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Par... | org . junit . Assert . assertThat ( null , org . hamcrest . core . Is . is ( id ) ) |
testArrayDeserialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . LocalDateTime . class , TimestampFormat . ARRAY , londonZoneId ) ; java . time . LocalDateTime dt = java . time . LocalDateTime . of ( 2011 , 11 , 10 , 9 , 8 , 7 , 1223 ) ; java . lang . String json = "[2011,<sp... | org . junit . Assert . assertEquals ( dt , genson . deserialize ( json , java . time . LocalDateTime . class ) ) |
testGetChildModules_noModuleType ( ) { when ( module1 . getModuleType ( ) ) . thenReturn ( null ) ; org . eclipse . wst . server . core . IModule [ ] childModules = delegate . getChildModules ( new org . eclipse . wst . server . core . IModule [ ] { module1 } ) ; "<AssertPlaceHolder>" ; } getChildModules ( org . eclips... | org . junit . Assert . assertEquals ( 0 , childModules . length ) |
testNameIsSet_null ( ) { fixture . setName ( ( ( java . lang . String ) ( null ) ) ) ; boolean result = fixture . nameIsSet ( ) ; "<AssertPlaceHolder>" ; } nameIsSet ( ) { return ( fName ) != null ; } | org . junit . Assert . assertFalse ( result ) |
testInsert ( ) { final com . yahoo . ycsb . Status result = db . insert ( com . yahoo . ycsb . db . elasticsearch5 . ElasticsearchIntegTestBase . MOCK_TABLE , "0" , com . yahoo . ycsb . db . elasticsearch5 . ElasticsearchIntegTestBase . MOCK_DATA ) ; "<AssertPlaceHolder>" ; } insert ( java . lang . String , java . lang... | org . junit . Assert . assertEquals ( Status . OK , result ) |
testIsRepeatable ( ) { org . netbeans . modules . gradle . actions . DefaultActionMapping instance = new org . netbeans . modules . gradle . actions . DefaultActionMapping ( ) ; "<AssertPlaceHolder>" ; } isRepeatable ( ) { return repeatableAction ; } | org . junit . Assert . assertTrue ( instance . isRepeatable ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.