input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
paymentDateCannotBePriorToLastPaymentDate ( ) { accountApplyPaymentActionForm . setLastPaymentDate ( new org . joda . time . DateTime ( ) . withDate ( 2010 , 10 , 13 ) . toDate ( ) ) ; org . apache . struts . action . ActionErrors actionErrors = accountApplyPaymentActionForm . validatePaymentDate ( "12/10/2010" , "acco... | org . junit . Assert . assertEquals ( 1 , actionErrors . size ( ) ) |
testParseArgsWithStringChoices ( ) { ap . addArgument ( "--foo" ) . choices ( "chocolate" , "icecream" , "froyo" ) ; net . sourceforge . argparse4j . inf . Namespace res = ap . parseArgs ( "--foo<sp>icecream" . split ( "<sp>" ) ) ; "<AssertPlaceHolder>" ; try { ap . parseArgs ( "--foo<sp>pudding" . split ( "<sp>" ) ) ;... | org . junit . Assert . assertEquals ( "icecream" , res . get ( "foo" ) ) |
video ( ) { java . lang . String para = "?signature=d919cc8a6361597afa536e906156262cc9cd93df×tamp=1433903433&nonce=518016546" ; xmlSb . delete ( 0 , xmlSb . length ( ) ) ; xmlSb . append ( "<xml>" ) ; xmlSb . append ( "<ToUserName><![CDATA[toUser]]></ToUserName>" ) ; xmlSb . append ( "<FromUserName><![CDATA[FromUs... | org . junit . Assert . assertNotNull ( response ) |
testWithClasses3 ( ) { java . lang . reflect . Type selectedType = new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . unit . hierarchy . discovery . event . Alpha < java . lang . Comparable < java . util . List < java . lang . String > > > > ( ) { } . getType ( ) ; java . lang . reflect . Type t... | org . junit . Assert . assertEquals ( new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . unit . hierarchy . discovery . event . Foxtrot < java . lang . String > > ( ) { } . getType ( ) , type ) |
should_save ( ) { com . ctp . cdi . query . test . domain . Simple simple = new com . ctp . cdi . query . test . domain . Simple ( "test" ) ; simple = dao . save ( simple ) ; "<AssertPlaceHolder>" ; } getId ( ) { if ( ( isEmpty ( id ) ) && ( ( getParent ( ) ) != null ) ) { return getParent ( ) . getId ( ) ; } return su... | org . junit . Assert . assertNotNull ( simple . getId ( ) ) |
processBytesFromPeerClientNext ( ) { java . nio . ByteBuffer transportBuffer = java . nio . ByteBuffer . allocate ( io . grpc . alts . internal . AltsTsiHandshakerTest . TRANSPORT_BUFFER_SIZE ) ; java . nio . ByteBuffer outputFrame = java . nio . ByteBuffer . allocate ( io . grpc . alts . internal . AltsTsiHandshakerTe... | org . junit . Assert . assertFalse ( handshakerClient . processBytesFromPeer ( transportBuffer ) ) |
testManualRead ( ) { if ( ! ( isGDALAvailable ) ) { return ; } final java . lang . String fileName = "small_world.img.vrt" ; it . geosolutions . resources . TestData . unzipFile ( this , "small-world.zip" ) ; final java . io . File file = it . geosolutions . resources . TestData . file ( this , fileName ) ; javax . ima... | org . junit . Assert . assertNotNull ( image ) |
extractPPTFile ( ) { java . nio . file . Path pdfFile = java . nio . file . Paths . get ( "./index/test_tables/filesource/specialfiles/test.ppt" ) ; java . lang . String file = edu . uci . ics . texera . dataflow . source . file . FileExtractorUtils . extractPPTFile ( pdfFile ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) {... | org . junit . Assert . assertTrue ( file . isEmpty ( ) ) |
testSpyExecutedDeleteStatements ( ) { io . sniffy . Spy spy = io . sniffy . Sniffy . spy ( ) ; executeStatement ( ) ; executeStatement ( Query . DELETE ) ; "<AssertPlaceHolder>" ; } executedStatements ( io . sniffy . Threads , io . sniffy . Query ) { checkOpened ( ) ; int count = 0 ; io . sniffy . sql . SqlStatement sq... | org . junit . Assert . assertEquals ( 1 , spy . executedStatements ( Threads . ANY , Query . DELETE ) ) |
getS3Endpoint ( ) { copierOptions . put ( S3S3CopierOptions . Keys . S3_ENDPOINT_URI . keyName ( ) , "http://s3.endpoint/" ) ; com . hotels . bdp . circustrain . s3s3copier . S3S3CopierOptions options = new com . hotels . bdp . circustrain . s3s3copier . S3S3CopierOptions ( copierOptions ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertThat ( options . getS3Endpoint ( ) , org . hamcrest . CoreMatchers . is ( java . net . URI . create ( "http://s3.endpoint/" ) ) ) |
simpleQueryWithoutBindingSetInvalidProperty ( ) { org . apache . rya . api . domain . StatementMetadata metadata = new org . apache . rya . api . domain . StatementMetadata ( ) ; metadata . addMetadata ( new org . apache . rya . api . domain . RyaIRI ( "http://createdBy" ) , new org . apache . rya . api . domain . RyaT... | org . junit . Assert . assertEquals ( 0 , bsList . size ( ) ) |
testBuildWithParametersAndDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . department . Department parent = new org . lnu . is . domain . department . Department ( ) ; org . lnu . is . domain . department . type . DepartmentType departmentType = new ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testExpireAndGetExpireMillis ( ) { final K key1 = keyFactory . instance ( ) ; V value1 = valueFactory . instance ( ) ; redisTemplate . boundValueOps ( key1 ) . set ( value1 ) ; redisTemplate . expire ( key1 , 10 , TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; org . springframework . data . redis . core . RedisTem... | org . junit . Assert . assertTrue ( ( ( redisTemplate . getExpire ( key1 , TimeUnit . MILLISECONDS ) ) > 0L ) ) |
yield_A$Function1 ( ) { com . m3 . scalaflavor4j . CollectionLike < java . lang . String > xs1 = com . m3 . scalaflavor4j . Seq . apply ( "a" , "b" ) ; com . m3 . scalaflavor4j . CollectionLike < java . lang . Integer > xs2 = com . m3 . scalaflavor4j . Seq . apply ( 1 , 2 , 3 , 4 , 5 ) ; com . m3 . scalaflavor4j . Coll... | org . junit . Assert . assertThat ( rs . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 20 ) ) ) |
testTimeout ( ) { org . axonframework . axonserver . connector . query . QueueBackedSpliterator < java . lang . String > queueBackedSpliterator = new org . axonframework . axonserver . connector . query . QueueBackedSpliterator ( 1000 , java . util . concurrent . TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; } tr... | org . junit . Assert . assertFalse ( queueBackedSpliterator . tryAdvance ( ( s ) -> System . out . println ( s ) ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . document . library . kernel . model . DLFileShortcut newDLFileShortcut = addDLFileShortcut ( ) ; com . liferay . document . library . kernel . model . DLFileShortcut existingDLFileShortcut = _persistence . findByPrimaryKey ( newDLFileShortcut . getPrimaryKey ( ) ) ; "<... | org . junit . Assert . assertEquals ( existingDLFileShortcut , newDLFileShortcut ) |
c3p0DsTest ( ) { cn . hutool . db . ds . DSFactory . setCurrentDSFactory ( new cn . hutool . db . ds . c3p0 . C3p0DSFactory ( ) ) ; javax . sql . DataSource ds = cn . hutool . db . ds . DSFactory . get ( "test" ) ; cn . hutool . db . Db db = cn . hutool . db . Db . use ( ds ) ; java . util . List < cn . hutool . db . E... | org . junit . Assert . assertTrue ( cn . hutool . core . collection . CollUtil . isNotEmpty ( all ) ) |
sumInteger ( ) { com . gs . collections . api . set . ImmutableSet < java . lang . Integer > objects = this . newSetWith ( 1 , 2 , 3 ) ; long actual = objects . sumOfInt ( ( integer ) -> integer ) ; "<AssertPlaceHolder>" ; } sumOfInt ( com . gs . collections . api . block . function . primitive . IntFunction ) { return... | org . junit . Assert . assertEquals ( 6 , actual ) |
testTooLargeDynamicTableSizeUpdate ( ) { hpackDecoder . setMaxHeaderTableSize ( 0 ) ; "<AssertPlaceHolder>" ; decode ( "21" ) ; } getMaxHeaderTableSize ( ) { return hpackDynamicTable . capacity ( ) ; } | org . junit . Assert . assertEquals ( 0 , hpackDecoder . getMaxHeaderTableSize ( ) ) |
testTrainC_ClassificationDataSet ( ) { System . out . println ( "trainC" ) ; jsat . classifiers . linear . kernelized . DUOL instance = new jsat . classifiers . linear . kernelized . DUOL ( new jsat . distributions . kernels . RBFKernel ( 0.5 ) ) ; jsat . classifiers . ClassificationDataSet train = jsat . FixedProblems... | org . junit . Assert . assertEquals ( 0 , cme . getErrorRate ( ) , 0.0 ) |
testQueueNoRemove ( ) { org . antlr . runtime . misc . FastQueue < java . lang . String > q = new org . antlr . runtime . misc . FastQueue < java . lang . String > ( ) ; q . add ( "a" ) ; q . add ( "b" ) ; q . add ( "c" ) ; q . add ( "d" ) ; q . add ( "e" ) ; java . lang . String expecting = "a<sp>b<sp>c<sp>d<sp>e" ; j... | org . junit . Assert . assertEquals ( expecting , found ) |
testCapitalizeWords12 ( ) { java . lang . Object s = null ; java . lang . String result = org . thymeleaf . util . StringUtils . capitalizeWords ( s ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( result , null ) |
testWithMap ( ) { final java . lang . String map = "map" ; final org . apache . oozie . fluentjob . api . action . PipesBuilder builder = new org . apache . oozie . fluentjob . api . action . PipesBuilder ( ) ; builder . withMap ( map ) ; final org . apache . oozie . fluentjob . api . action . Pipes pipes = builder . b... | org . junit . Assert . assertEquals ( map , pipes . getMap ( ) ) |
testAllOptions ( ) { org . apache . whirr . ClusterControllerFactory factory = mock ( org . apache . whirr . ClusterControllerFactory . class ) ; org . apache . whirr . ClusterController controller = mock ( org . apache . whirr . ClusterController . class ) ; when ( factory . create ( ( ( java . lang . String ) ( any (... | org . junit . Assert . assertThat ( rc , org . hamcrest . Matchers . is ( 0 ) ) |
testRoundTrip ( ) { org . sagebionetworks . repo . model . file . UploadDaemonStatus dto = new org . sagebionetworks . repo . model . file . UploadDaemonStatus ( ) ; dto . setRunTimeMS ( 10L ) ; dto . setErrorMessage ( "error" ) ; dto . setFileHandleId ( "123" ) ; dto . setDaemonId ( "456" ) ; dto . setPercentComplete ... | org . junit . Assert . assertEquals ( dto , clone ) |
getAutomorphismGroup_StartingPartitionTest ( ) { org . openscience . cdk . group . Partition partition = org . openscience . cdk . group . Partition . fromString ( "0,1|2,3" ) ; java . lang . String acpString = "C0C1C2C3<sp>0:1(1),0:3(1),1:2(1),2:3(1)" ; org . openscience . cdk . interfaces . IAtomContainer ac = org . ... | org . junit . Assert . assertEquals ( 2 , autG . order ( ) ) |
longHash_4Test ( ) { long hash = greycat . utility . HashHelper . longHash ( CoreConstants . END_OF_TIME , 10000 ) ; "<AssertPlaceHolder>" ; } longHash ( long , long ) { long hash = number % max ; return hash < 0 ? hash * ( - 1 ) : hash ; } | org . junit . Assert . assertTrue ( ( hash < 10000 ) ) |
equalsSelf ( ) { final com . lightboxtechnologies . nsrl . HashData hd = new com . lightboxtechnologies . nsrl . HashData ( com . lightboxtechnologies . nsrl . HashDataTest . sha1 , com . lightboxtechnologies . nsrl . HashDataTest . md5 , com . lightboxtechnologies . nsrl . HashDataTest . crc32 , com . lightboxtechnolo... | org . junit . Assert . assertTrue ( hd . equals ( hd ) ) |
testOkLeeg ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht blokkeringInfoAntwoord = new nl . bzk . migratiebrp . bericht . model . sync . impl . BlokkeringInfoAntwoordBericht ( ) ; blokkeringInfoAntwoord . setStatus ( StatusType . OK ) ; blokkeringInfoAntwoord . setPer... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testConfigureEnableGrouping ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIMySQLSink.configure]" ) ) + "--------<sp>enable_grouping<sp>can<sp>only<sp>be<sp>'true'<sp>or<sp>'false'" ) ) ; java . lang . String attrPersistence = null ; java . lang . String batchSize = null ; java . lang . String batchTime = n... | org . junit . Assert . assertTrue ( sink . getInvalidConfiguration ( ) ) |
databaseIs_operation_should_compare_all_Indexes ( ) { com . lordofthejars . nosqlunit . elasticsearch2 . ElasticsearchOperation elasticsearchOperation = new com . lordofthejars . nosqlunit . elasticsearch2 . ElasticsearchOperation ( client ) ; elasticsearchOperation . insert ( new java . io . ByteArrayInputStream ( com... | org . junit . Assert . assertThat ( isEqual , org . hamcrest . CoreMatchers . is ( true ) ) |
testSetProjectId ( ) { com . google . cloud . compute . deprecated . NetworkId networkId = com . google . cloud . compute . deprecated . NetworkId . of ( com . google . cloud . compute . deprecated . NetworkIdTest . PROJECT , com . google . cloud . compute . deprecated . NetworkIdTest . NETWORK ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertSame ( networkId , networkId . setProjectId ( com . google . cloud . compute . deprecated . NetworkIdTest . PROJECT ) ) |
testProcessURL ( ) { java . net . HttpURLConnection connection = createNiceMock ( java . net . HttpURLConnection . class ) ; org . apache . ambari . server . controller . internal . AppCookieManager appCookieManager = createNiceMock ( org . apache . ambari . server . controller . internal . AppCookieManager . class ) ;... | org . junit . Assert . assertEquals ( connection , urlStreamProvider . processURL ( "Header1" 1 , "GET" , ( ( java . lang . String ) ( null ) ) , headerMap ) ) |
testParsesArrayField ( ) { org . apache . beam . sdk . schemas . Schema schema = org . apache . beam . sdk . schemas . Schema . builder ( ) . addInt32Field ( "f_int32" ) . addArrayField ( "f_intArray" , FieldType . INT32 ) . build ( ) ; java . lang . String rowString = "{\n" + ( ( "\"f_int32\"<sp>:<sp>32,\n" + "\"f_int... | org . junit . Assert . assertEquals ( expectedRow , parsedRow ) |
testClone ( ) { when ( originalItem . getType ( ) ) . thenReturn ( "type" ) ; when ( originalItem . getName ( ) ) . thenReturn ( "name" ) ; when ( originalItem . getLabel ( ) ) . thenReturn ( "label" ) ; when ( originalItem . getCategory ( ) ) . thenReturn ( "category" ) ; when ( originalItem . getGroupNames ( ) ) . th... | org . junit . Assert . assertSame ( mockItem , res ) |
testReflection ( ) { io . netty . handler . ssl . SslHandler sslHandler = ( ( io . netty . handler . ssl . SslHandler ) ( factory . createSslHandler ( new io . netty . channel . socket . nio . NioSocketChannel ( ) ) ) ) ; try { java . lang . reflect . Field field = io . netty . handler . ssl . SslHandler . class . getD... | org . junit . Assert . assertEquals ( field . get ( sslHandler ) , 8192 ) |
factoryShouldReturnBasicNetwork ( ) { com . android . volley . toolbox . HttpStack httpStack = com . navercorp . volleyextensions . volleyer . factory . HttpStackFactory . createDefaultHttpStack ( ) ; com . android . volley . Network network = com . navercorp . volleyextensions . volleyer . factory . DefaultRequestQueu... | org . junit . Assert . assertEquals ( network . getClass ( ) , com . android . volley . toolbox . BasicNetwork . class ) |
testFromEbXMLNull ( ) { org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindFoldersQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindFoldersQuery ( ) ; transformer . fromEbXML ( result , null ) ; "<AssertPlaceHolder>" ; } fromEbXML ( org . openehe... | org . junit . Assert . assertEquals ( new org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindFoldersQuery ( ) , result ) |
linearTest ( ) { "<AssertPlaceHolder>" ; } isLinear ( ) { return true ; } | org . junit . Assert . assertFalse ( converter . isLinear ( ) ) |
testAutorisatieCache ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst dienst = nl . bzk . brp . domain . algemeen . AutAutUtil . zoekDienst ( nl . bzk . brp . domain . algemeen . TestAutorisaties . metSoortDienst ( SoortDienst . SELECTIE ) , SoortDienst . SELECTIE ) ; final nl . bzk . brp . dom... | org . junit . Assert . assertEquals ( autorisatiebundel . getToegangLeveringsautorisatie ( ) , autorisatiebundelUitCache . getToegangLeveringsautorisatie ( ) ) |
testAsErrorReplyWithToManyDocs ( ) { final com . allanbank . mongodb . bson . builder . DocumentBuilder db = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "ok" , 1 ) ; db . pushArray ( "n" ) ; final java . util . List < com . allanbank . mongodb . bson . Document > docs = java .... | org . junit . Assert . assertNotNull ( callback . asError ( reply ) ) |
removeAllStatements ( ) { org . wikidata . wdtk . datamodel . implementation . Set < java . lang . String > toRemove = new org . wikidata . wdtk . datamodel . implementation . HashSet ( ) ; toRemove . add ( statementIdA ) ; toRemove . add ( statementIdB ) ; org . wikidata . wdtk . datamodel . implementation . Map < jav... | org . junit . Assert . assertTrue ( removed . isEmpty ( ) ) |
checkReceivedMailContent_SubscriptionLine ( ) { org . oscm . ws . base . WebserviceTestBase . getMailReader ( ) . deleteMails ( ) ; createdSubscription = subscribe ( ) ; org . oscm . ws . SubscriptionServiceWSTest . subscrServiceForCustomer . reportIssue ( subscriptionID , mailSubjectToSend , mailContentToSend ) ; mail... | org . junit . Assert . assertNotNull ( mailContentReceived ) |
shouldReturnEndOfSingleCharacterString ( ) { int position = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . indexOfWordEnd ( "a" , 0 ) ; "<AssertPlaceHolder>" ; } indexOfWordEnd ( java . lang . String , int ) { checkNotNull ( entityName ) ; checkElementIndex ( startIndex , entityName . lengt... | org . junit . Assert . assertEquals ( 1 , position ) |
compileImportDateWithAlias ( ) { me . tomassetti . turin . compiler . TurinFile turinFile = new me . tomassetti . turin . parser . Parser ( ) . parse ( this . getClass ( ) . getResourceAsStream ( "/import_date_with_alias.to" ) ) ; java . lang . Compiler instance = new java . lang . Compiler ( getResolverFor ( turinFile... | org . junit . Assert . assertEquals ( 1 , classFileDefinitions . size ( ) ) |
testAllWithClass ( ) { java . lang . String h = "<p<sp>class=first>One<p<sp>class=first>Two<p>Three" ; leap . lang . jsoup . nodes . Document doc = leap . lang . jsoup . Jsoup . parse ( h ) ; leap . lang . jsoup . select . Elements ps = doc . select ( "*.first" ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . res... | org . junit . Assert . assertEquals ( 2 , ps . size ( ) ) |
testEscapeJavaRightShiftAtRightEdge ( ) { java . lang . String dir = getRandomDir ( ) ; writeFile ( dir , "a.st" , "a(x)<sp>::=<sp><<\\>>>" ) ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroupDir ( dir ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "a" ) ; st . add ( ... | org . junit . Assert . assertEquals ( expected , result ) |
testRemoveAll_virtual ( ) { shell . setSize ( 100 , 100 ) ; shell . setLayout ( new org . eclipse . swt . layout . FillLayout ( ) ) ; org . eclipse . swt . widgets . Table table = createTable ( ( ( org . eclipse . swt . SWT . MULTI ) | ( org . eclipse . swt . SWT . VIRTUAL ) ) , 1 ) ; table . addListener ( SWT . SetDat... | org . junit . Assert . assertEquals ( 0 , table . getItemCount ( ) ) |
handleWhiteboardCallback ( ) { org . apache . jackrabbit . oak . spi . security . authentication . callback . WhiteboardCallback cb = new org . apache . jackrabbit . oak . spi . security . authentication . callback . WhiteboardCallback ( ) ; callbackHandler . handle ( new javax . security . auth . callback . Callback [... | org . junit . Assert . assertSame ( whiteboard , cb . getWhiteboard ( ) ) |
testDecodeMultiClass ( ) { java . util . List < java . lang . String > encoded = java . util . Arrays . asList ( opennlp . tools . namefind . BioCodecTest . OTHER , opennlp . tools . namefind . BioCodecTest . A_START , opennlp . tools . namefind . BioCodecTest . A_CONTINUE , opennlp . tools . namefind . BioCodecTest . ... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testFindSQLExceptionNoMatch ( ) { java . lang . RuntimeException wrapped = new java . lang . RuntimeException ( new java . lang . RuntimeException ( "Just<sp>a<sp>runtime" ) ) ; java . sql . SQLException sqlException = org . sagebionetworks . repo . model . dbo . dao . table . TableExceptionTranslatorImpl . findSQLExce... | org . junit . Assert . assertEquals ( null , sqlException ) |
voteGetCurrentPollTest ( ) { int currentPollId = pollDao . getMostRecentPollId ( ) ; ru . org . linux . poll . Poll poll = pollDao . getMostRecentPoll ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( currentPollId , poll . getId ( ) ) |
testBatchDeleteCheckForData ( ) { int [ ] res ; java . util . List < com . ctrip . platform . dal . dao . unitbase . ClientTestModel > modelList = null ; try { res = dao . batchDelete ( new com . ctrip . platform . dal . dao . unittests . DalHints ( ) , modelList ) ; org . junit . Assert . fail ( ) ; } catch ( java . l... | org . junit . Assert . assertArrayEquals ( new int [ 0 ] , res ) |
Static_getFirstType_notFirst ( ) { com . psddev . dari . util . List < com . psddev . dari . util . HtmlMicrodata > microdatas = HtmlMicrodata . Static . parseDocument ( com . psddev . dari . util . HtmlMicrodataTest . testUrl , com . psddev . dari . util . HtmlMicrodataTest . getDocument ( "simple-content.html" ) ) ; ... | org . junit . Assert . assertEquals ( "http://schema.org/Recipe" , microdata . getFirstType ( ) ) |
shouldHaveEquivalentHashCodesForEquivalentSequences ( ) { com . redhat . darcy . ui . By . BySequence thingSequence = com . redhat . darcy . ui . By . sequence ( new com . redhat . darcy . ui . BySequenceTest . IdCounter ( "thing_" ) , 1 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return backingList ( ) . hashCode ( )... | org . junit . Assert . assertThat ( thingSequence . hashCode ( ) , org . hamcrest . Matchers . equalTo ( com . redhat . darcy . ui . By . sequence ( new com . redhat . darcy . ui . BySequenceTest . IdCounter ( "thing_" ) , 1 ) . hashCode ( ) ) ) |
testLiveBackingList1 ( ) { long [ ] a = new long [ ] { 9L , 8L } ; java . util . List < java . lang . Integer > l = org . osgi . util . converter . Converters . standardConverter ( ) . convert ( a ) . view ( ) . to ( new org . osgi . util . converter . TypeReference < java . util . List < java . lang . Integer > > ( ) ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 7 , 8 , 7 , 6 ) , l ) |
checkAbilityToStartServiceUsingNonLocalhostIP ( ) { service = new io . appium . java_client . service . local . AppiumServiceBuilder ( ) . withIPAddress ( io . appium . java_client . service . local . ServerBuilderTest . testIP ) . build ( ) ; service . start ( ) ; "<AssertPlaceHolder>" ; } isRunning ( ) { lock . lock ... | org . junit . Assert . assertTrue ( service . isRunning ( ) ) |
getColumnMetadataShouldHandle400Exception ( ) { solrColumnMetadataDao = spy ( new org . apache . metron . solr . dao . SolrColumnMetadataDao ( null ) ) ; org . apache . solr . common . SolrException solrException = new org . apache . solr . common . SolrException ( SolrException . ErrorCode . BAD_REQUEST , "solr<sp>exc... | org . junit . Assert . assertNotNull ( columnMetadata ) |
testOpenNewFileCompareEditor ( ) { editorReferences . add ( getMockFileCompareEditor ( ) ) ; item . setId ( "New<sp>File<sp>Item<sp>ID" ) ; org . eclipse . compare . CompareEditorInput newInput = org . eclipse . mylyn . internal . gerrit . ui . GerritCompareUi . getComparisonEditorInput ( editorReferences . toArray ( o... | org . junit . Assert . assertEquals ( newInput , fileItemEditorInput ) |
metricsPublisherUnrouted ( ) { com . rabbitmq . client . impl . StandardMetricsCollector metrics = new com . rabbitmq . client . impl . StandardMetricsCollector ( ) ; connectionFactory . setMetricsCollector ( metrics ) ; com . rabbitmq . client . Connection connection = null ; try { connection = connectionFactory . new... | org . junit . Assert . assertThat ( metrics . getPublishUnroutedMessages ( ) . getCount ( ) , org . hamcrest . Matchers . is ( 0L ) ) |
testDismissCache_removeIntRange ( ) { org . roaringbitmap . FastRankRoaringBitmap fast = prepareFastWithComputedCache ( ) ; fast . remove ( 0L , 2 ) ; "<AssertPlaceHolder>" ; } isCacheDismissed ( ) { return ! ( cumulatedCardinalitiesCacheIsValid ) ; } | org . junit . Assert . assertTrue ( fast . isCacheDismissed ( ) ) |
login_bad_credentials ( ) { oakbot . chat . Site site = new oakbot . chat . Site ( "domain.com" ) ; oakbot . util . Http http = new oakbot . util . Http ( new oakbot . chat . MockHttpClientBuilder ( ) . login ( "domain.com" , "0123456789abcdef0123456789abcdef" , "email@example.com" , "password" , false ) . build ( ) ) ... | org . junit . Assert . assertFalse ( site . login ( "email@example.com" , "password" , http ) ) |
testGetAvailablePaymentTypesFromSupplier_WithRelationNoPaymentTypes ( ) { addPaymentTypesToOrganizationRef ( supplierIds . get ( 0 ) , OrganizationRoleType . SUPPLIER ) ; container . login ( java . lang . String . valueOf ( supplier1User . getKey ( ) ) , org . oscm . accountservice . bean . ROLE_SERVICE_MANAGER ) ; jav... | org . junit . Assert . assertTrue ( actual . isEmpty ( ) ) |
testEmptyTextBoxesShouldReturnAnEmptyStringNotNull ( ) { org . openqa . selenium . qtwebkit . nativetests . WebElement emptyTextBox = driver . findElement ( org . openqa . selenium . qtwebkit . nativetests . By . id ( "emptyInput" ) ) ; "<AssertPlaceHolder>" ; } getText ( ) { return stb . getText ( ) ; } | org . junit . Assert . assertEquals ( emptyTextBox . getText ( ) , "" ) |
testSerdeScanResultValueNonCompactedList ( ) { java . lang . String serialized = org . apache . druid . query . scan . ScanResultValueTest . JSON_MAPPER . writeValueAsString ( org . apache . druid . query . scan . ScanResultValueTest . listSRV ) ; org . apache . druid . query . scan . ScanResultValue deserialized = org... | org . junit . Assert . assertEquals ( org . apache . druid . query . scan . ScanResultValueTest . listSRV , deserialized ) |
shouldReturnEmptyQueryOnEmptyListOfSunion ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "sunion" ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "key1" ) ; when ( localParamsMock . get ( "key1" ) ) . thenReturn ( "key2" ) ; when ( localParamsMock . getParameterNamesIterator ( ) ) . thenR... | org . junit . Assert . assertEquals ( 0 , terms . size ( ) ) |
count_booleans_arraylist_apachecommons ( ) { java . util . List < java . lang . Boolean > values = com . google . common . collect . Lists . newArrayList ( true , true , false , true , false ) ; int count = org . apache . commons . collections . CollectionUtils . countMatches ( values , new org . apache . commons . col... | org . junit . Assert . assertEquals ( 3 , count ) |
testSelect ( ) { final java . util . concurrent . atomic . AtomicLong counter = new java . util . concurrent . atomic . AtomicLong ( 0 ) ; select ( connection , org . github . lambatuples . SQLTest . SQL , ( java . sql . ResultSet rs , long cnt ) -> { counter . incrementAndGet ( ) ; } ) ; "<AssertPlaceHolder>" ; } sele... | org . junit . Assert . assertTrue ( ( ( counter . get ( ) ) > 0 ) ) |
setMeasurand_frequency_measurandIsSet ( ) { java . lang . String measurand = "Frequency" ; sampledValue . setMeasurand ( measurand ) ; "<AssertPlaceHolder>" ; } getMeasurand ( ) { return measurand ; } | org . junit . Assert . assertThat ( sampledValue . getMeasurand ( ) , org . hamcrest . CoreMatchers . equalTo ( measurand ) ) |
testConvertAllWithNoRelations ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; java . lang . Long id = 1L ; org . lnu . is . domain . specoffer . SpecOfferType source = new org . lnu . is . domain . specoffer . SpecOfferType ( ) ; source . setName ( name ) ; source . setAbbrNa... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
checkSettingExecutables ( ) { org . eclipse . ice . item . jobLauncher . SuiteLauncher launcher = new org . eclipse . ice . item . jobLauncher . SuiteLauncher ( null ) ; java . util . ArrayList < java . lang . String > execs = new java . util . ArrayList < java . lang . String > ( ) ; execs . add ( "conj_ht" ) ; execs ... | org . junit . Assert . assertEquals ( execs , execEntry . getAllowedValues ( ) ) |
testSelectNullElementValue ( ) { com . feilong . store . member . User zhangfei = new com . feilong . store . member . User ( "" , 23 ) ; com . feilong . store . member . User guanyu = new com . feilong . store . member . User ( "" , 30 ) ; com . feilong . store . member . User liubei = new com . feilong . store . memb... | org . junit . Assert . assertEquals ( emptyList ( ) , com . feilong . core . util . CollectionsUtil . select ( list , "name" , ( ( java . lang . String ) ( null ) ) ) ) |
createSfTestEmptyNameFail ( ) { org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sft . rev140701 . service . function . types . ServiceFunctionType sfType = new org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sft . rev140701 . service . function... | org . junit . Assert . assertFalse ( result ) |
shouldConvert ( ) { br . com . uol . pagseguro . api . utils . RequestMap expectedMap = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; expectedMap . putMap ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "extraAmount" , "10.00" ) ; put ( "paymentMode" , "paymen... | org . junit . Assert . assertEquals ( expectedMap , map ) |
testGetQueryStringRemovingParams ( ) { io . undertow . server . HttpServerExchange exchange = new io . undertow . server . HttpServerExchange ( ) ; exchange . setQueryString ( "a=1&b=2&c=3" ) ; exchange . addQueryParam ( "a" , "1" ) . addQueryParam ( "b" , "2" ) . addQueryParam ( "c" , "3" ) ; java . lang . String expR... | org . junit . Assert . assertEquals ( expResult , result ) |
testEdorg ( ) { org . slc . sli . domain . Entity edorg = helper . generateEdorgWithParent ( null ) ; "<AssertPlaceHolder>" ; } canAccess ( org . slc . sli . domain . Entity ) { return canAccess ( entity , true ) ; } | org . junit . Assert . assertTrue ( validator . canAccess ( edorg ) ) |
testWrongAnnotationEPL ( ) { java . lang . String EPL1 = "<sp>select<sp>*<sp>from<sp>TestEvent;<sp>" + ( "<sp>Select<sp>timemillis<sp>from<sp>TestEvent;<sp>" + "<sp>@testing(\"omc\")<sp>select<sp>*<sp>from<sp>TestEvent;<sp>" ) ; com . ebay . jetstream . event . processor . esper . EPL epl = new com . ebay . jetstream .... | org . junit . Assert . assertFalse ( proc . compileEPL ( epl ) ) |
testEncryptionDecryptionGFSBox ( ) { ch . bfh . unicrypt . crypto . schemes . encryption . classes . AESEncryptionScheme aes = ch . bfh . unicrypt . crypto . schemes . encryption . classes . AESEncryptionScheme . getInstance ( AESEncryptionScheme . KeyLength . KEY128 , AESEncryptionScheme . Mode . ECB , ch . bfh . unic... | org . junit . Assert . assertEquals ( encryptedMessage , expectedEncryption ) |
toVOCategory_noLocalization ( ) { org . oscm . domobjects . Category categoryWithoutLocalization = new org . oscm . domobjects . Category ( ) ; categoryWithoutLocalization . setMarketplace ( new org . oscm . domobjects . Marketplace ( ) ) ; org . oscm . internal . vo . VOCategory resultingTransferObject = org . oscm . ... | org . junit . Assert . assertNull ( resultingTransferObject . getName ( ) ) |
convertsNullToNull ( ) { com . sjl . dsl4xml . support . convert . IntegerStringConverter _c = new com . sjl . dsl4xml . support . convert . IntegerStringConverter ( ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { return ( aValue == null ) || ( "" . equals ( aValue ) ) ? 0 : new java . lang . Long ( aV... | org . junit . Assert . assertEquals ( null , _c . convert ( null ) ) |
testNewBroadcastComparison1 ( ) { org . nd4j . linalg . api . ndarray . INDArray initial = org . nd4j . linalg . factory . Nd4j . create ( 3 , 5 ) ; org . nd4j . linalg . api . ndarray . INDArray mask = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 5 , 4 , 3 , 2 , 1 } ) ; org . nd4j . linalg . api . ... | org . junit . Assert . assertEquals ( exp , initial . getRow ( i ) ) |
empty ( ) { com . jnape . palatable . lambda . iteration . PrependingIterator < java . lang . Integer > iterator = new com . jnape . palatable . lambda . iteration . PrependingIterator ( 0 , emptyIterator ( ) ) ; "<AssertPlaceHolder>" ; thrown . expect ( java . util . NoSuchElementException . class ) ; iterator . next ... | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
testGetUserManagerUnsupportedCallbackException ( ) { org . apache . jackrabbit . oak . spi . security . authentication . AbstractLoginModule loginModule = org . apache . jackrabbit . oak . spi . security . authentication . AbstractLoginModuleTest . initLoginModule ( org . apache . jackrabbit . oak . spi . security . au... | org . junit . Assert . assertNull ( loginModule . getUserManager ( ) ) |
testConvertDiscoveryEntryWithMetaInfoToDiscoveryEntry ( ) { boolean isLocal = true ; joynr . types . DiscoveryEntryWithMetaInfo discoveryEntry = new joynr . types . DiscoveryEntryWithMetaInfo ( new joynr . types . Version ( 42 , 23 ) , "testDomain" , "testInterfaceName" , "testParticipantId" , new joynr . types . Provi... | org . junit . Assert . assertTrue ( joynr . types . DiscoveryEntry . class . equals ( convertedEntry . getClass ( ) ) ) |
serializeRevenueShareDetails ( ) { org . oscm . billingservice . business . model . mpownershare . RevenueShareDetails revenueDetails = new org . oscm . billingservice . business . model . mpownershare . RevenueShareDetails ( ) ; java . lang . String xmlAsString = serialize ( revenueDetails ) ; System . out . println (... | org . junit . Assert . assertNull ( value ) |
testResolveIObjectFromJSON ( ) { info . smart_tools . smartactors . iobject . ifield_name . IFieldName fieldName = info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "info.smart_tools.smartactors.iobject.ifield_name.IFieldName" ... | org . junit . Assert . assertEquals ( "value" , object . getValue ( fieldName ) ) |
testDeletePrimaryIndexKey ( ) { insertKeys ( getHive ( ) ) ; org . hivedb . meta . directory . DbDirectory d = getDirectory ( ) ; for ( java . lang . String key : getPrimaryIndexOrResourceKeys ( ) ) { d . deletePrimaryIndexKey ( key ) ; "<AssertPlaceHolder>" ; } } getKeySemamphoresOfPrimaryIndexKey ( java . lang . Obje... | org . junit . Assert . assertEquals ( 0 , d . getKeySemamphoresOfPrimaryIndexKey ( key ) . size ( ) ) |
testValidateTagKey ( ) { org . finra . herd . model . api . xml . TagKey tagKey = new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) ; when ( alternateKeyHelper . validateStringParameter ( "tag<sp>type<sp>code" , org . finra . herd . service . helper . TAG_TYPE ) ) . thenReturn ( org . finra . ... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) , tagKey ) |
testToArray01 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; processor . defineBean ( "beans" , org . apache . el . stream . TestCollectionOperations . beans ) ; java . lang . Object result = processor . getValue ( "beans.stream().toArray()" , java . lang . Object . class ) ; java . lang ... | org . junit . Assert . assertArrayEquals ( expected , ( ( java . lang . Object [ ] ) ( result ) ) ) |
whenUsingTheSpyAnnotation_thenObjectIsSpied ( ) { aSpyList . add ( "one" ) ; aSpyList . add ( "two" ) ; org . mockito . Mockito . verify ( aSpyList ) . add ( "one" ) ; org . mockito . Mockito . verify ( aSpyList ) . add ( "two" ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , aSpyList . size ( ) ) |
indexGenAndQueryInsertOnB ( ) { com . google . appengine . api . datastore . Entity entity = new com . google . appengine . api . datastore . Entity ( "indexGen" ) ; entity . setProperty ( "text" , "B" ) ; getService ( ) . put ( entity ) ; waitForSync ( ) ; int count = getService ( ) . prepare ( new com . google . appe... | org . junit . Assert . assertEquals ( 3 , count ) |
withHelperRegistry ( ) { com . github . jknack . handlebars . HelperRegistry registry = createMock ( com . github . jknack . handlebars . HelperRegistry . class ) ; replay ( registry ) ; com . github . jknack . handlebars . Handlebars handlebars = new com . github . jknack . handlebars . Handlebars ( ) . with ( registr... | org . junit . Assert . assertNotNull ( handlebars ) |
changeParameter ( ) { final org . apache . hc . core5 . testing . framework . ClientTestingAdapter adapter = new org . apache . hc . core5 . testing . framework . ClassicTestClientTestingAdapter ( ) { @ org . apache . hc . core5 . testing . framework . Override public java . util . Map < java . lang . String , java . l... | org . junit . Assert . assertTrue ( query . containsKey ( "p1" ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Forums_Remove_Topic" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testProjectStructureWithDuplicateBundle ( ) { com . facebook . buck . core . model . BuildTarget libraryTarget = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( rootPath , "//foo:lib" ) ; com . facebook . buck . core . model . BuildTarget bundleTarget = com . facebook . buck . core . model . B... | org . junit . Assert . assertSame ( count , 1 ) |
testGetTimeZoneWhenTimeZoneIsNotSet ( ) { doReturn ( "" ) . when ( loader ) . getSystemPropertyTimeZone ( ) ; final java . util . TimeZone timeZone = mock ( java . util . TimeZone . class ) ; final int expectedOffset = 36000000 ; mockStatic ( java . util . TimeZone . class ) ; when ( java . util . TimeZone . getDefault... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( expectedOffset ) , getLoaderOffset ( ) ) |
testOffsetForFacetInstallerWithoutPrefix ( ) { net . roboconf . tooling . core . autocompletion . Couple couple = prepare ( "app2" , "edited2.graph" , 140 ) ; couple . text += "\nfacet<sp>myfacet<sp>{\n\tinstaller:<sp>" ; java . util . List < net . roboconf . tooling . core . autocompletion . ICompletionProposer . Robo... | org . junit . Assert . assertEquals ( 0 , proposals . size ( ) ) |
testUpdateLongField ( ) { com . jmethods . catatumbo . entities . LongField entity = new com . jmethods . catatumbo . entities . LongField ( ) ; entity . setDistanceFromEarth ( 9876543210L ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; entity . setDistanceFromEarth ( 987654321098... | org . junit . Assert . assertTrue ( ( ( entity . getDistanceFromEarth ( ) ) == 987654321098765L ) ) |
ensembleScoringTest_Audit_1 ( ) { org . apache . pig . impl . logicalLayer . schema . Schema inputSchema = buildAuditInputSchema ( ) ; org . apache . pig . data . Tuple inputTuple = tf . newTuple ( ) ; org . apache . pig . data . Tuple expected = tf . newTuple ( ) ; { inputTuple = this . buildAuditInputEvent ( 1038288L... | org . junit . Assert . assertEquals ( expected , observed ) |
encodeResponse ( ) { io . netty . channel . embedded . EmbeddedChannel channel = new io . netty . channel . embedded . EmbeddedChannel ( new org . apache . jackrabbit . oak . segment . standby . codec . GetReferencesResponseEncoder ( ) ) ; channel . writeOutbound ( new org . apache . jackrabbit . oak . segment . standb... | org . junit . Assert . assertEquals ( expected , buffer ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.