input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSearchCountByNameAndDescription2 ( ) { java . lang . String name = com . liferay . portal . kernel . util . StringUtil . randomString ( ) ; java . lang . String description = com . liferay . portal . kernel . util . StringUtil . randomString ( ) ; com . liferay . dynamic . data . mapping . model . DDMStructure stru... | org . junit . Assert . assertEquals ( 3 , count ) |
input_multiple ( ) { com . asakusafw . runtime . io . json . directio . AbstractJsonStreamFormatTest . MockFormat format = format ( 3 ) ; int [ ] [ ] data = new int [ ] [ ] { new int [ ] { 11 , 12 , 13 } , new int [ ] { 22 , 22 , 23 } , new int [ ] { 33 , 32 , 33 } } ; try ( com . asakusafw . runtime . io . ModelInput ... | org . junit . Assert . assertThat ( result , is ( data ) ) |
testWaitUntilExists ( ) { final java . lang . String path = "/test4" ; java . lang . Thread thread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ com . api6 . zkclient . Override public void run ( ) { try { java . lang . Thread . sleep ( ( 1000 * 3 ) ) ; zkClient . create ( path , "111" , CreateMode . ... | org . junit . Assert . assertTrue ( flag ) |
testMemberCount_13_02 ( ) { java . lang . String typeName = Fields . Inner . class . getName ( ) . replace ( '$' , '.' ) ; org . eclipse . xtext . common . types . JvmGenericType type = ( ( org . eclipse . xtext . common . types . JvmGenericType ) ( getTypeProvider ( ) . findTypeByName ( typeName , true ) ) ) ; "<Asser... | org . junit . Assert . assertNull ( type ) |
testFindByHash ( ) { java . util . List < org . kaaproject . kaa . server . common . nosql . cassandra . dao . model . CassandraEndpointConfiguration > configs = generateConfiguration ( 3 ) ; org . kaaproject . kaa . server . common . nosql . cassandra . dao . model . CassandraEndpointConfiguration expected = configs .... | org . junit . Assert . assertEquals ( expected , found ) |
testClientAreaIsZeroWithPadding ( ) { org . eclipse . swt . widgets . Composite scrollable = new org . eclipse . swt . widgets . Composite ( shell , org . eclipse . swt . SWT . BORDER ) { @ org . eclipse . swt . widgets . Override int getVScrollBarWidth ( ) { return 20 ; } @ org . eclipse . swt . widgets . Override int... | org . junit . Assert . assertEquals ( expected , scrollable . getClientArea ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . sync . model . SyncDevice newSyncDevice = addSyncDevice ( ) ; com . liferay . sync . model . SyncDevice existingSyncDevice = _persistence . fetchByPrimaryKey ( newSyncDevice . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ;... | org . junit . Assert . assertEquals ( existingSyncDevice , newSyncDevice ) |
createReferencesEmpty2 ( ) { java . util . GregorianCalendar cal = new java . util . GregorianCalendar ( 2014 , 10 , 22 , 11 , 30 , 0 ) ; cal . set ( GregorianCalendar . MILLISECOND , 999 ) ; java . time . Instant start = cal . getTime ( ) . toInstant ( ) ; org . diirt . util . time . TimeInterval timeInterval = org . ... | org . junit . Assert . assertThat ( references . size ( ) , equalTo ( 0 ) ) |
testAssetNameSad ( ) { org . sonatype . nexus . selector . Selector selector = buildSelector ( "asset.name<sp>=~<sp>'^jun.+'<sp>and<sp>asset.group<sp>=~<sp>'^jun.+'" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . sonatype . nexus . selector . VariableSource ) { return java . lang . Boolean . TRUE . equals ( expression ... | org . junit . Assert . assertFalse ( selector . evaluate ( source ) ) |
testWithTimestampDataLoader ( ) { eu . europa . esig . dss . client . tsp . OnlineTSPSource tspSource = new eu . europa . esig . dss . client . tsp . OnlineTSPSource ( "http://demo.sk.ee/tsa/" ) ; tspSource . setPolicyOid ( "0.4.0.2023.1.1" ) ; tspSource . setDataLoader ( new eu . europa . esig . dss . client . http . ... | org . junit . Assert . assertNotNull ( timeStampResponse ) |
whenWriteUsingByteSink_thenWritten ( ) { java . lang . String expectedValue = "Hello<sp>world" ; java . io . File file = new java . io . File ( "test.txt" ) ; com . github . mysite . common . guava . ByteSink sink = com . github . mysite . common . guava . Files . asByteSink ( file ) ; sink . write ( expectedValue . ge... | org . junit . Assert . assertEquals ( expectedValue , result ) |
testReset ( ) { action . reset ( ) ; "<AssertPlaceHolder>" ; } isExecuted ( ) { if ( ( executed ) == null ) { return de . rub . nds . tlsattacker . core . workflow . action . TlsAction . EXECUTED_DEFAULT ; } return executed ; } | org . junit . Assert . assertFalse ( action . isExecuted ( ) ) |
deletionValidationFail ( ) { org . candlepin . model . User user = new org . candlepin . model . User ( "guy" , "pass" ) ; org . candlepin . service . model . UserInfo created = this . service . createUser ( user ) ; this . service . deleteUser ( user . getUsername ( ) ) ; "<AssertPlaceHolder>" ; } validateUser ( java ... | org . junit . Assert . assertFalse ( this . service . validateUser ( "guy" , "pass" ) ) |
writeBean_hasSeveralBindings_singleEvent ( ) { binder . forField ( nameField ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . forField ( ageField ) . withConverter ( new com . vaadin . data . converter . StringToIntegerConverter ( "" ) ) . bind ( Person :: getAge , Person :: setAge ) ; binder . r... | org . junit . Assert . assertNull ( event . get ( ) ) |
testRequestWithWeekETagForPUTOrDELETEIfMatchAllowed ( ) { final org . apache . hc . core5 . http . HttpRequest req = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "PUT" , "http://example.com/" ) ; req . setHeader ( "If-Match" , "W/\"weak\"" ) ; impl = new org . apache . hc . client5 . http . impl ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( ) , impl . requestIsFatallyNonCompliant ( req ) ) |
testGenerateName_withTwoLength ( ) { final java . lang . String result = nameGenerator . generateName ( 2 ) ; "<AssertPlaceHolder>" ; } generateName ( int ) { if ( length < 2 ) { length = 2 ; } final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; final java . util . concurrent . ThreadLocalRando... | org . junit . Assert . assertEquals ( 2 , result . length ( ) ) |
testNullConversion ( ) { "<AssertPlaceHolder>" ; } convertToModel ( java . lang . Enum , java . lang . Class , java . util . Locale ) { if ( value == null ) { return null ; } return value . toString ( ) ; } | org . junit . Assert . assertEquals ( null , converter . convertToModel ( null , java . lang . Enum . class , null ) ) |
one_$parent_regex_expr_without_case_insensitive_returns_false ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field2.$parent.field1','regex':'Val.*'}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . red... | org . junit . Assert . assertFalse ( ctx . getResult ( ) ) |
testLookup ( ) { final ch . cyberduck . core . Cache < ch . cyberduck . core . transfer . TransferItem > c = new ch . cyberduck . core . ReverseLookupCache < ch . cyberduck . core . transfer . TransferItem > ( new ch . cyberduck . core . TransferItemCache ( 1 ) , 1 ) ; final ch . cyberduck . core . AttributedList < ch ... | org . junit . Assert . assertNotNull ( c . lookup ( reference ) ) |
testCreateComplexJobTriggerYearlyRecurrences ( ) { "<AssertPlaceHolder>" ; } createComplexJobTriggerYearlyRecurrences ( ) { return new org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . ComplexJobTrigger . YearlyRecurrences ( ) ; } | org . junit . Assert . assertNotNull ( factory . createComplexJobTriggerYearlyRecurrences ( ) ) |
testAnnotatedMockSingleton ( org . jukito . NoModuleTest$MyAnnotatedMockSingleton , org . jukito . NoModuleTest$MyAnnotatedMockSingleton ) { "<AssertPlaceHolder>" ; a . dummy ( ) ; verify ( a ) . dummy ( ) ; verify ( b ) . dummy ( ) ; } | org . junit . Assert . assertSame ( a , b ) |
testFastEntrySetEmptyIteratorRemove ( ) { final it . unimi . dsi . fastutil . objects . ObjectSet < it . unimi . dsi . fastutil . ints . Int2IntMap . Entry > entries = m . int2IntEntrySet ( ) ; org . junit . Assume . assumeTrue ( ( entries instanceof it . unimi . dsi . fastutil . ints . Int2IntMap . FastEntrySet ) ) ; ... | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
testRMDownRestoreForJobStatusBeforeGetAMReport ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . yarn . conf . YarnConfiguration ( ) ; conf . setInt ( MRJobConfig . MR_CLIENT_MAX_RETRIES , 3 ) ; conf . set ( MRConfig . FRAMEWORK_NAME , MRConfig . YARN_FRAMEWORK_NAME ) ; conf . setBoo... | org . junit . Assert . assertNotNull ( jobStatus ) |
testURLTitleIsNotUpdatedWhenUpdatingEntryTitle ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group , _user . getUserId ( ) ) ; com . liferay . blogs . model . BlogsEntry entry = com . lifera... | org . junit . Assert . assertEquals ( urlTitle , entry . getUrlTitle ( ) ) |
toOutputStreamImageFormatMatchesOutputFormatForPngWithBufferedImageInput ( ) { java . awt . image . BufferedImage img = new net . coobird . thumbnailator . builders . BufferedImageBuilder ( 200 , 200 ) . build ( ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; net . coobird . thu... | org . junit . Assert . assertEquals ( "png" , net . coobird . thumbnailator . TestUtils . getFormatName ( new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ) ) |
testXml ( ) { final org . esa . beam . visat . actions . masktools . MagicWandModel model = new org . esa . beam . visat . actions . masktools . MagicWandModel ( ) ; model . setTolerance ( 0.005 ) ; model . setMinTolerance ( 0.0 ) ; model . setMaxTolerance ( 0.01 ) ; model . setNormalize ( true ) ; model . setMode ( Ma... | org . junit . Assert . assertEquals ( model , modelCopy ) |
primaryShouldBeTrue ( ) { org . w3c . dom . Element itemElement = initialiseElement ( ) ; itemElement . setAttribute ( "primaryKey" , "true" ) ; org . schemaspy . input . dbms . xml . TableColumnMeta tableColumnMeta = new org . schemaspy . input . dbms . xml . TableColumnMeta ( itemElement ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( true , tableColumnMeta . isPrimary ( ) ) |
localizePriceModel_SaveWithNoOperation ( ) { org . oscm . domobjects . Subscription sub = givenSubscription ( ) ; originalLocalization = givenPriceModelLocalization ( null ) ; newLocalization = givenPriceModelLocalization ( "" ) ; localizeService ( sub , originalLocalization , newLocalization ) ; java . util . List < o... | org . junit . Assert . assertNull ( logEntries ) |
executeValidHttpRequest ( ) { byte [ ] inputData = new byte [ ] { 100 , 101 , 102 } ; org . kaaproject . kaa . client . transport . DesktopHttpClient client = new org . kaaproject . kaa . client . transport . DesktopHttpClient ( org . kaaproject . kaa . client . transport . DesktopHttpClientTest . URL , org . kaaprojec... | org . junit . Assert . assertArrayEquals ( inputData , body ) |
testSearchCount ( ) { int initialCount = com . liferay . dynamic . data . mapping . service . DDMStructureLocalServiceUtil . searchCount ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) , new long [ ] { group . getGroupId ( ) } , com . liferay . dynamic . data . mapping . service . t... | org . junit . Assert . assertEquals ( ( initialCount + 1 ) , count ) |
testGetByCode ( ) { try { net . magja . model . product . ProductAttribute pa = service . getByCode ( "description" ) ; "<AssertPlaceHolder>" ; } catch ( net . magja . service . ServiceException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } getId ( ) { return id ; } | org . junit . Assert . assertTrue ( ( ( pa . getId ( ) ) != null ) ) |
generateCertificateNameWithAllParameters ( ) { java . lang . String expectedName = ( ( ( ( loadBalancer . getAccountId ( ) ) + "_" ) + ( loadBalancer . getId ( ) ) ) + "_" ) + ( certMapping . getId ( ) ) ; java . lang . String generatedName = org . openstack . atlas . adapter . helpers . ZxtmNameBuilder . generateCerti... | org . junit . Assert . assertEquals ( expectedName , generatedName ) |
returnsAllFilesInDirectory ( ) { final java . util . List < java . io . File > files = com . amazonaws . codepipeline . jenkinsplugin . CompressionTools . addFilesToCompress ( testDir , null ) ; "<AssertPlaceHolder>" ; } addFilesToCompress ( java . nio . file . Path , hudson . model . BuildListener ) { final java . uti... | org . junit . Assert . assertEquals ( 5 , files . size ( ) ) |
testAddMember ( ) { org . apache . jackrabbit . api . security . user . User u = new org . apache . jackrabbit . oak . security . user . autosave . UserImpl ( getTestUser ( ) , autosaveMgr ) ; "<AssertPlaceHolder>" ; verify ( dlg , times ( 1 ) ) . addMember ( getTestUser ( ) ) ; verify ( autosaveMgr , times ( 1 ) ) . a... | org . junit . Assert . assertTrue ( group . addMember ( u ) ) |
test ( ) { "<AssertPlaceHolder>" ; } loadVisibilityManagement ( ) { java . util . Iterator < org . locationtech . geowave . adapter . vector . plugin . visibility . ColumnVisibilityManagementSpi > managers = new org . locationtech . geowave . core . index . SPIServiceRegistry ( org . locationtech . geowave . adapter . ... | org . junit . Assert . assertNotNull ( org . locationtech . geowave . adapter . vector . plugin . visibility . VisibilityManagementHelper . loadVisibilityManagement ( ) ) |
deveObterUFComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setUf ( DFUnidadeFederativa . SC ) ; ... | org . junit . Assert . assertEquals ( DFUnidadeFederativa . SC , retorno . getUf ( ) ) |
selectUnique ( ) { super . selectUnique ( ) ; org . eclipse . collections . api . bag . ImmutableBag < java . lang . String > bag = this . newBag ( ) ; org . eclipse . collections . api . set . ImmutableSet < java . lang . String > expected = Sets . immutable . empty ( ) ; org . eclipse . collections . api . set . Immu... | org . junit . Assert . assertEquals ( expected , actual ) |
testUnionFindStream ( ) { org . neo4j . graphdb . Result result = org . neo4j . graphalgo . algo . EmptyGraphIntegrationTest . db . execute ( ( ( "CALL<sp>algo.unionFind.stream('',<sp>'',{graph:'" + ( graphImpl ) ) + "'})" ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( offset ) < ( nodeCount ) ; } | org . junit . Assert . assertFalse ( result . hasNext ( ) ) |
testDefaultCluster ( ) { java . lang . String className = "testDefaultCluster" ; com . orientechnologies . orient . core . metadata . schema . OSchema schema = com . orientechnologies . orient . core . sql . executor . OAlterClassStatementExecutionTest . db . getMetadata ( ) . getSchema ( ) ; com . orientechnologies . ... | org . junit . Assert . assertEquals ( firstNonDefault , schema . getClass ( className ) . getDefaultClusterId ( ) ) |
testSet ( ) { java . util . regex . Matcher m = StatementImpl . SET_STATEMENT . matcher ( "set<sp>foo<sp>to<sp>1" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( m . matches ( ) ) |
testGetPatternFinderFunctionStringEListOfCharactersMappingCase1 ( ) { java . lang . String expectedResult = "TRANSLATE(name<sp>,<sp>\'abcdefghijklmnopqrstuvwxyzçâêîôûéèùïöüABCDEFGHIJKLMNOPQRSTUVWXYZÇÂÊÎÔÛÉÈÙÏÖÜ0123456789Netezza\'<sp>,<sp>\'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9999... | org . junit . Assert . assertEquals ( expectedResult , patternFinderFunction ) |
testWriteToFile ( ) { logger . warn ( "Test<sp>writeToFile<sp>.." ) ; java . lang . String fileDir = null ; java . lang . String filename = "evidence.txt" ; java . lang . Boolean deleteFile = false ; instance . writeToFile ( evidences , fileDir , filename , deleteFile ) ; java . lang . String userHome = java . lang . S... | org . junit . Assert . assertTrue ( file . isFile ( ) ) |
test ( ) { uk . me . rkd . jsipp . runtime . Scheduler sched = new uk . me . rkd . jsipp . runtime . Scheduler ( 50 ) ; uk . me . rkd . jsipp . compiler . Scenario uasScenario = uk . me . rkd . jsipp . compiler . Scenario . fromXMLFilename ( "resources/message-uas.xml" ) ; uk . me . rkd . jsipp . compiler . Scenario ua... | org . junit . Assert . assertTrue ( call . hasCompleted ( ) ) |
convertToDoubleNull ( ) { java . lang . Boolean t = null ; java . lang . Double d = converter . toDouble ( t ) ; "<AssertPlaceHolder>" ; } toDouble ( java . lang . Long ) { if ( value == null ) { return null ; } return value . doubleValue ( ) ; } | org . junit . Assert . assertNull ( d ) |
useTsConfigInsteadOfFileList_returnsTrue_ifPathToTsConfigSet ( ) { com . pablissimo . sonar . TsLintExecutorConfig config = getNewConfig ( ) ; config . setPathToTsConfig ( "My<sp>path" ) ; "<AssertPlaceHolder>" ; } useTsConfigInsteadOfFileList ( ) { return ( ( this . pathToTsConfig ) != null ) && ( ! ( this . pathToTsC... | org . junit . Assert . assertTrue ( config . useTsConfigInsteadOfFileList ( ) ) |
testInvalidCapacityZero ( ) { backingStore . close ( ) ; java . io . File checkpoint = backingStoreSupplier . getCheckpoint ( ) ; "<AssertPlaceHolder>" ; backingStore = new org . apache . flume . channel . file . EventQueueBackingStoreFileV2 ( checkpoint , 0 , "test" , new org . apache . flume . channel . file . instru... | org . junit . Assert . assertTrue ( checkpoint . delete ( ) ) |
writeEmptyComponent ( ) { java . io . StringWriter sw = new java . io . StringWriter ( ) ; biweekly . io . json . JCalRawWriter writer = new biweekly . io . json . JCalRawWriter ( sw , false ) ; writer . writeStartComponent ( "comp" ) ; writer . close ( ) ; java . lang . String actual = sw . toString ( ) ; java . lang ... | org . junit . Assert . assertEquals ( expected , actual ) |
add ( ) { final org . milyn . container . MockApplicationContext context = new org . milyn . container . MockApplicationContext ( ) ; final org . milyn . rules . RuleProviderAccessorTest . MockProvider provider = new org . milyn . rules . RuleProviderAccessorTest . MockProvider ( ) ; org . milyn . rules . RuleProviderA... | org . junit . Assert . assertNotNull ( org . milyn . rules . RuleProviderAccessor . getRuleProviders ( context ) ) |
equalityOfNodeTypeIds ( ) { org . eclipse . winery . common . ids . definitions . NodeTypeId id1 = new org . eclipse . winery . common . ids . definitions . NodeTypeId ( "ns1" , "id1" , false ) ; org . eclipse . winery . common . ids . definitions . NodeTypeId id2 = new org . eclipse . winery . common . ids . definitio... | org . junit . Assert . assertEquals ( id1 , id2 ) |
testTopIndex_ValueOutOfBounds ( ) { org . eclipse . swt . widgets . Table_Test . createTableItems ( table , 5 ) ; int previousTopIndex = table . getTopIndex ( ) ; table . setTopIndex ( 10000 ) ; "<AssertPlaceHolder>" ; } getTopIndex ( ) { checkWidget ( ) ; if ( ( topIndex ) == ( - 1 ) ) { updateScrollBars ( ) ; if ( vS... | org . junit . Assert . assertEquals ( previousTopIndex , table . getTopIndex ( ) ) |
testGetEmptyRestrictions ( ) { javax . jcr . Value [ ] vs = createEntry ( java . util . Collections . < org . apache . jackrabbit . oak . spi . security . authorization . restriction . Restriction > emptySet ( ) ) . getRestrictions ( AccessControlConstants . REP_GLOB ) ; "<AssertPlaceHolder>" ; } getRestrictions ( java... | org . junit . Assert . assertNull ( vs ) |
testMath340 ( ) { org . hipparchus . fraction . BigFraction fractionA = new org . hipparchus . fraction . BigFraction ( 0.00131 ) ; org . hipparchus . fraction . BigFraction fractionB = new org . hipparchus . fraction . BigFraction ( 0.37 ) . reciprocal ( ) ; org . hipparchus . fraction . BigFraction errorResult = frac... | org . junit . Assert . assertEquals ( correctResult , errorResult ) |
testMetadataPickedUp ( ) { try ( org . jboss . windup . graph . GraphContext context = contextFactory . create ( true ) ) { org . jboss . windup . exec . configuration . WindupConfiguration windupConfig = new org . jboss . windup . exec . configuration . WindupConfiguration ( ) ; windupConfig . setGraphContext ( contex... | org . junit . Assert . assertEquals ( 3 , org . jboss . windup . config . metadata . ExecutedProviders . getProviders ( ) . size ( ) ) |
testRunPipelineNotRunning ( ) { com . streamsets . datacollector . config . PipelineConfiguration pipelineConf = com . streamsets . datacollector . runner . MockStages . createPipelineConfigurationComplexSourceProcessorTarget ( ) ; com . streamsets . datacollector . main . RuntimeInfo runtimeInfo = org . mockito . Mock... | org . junit . Assert . assertNull ( updateInfo ) |
readerTurnsCorrectlyNotWellFormattedValueInDictionary_01 ( ) { java . lang . String inPath = ( com . itextpdf . kernel . pdf . PdfDictionaryTokenizerTest . sourceFolder ) + "documentWithMalformedNumberOnDictionary.pdf" ; java . lang . String EXPECTED = "-12." ; java . lang . String result = getItalicAngleValue ( inPath... | org . junit . Assert . assertEquals ( EXPECTED , result ) |
testGetByCode ( ) { char code1 = 's' ; char code2 = 'a' ; char code3 = 'b' ; org . oscarehr . common . model . ScheduleTemplateCode scheduleTempCode1 = new org . oscarehr . common . model . ScheduleTemplateCode ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( scheduleT... | org . junit . Assert . assertEquals ( expectedResult , result ) |
isEnabledReturnsFalseForFalseSetting ( ) { this . parameters . put ( "enabled" , "false" ) ; org . phenotips . configuration . RecordElement s = new org . phenotips . configuration . spi . UIXRecordElement ( this . uiExtension , this . recordSection ) ; "<AssertPlaceHolder>" ; } isEnabled ( ) { return this . enabled ; ... | org . junit . Assert . assertFalse ( s . isEnabled ( ) ) |
testThrowableCtor ( ) { java . lang . Throwable t = mock ( java . lang . Throwable . class ) ; exception = new org . pentaho . di . core . lifecycle . LifecycleException ( t , true ) ; "<AssertPlaceHolder>" ; } getCause ( ) { return cause ; } | org . junit . Assert . assertEquals ( t , exception . getCause ( ) ) |
shouldReportInitialStateAsPopulatingIfPopulationStartedButIncomplete ( ) { provider = newProvider ( ) ; org . neo4j . kernel . api . index . IndexPopulator populator = provider . getPopulator ( descriptor ( ) , samplingConfig ( ) ) ; populator . create ( ) ; org . neo4j . internal . kernel . api . InternalIndexState st... | org . junit . Assert . assertEquals ( InternalIndexState . POPULATING , state ) |
testUpdateBucketAllocationPercentage ( ) { com . intuit . wasabi . experimentobjects . Bucket bucket = mock ( com . intuit . wasabi . experimentobjects . Bucket . class , com . intuit . wasabi . repository . database . RETURNS_DEEP_STUBS ) ; when ( transaction . update ( anyString ( ) , org . mockito . Matchers . anyVa... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( bucket ) ) |
testNewPipeline ( ) { org . guvnor . ala . pipeline . PipelineConfig pipelineConfig = mock ( org . guvnor . ala . pipeline . PipelineConfig . class ) ; when ( pipelineService . newPipeline ( pipelineConfig ) ) . thenReturn ( org . guvnor . ala . services . backend . impl . PipelineServiceBackendImplTest . PIPELINE_NAME... | org . junit . Assert . assertEquals ( org . guvnor . ala . services . backend . impl . PipelineServiceBackendImplTest . PIPELINE_NAME , result ) |
getMessageFromReceiverLinkNotAuthenticating ( ) { final java . lang . String linkName = "linkName" ; final java . lang . String propertyKey = "status-code" ; final java . lang . Integer propertyValue = 200 ; final java . util . List < java . util . UUID > cbsCorrelationIdList = java . util . Collections . synchronizedL... | org . junit . Assert . assertEquals ( actualAmqpsMessage , mockAmqpsMessage ) |
testGetELResolver ( ) { replay ( resolver ) ; "<AssertPlaceHolder>" ; verify ( resolver ) ; } getELResolver ( ) { return this . resolver ; } | org . junit . Assert . assertEquals ( resolver , context . getELResolver ( ) ) |
testIndexReload ( ) { final com . orientechnologies . orient . core . record . impl . ODocument docToStore = propertyIndex . toStream ( ) ; final com . orientechnologies . orient . core . index . OPropertyIndexDefinition result = new com . orientechnologies . orient . core . index . OPropertyIndexDefinition ( ) ; resul... | org . junit . Assert . assertEquals ( result , propertyIndex ) |
getgid ( ) { "<AssertPlaceHolder>" ; } getgid ( ) { org . junit . Assert . assertEquals ( "Java<sp>posix<sp>did<sp>not<sp>return<sp>same<sp>value<sp>as<sp>native<sp>posix" , jnr . posix . IDTest . nativePosix . getgid ( ) , jnr . posix . IDTest . javaPosix . getgid ( ) ) ; } | org . junit . Assert . assertEquals ( "Java<sp>posix<sp>did<sp>not<sp>return<sp>same<sp>value<sp>as<sp>native<sp>posix" , jnr . posix . IDTest . nativePosix . getgid ( ) , jnr . posix . IDTest . javaPosix . getgid ( ) ) |
test ( ) { hivemall . sketch . bloom . BloomNotUDF udf = new hivemall . sketch . bloom . BloomNotUDF ( ) ; org . apache . hadoop . util . bloom . DynamicBloomFilter bf1 = hivemall . sketch . bloom . BloomNotUDFTest . createBloomFilter ( 1L , 10000 ) ; org . apache . hadoop . io . Text bf1str = hivemall . sketch . bloom... | org . junit . Assert . assertEquals ( bf1 . toString ( ) , actual . toString ( ) ) |
testEquals_instance ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; final net . ripe . db . whois . query . QueryParser that = ( ( net . ripe . db . whois . query . QueryParser ) ( o ... | org . junit . Assert . assertThat ( subject . equals ( subject ) , org . hamcrest . Matchers . is ( true ) ) |
editEventPrice_samePrice ( ) { org . oscm . domobjects . PricedEvent pricedEvent = new org . oscm . domobjects . PricedEvent ( ) ; pricedEvent . setEventPrice ( BigDecimal . TEN ) ; org . oscm . serviceprovisioningservice . auditlog . PriceModelAuditLogCollector_EditEventPricesTest . logCollector . editEventPrice ( org... | org . junit . Assert . assertTrue ( auditLogDataIsEmpty ( ) ) |
testUnification_EXACT_BinaryRelationWithTypes_SomeVarsHaveTypes_UnifierMatchesTypes ( ) { try ( grakn . core . server . session . TransactionOLTP tx = grakn . core . graql . reasoner . query . AtomicQueryUnificationIT . unificationWithTypesSession . transaction ( ) . read ( ) ) { grakn . core . graql . reasoner . query... | org . junit . Assert . assertTrue ( unifier . equals ( correctUnifier ) ) |
whenQueryingWithReasoningOff_explanationsAreEmpty ( ) { try ( grakn . core . server . session . TransactionOLTP tx = grakn . core . graql . reasoner . query . ExplanationIT . geoSession . transaction ( ) . read ( ) ) { java . lang . String queryString = "match<sp>$x<sp>isa<sp>city,<sp>has<sp>name<sp>$n;<sp>get;" ; graq... | org . junit . Assert . assertTrue ( ans . explanation ( ) . isEmpty ( ) ) |
testVerifyInactive ( ) { _user = com . liferay . portal . kernel . test . util . UserTestUtil . addUser ( ) ; com . liferay . portal . kernel . service . UserLocalServiceUtil . updateStatus ( _user . getUserId ( ) , WorkflowConstants . STATUS_INACTIVE , new com . liferay . portal . kernel . service . ServiceContext ( )... | org . junit . Assert . assertFalse ( com . liferay . portal . kernel . service . GroupLocalServiceUtil . isLiveGroupActive ( group ) ) |
getCompressionTypeTarGzFromMetadataSuccess ( ) { when ( obj . getKey ( ) ) . thenReturn ( ( ( ( ( "A" + ( java . io . File . separator ) ) + "File" ) + ( java . io . File . separator ) ) + "XK321K" ) ) ; when ( metadata . getContentType ( ) ) . thenReturn ( "application/gzip" ) ; final com . amazonaws . codepipeline . ... | org . junit . Assert . assertEquals ( CompressionType . TarGz , compressionType ) |
testAvgWithValidRangeWithNullCF ( ) { org . apache . hadoop . hbase . client . coprocessor . AggregationClient aClient = new org . apache . hadoop . hbase . client . coprocessor . AggregationClient ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . conf ) ; org . apache . hadoop . hbase . client . ... | org . junit . Assert . assertEquals ( null , avg ) |
lookupHashMismatch ( ) { com . facebook . buck . core . rulekey . RuleKey key = new com . facebook . buck . core . rulekey . RuleKey ( "aa" ) ; com . facebook . buck . core . sourcepath . SourcePath input = com . facebook . buck . core . sourcepath . FakeSourcePath . of ( "input.h" ) ; com . facebook . buck . core . bu... | org . junit . Assert . assertThat ( manifest . lookup ( fileHashCache , com . facebook . buck . core . build . engine . manifest . ManifestTest . RESOLVER , com . google . common . collect . ImmutableSet . of ( input ) ) , org . hamcrest . Matchers . equalTo ( java . util . Optional . empty ( ) ) ) |
testGetGroupId ( ) { org . owasp . dependencycheck . xml . pom . Model instance = new org . owasp . dependencycheck . xml . pom . Model ( ) ; instance . setGroupId ( "" ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getGroupId ( ) ; "<AssertPlaceHolder>" ; } getGroupId ( ) { return g... | org . junit . Assert . assertEquals ( expResult , result ) |
testEmptyAuthenticationMethodAttribute ( ) { final java . util . Map map = this . authentication . getAttributes ( ) ; when ( map . containsKey ( any ( java . lang . Object . class ) ) ) . thenReturn ( false ) ; final java . util . Collection c = this . authentication . getSatisfiedAuthenticationMethods ( ) ; "<AssertP... | org . junit . Assert . assertEquals ( c . size ( ) , 0 ) |
testStartNoTran ( ) { final javax . batch . operations . JobOperator mockJobOperator = mockery . mock ( javax . batch . operations . JobOperator . class ) ; final javax . transaction . TransactionManager mockTranMgr = mockery . mock ( javax . transaction . TransactionManager . class ) ; final long retMe = 1 ; mockery .... | org . junit . Assert . assertEquals ( retMe , buildJobOperator ( mockJobOperator , mockTranMgr ) . start ( null , null ) ) |
testIteratorFullyFannedOut ( ) { org . eclipse . jgit . revwalk . RevBlob a = tr . blob ( "a" ) ; org . eclipse . jgit . revwalk . RevBlob b = tr . blob ( "b" ) ; org . eclipse . jgit . revwalk . RevBlob data1 = tr . blob ( "data1" ) ; org . eclipse . jgit . revwalk . RevBlob data2 = tr . blob ( "data2" ) ; org . eclip... | org . junit . Assert . assertEquals ( 2 , org . eclipse . jgit . notes . NoteMapTest . count ( it ) ) |
testInsertRetrieveString ( ) { org . mongojack . mock . MockObject object = new org . mongojack . mock . MockObject ( ) ; object . string = "a<sp>string" ; coll . insert ( object ) ; org . mongojack . mock . MockObject result = coll . findOne ( ) ; "<AssertPlaceHolder>" ; } findOne ( ) { return findOne ( new org . bson... | org . junit . Assert . assertEquals ( object . string , result . string ) |
resolveSnapshotWhenSnapshotsEnabled ( ) { java . lang . System . setProperty ( "org.ops4j.pax.url.mvn.repositories" , "https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j-snapshots@snapshots" ) ; java . net . URL url = new java . net . URL ( "mvn:org.ops4j/master/2.0.1-SNAPSHOT/pom" ) ; url . openStr... | org . junit . Assert . assertThat ( artifact . exists ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testSearchDescBillingCode ( ) { java . lang . String serviceCode = "service001" ; java . lang . String region = "ON" ; org . oscarehr . common . model . BillingService billingService1 = createBillingServiceWithDesc ( "service001" , "ON" , "Service<sp>1<sp>description." 3 , "Service<sp>1<sp>description." ) ; org . oscar... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testUpdateEntity ( ) { handler . addRequest ( false , "><Value>Closed</Value></Field></Fields></Entity>" 0 , "/qcbin/rest/domains/domain/projects/project/defects/86" , 200 ) . expectXmlBody ( "<Entity<sp>Type=\"defect\"><Fields><Field<sp>Name=\"status\"><Value>Closed</Value></Field></Fields></Entity>" ) . content ( "en... | org . junit . Assert . assertEquals ( 86 , updated . getId ( ) ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . iobject . iobject . exception . DeleteValueException exception = new info . smart_tools . smartactors . iobject . iobject . exception . DeleteValueException ( str ) ; "<AssertPlaceHolder>" ; throw exception ; } getMessage ( ... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . resource . education . form . type . EducationFormTypeResource source = new org . lnu . is . resource . education . form . type . EducationFormTypeResource ( ) ; source . setId ( id ) ; source . setName (... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
closeAllEditors ( ) { new org . eclipse . reddeer . workbench . impl . editor . TextEditor ( ) ; requirement . fulfill ( ) ; try { new org . eclipse . reddeer . workbench . impl . editor . TextEditor ( ) ; org . junit . Assert . fail ( "All<sp>editors<sp>should<sp>be<sp>closed" ) ; } catch ( java . lang . Exception e )... | org . junit . Assert . assertTrue ( true ) |
testListenerIsSerializable ( ) { widget . addListener ( SWT . Dispose , new org . eclipse . swt . widgets . WidgetSerialization_Test . TestListener ( ) ) ; org . eclipse . swt . widgets . Widget deserializedWidget = serializeAndDeserialize ( widget ) ; org . eclipse . swt . widgets . Listener [ ] listeners = deserializ... | org . junit . Assert . assertEquals ( 1 , listeners . length ) |
firstCoversSecondValueMatch ( ) { com . fasterxml . jackson . databind . JsonNode node1 = new com . fasterxml . jackson . databind . node . TextNode ( "abc" ) ; com . fasterxml . jackson . databind . JsonNode node2 = new com . fasterxml . jackson . databind . node . TextNode ( "abc" ) ; boolean result = org . batfish .... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( true ) ) |
testDirtyPostInitialization ( ) { _routingProcess . initialize ( ) ; "<AssertPlaceHolder>" ; } isDirty ( ) { return ( ( ( ( ( ( ! ( _changeset . build ( ) . isEmpty ( ) ) ) || ( ! ( _queuedForRedistribution . isEmpty ( ) ) ) ) || ( ! ( _activatedGeneratedRoutes . isEmpty ( ) ) ) ) || ( ! ( _interAreaIncomingRoutes . va... | org . junit . Assert . assertTrue ( _routingProcess . isDirty ( ) ) |
testRead ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; baos . write ( aceis . read ( ) ) ; baos . write ( aceis . read ( ) ) ; baos . write ( aceis . read ( ) ) ; byte [ ] buf = new byte [ 2048 ] ; int read = - 1 ; while ( ( read = aceis . read ( buf ) ) != ( - 1 ) ) { baos ... | org . junit . Assert . assertArrayEquals ( getExpectedOutput ( ) , baos . toByteArray ( ) ) |
testWebServiceContextAppearsInTheSummary ( ) { java . net . URL url = new java . net . URL ( _url , "/api/jsonws" ) ; java . lang . String body = com . liferay . portal . kernel . util . StringUtil . read ( url . openStream ( ) ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return com . liferay . seg... | org . junit . Assert . assertTrue ( body , body . contains ( "test" ) ) |
testExceptionInExceptionHandler ( ) { getApplicationContext ( ) . setExceptionHandler ( exceptionHandler ) ; java . lang . RuntimeException exceptionInHandler = new java . lang . RuntimeException ( ) ; doThrow ( exceptionInHandler ) . when ( exceptionHandler ) . handleException ( any ( java . lang . Throwable . class )... | org . junit . Assert . assertSame ( exceptionInHandler , expected ) |
testEmptyJoin ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; org . apache . hadoop . fs . Path base = org . apache . hadoop . mapreduce . lib . join . TestJoinDatamerge . cluster . getFileSystem ( ) . makeQualified ( new org . apache . hadoop . fs . Path... | org . junit . Assert . assertTrue ( job . isSuccessful ( ) ) |
processOptionsName ( ) { org . apache . hadoop . fs . shell . find . Find find = new org . apache . hadoop . fs . shell . find . Find ( ) ; find . setConf ( org . apache . hadoop . fs . shell . find . TestFind . conf ) ; java . lang . String args = "path<sp>-name<sp>namemask" ; java . lang . String expected = "And(;Nam... | org . junit . Assert . assertEquals ( expected , expression . toString ( ) ) |
testComputeCount ( ) { com . clearspring . analytics . stream . cardinality . HyperLogLog hyperLogLog = new com . clearspring . analytics . stream . cardinality . HyperLogLog ( 16 ) ; hyperLogLog . offer ( 0 ) ; hyperLogLog . offer ( 1 ) ; hyperLogLog . offer ( 2 ) ; hyperLogLog . offer ( 3 ) ; hyperLogLog . offer ( 16... | org . junit . Assert . assertEquals ( 8 , hyperLogLog . cardinality ( ) ) |
testFactoryCreation ( ) { javax . xml . stream . XMLStreamReader reader = org . apache . cxf . staxutils . StaxUtils . createXMLStreamReader ( getTestStream ( "./resources/amazon.xml" ) ) ; "<AssertPlaceHolder>" ; } getTestStream ( java . lang . String ) { return getClass ( ) . getResourceAsStream ( resource ) ; } | org . junit . Assert . assertNotNull ( reader ) |
testHadoopCodecFactoryFail ( ) { org . apache . avro . file . CodecFactory hadoopSnappyCodec = org . apache . avro . hadoop . file . HadoopCodecFactory . fromHadoopString ( "org.apache.hadoop.io.compress.FooCodec" ) ; "<AssertPlaceHolder>" ; } fromHadoopString ( java . lang . String ) { org . apache . avro . file . Cod... | org . junit . Assert . assertTrue ( ( hadoopSnappyCodec == null ) ) |
should_count_with_attributes ( ) { com . ctp . cdi . query . test . domain . Simple simple = createSimple ( "testFindAll1" , java . lang . Integer . valueOf ( 55 ) ) ; createSimple ( "testFindAll2" , java . lang . Integer . valueOf ( 55 ) ) ; java . lang . Long result = dao . count ( simple , Simple_ . name , Simple_ .... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1 ) , result ) |
testValues_emptyTree ( ) { java . util . Collection values = tree . values ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return this . delegate . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( values . isEmpty ( ) ) |
testEmpty ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( empty ) |
canConstructAPersonWithAName ( ) { org . gradle . Person person = new org . gradle . Person ( "Larry" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return "objc" ; } | org . junit . Assert . assertEquals ( "Larry" , person . getName ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.