input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldKeepAnyPortFromHttpsUrl ( ) { java . lang . String url = "https://localhost:444/test" ; java . lang . String actual = org . codegist . crest . security . oauth . v1 . OAuthsV1 . constructRequestURL ( url ) ; "<AssertPlaceHolder>" ; } constructRequestURL ( java . lang . String ) { int index = url . indexOf ( '?' )... | org . junit . Assert . assertEquals ( url , actual ) |
testSerialize ( ) { java . util . Set < java . lang . String > m = createSet ( ) ; m . add ( "a" ) ; m . add ( "b" ) ; if ( m instanceof java . io . Serializable ) { byte [ ] data = org . ujmp . core . util . SerializationUtil . serialize ( ( ( java . io . Serializable ) ( m ) ) ) ; java . util . Set < java . lang . St... | org . junit . Assert . assertEquals ( getLabel ( ) , m , m2 ) |
createWikiFromTemplate ( ) { boolean result = mocker . getComponentUnderTest ( ) . createWikiFromTemplate ( "newWikiId" , "newWikiAlias" , "templateId" , "ownerId" , true ) ; "<AssertPlaceHolder>" ; verify ( wikiTemplateManager ) . createWikiFromTemplate ( "newWikiId" , "newWikiAlias" , "templateId" , "ownerId" , true ... | org . junit . Assert . assertTrue ( result ) |
testSerialization ( ) { org . jfree . chart . annotations . CategoryLineAnnotation a1 = new org . jfree . chart . annotations . CategoryLineAnnotation ( "Category<sp>1" , 1.0 , "Category<sp>2" , 2.0 , java . awt . Color . RED , new java . awt . BasicStroke ( 1.0F ) ) ; java . io . ByteArrayOutputStream buffer = new jav... | org . junit . Assert . assertEquals ( a1 , a2 ) |
testGetContent ( ) { java . lang . String expectedResponse = "crepecake\nis\ngood!" ; java . io . ByteArrayInputStream responseInputStream = new java . io . ByteArrayInputStream ( expectedResponse . getBytes ( StandardCharsets . UTF_8 ) ) ; org . mockito . Mockito . when ( httpResponseMock . getContent ( ) ) . thenRetu... | org . junit . Assert . assertEquals ( expectedResponse , new java . lang . String ( responseOutputStream . toByteArray ( ) , java . nio . charset . StandardCharsets . UTF_8 ) ) |
testFileUploadWithPOSTAndDownload ( ) { org . kurento . repository . RepositoryItem repositoryItem = getRepository ( ) . createRepositoryItem ( ) ; java . lang . String id = repositoryItem . getId ( ) ; java . io . File fileToUpload = new java . io . File ( "test-files/sample.txt" ) ; org . kurento . repository . Repos... | org . junit . Assert . assertTrue ( org . kurento . repository . test . util . TestUtils . equalFiles ( fileToUpload , downloadedFile ) ) |
serializeReplyWithJoynrChannelNotAssignableException ( ) { io . joynr . exceptions . JoynrChannelNotAssignableException error = new io . joynr . exceptions . JoynrChannelNotAssignableException ( "detail<sp>message:<sp>JoynrChannelNotAssignableException" , "CCID" ) ; joynr . Reply reply = new joynr . Reply ( java . util... | org . junit . Assert . assertEquals ( reply , receivedReply ) |
getClientIpFromRequest ( ) { configurationService . setProperty ( "useProxies" , true ) ; configurationService . setProperty ( "proxies.trusted.ipranges" , "127.0.0" ) ; clientInfoService = new org . dspace . service . impl . ClientInfoServiceImpl ( configurationService ) ; org . dspace . statistics . util . DummyHttpS... | org . junit . Assert . assertEquals ( "192.168.1.24" , clientInfoService . getClientIp ( req ) ) |
testLoadPropertiesFromFileSystemProperty ( ) { try { java . util . Properties properties = new java . util . Properties ( ) ; properties . put ( PropertyLoader . PropertyKey . DATA_SOURCE_UNIQUE_NAME . getKey ( ) , "jdbc/DS" ) ; java . io . File propertiesFile = com . vladmihalcea . flexypool . util . PropertiesTestUti... | org . junit . Assert . assertEquals ( "jdbc/DS" , propertyLoader . getUniqueName ( ) ) |
testRealGreater ( ) { executeWithDefaultScope ( "boolVar<sp>=<sp>2.1f<sp>><sp>2.0f" ) ; "<AssertPlaceHolder>" ; } getBoolValue ( ) { return context . getVariable ( "boolVar" ) . getValue ( ) ; } | org . junit . Assert . assertEquals ( true , getBoolValue ( ) ) |
shouldHaveATitle ( ) { final com . example . android . sampleapp . StarterActivity activity = new com . example . android . sampleapp . StarterActivity ( ) ; activity . onCreate ( null ) ; android . widget . TextView title = ( ( android . widget . TextView ) ( activity . findViewById ( R . id . title ) ) ) ; "<AssertPl... | org . junit . Assert . assertEquals ( "Hello<sp>World" , title . getText ( ) ) |
givenRecipientNameAndMessage_sendDirectMessage ( ) { java . lang . String msg = com . baeldung . Application . sendDirectMessage ( "YOUR_RECCIPIENT_ID" , tweet ) ; "<AssertPlaceHolder>" ; } sendDirectMessage ( java . lang . String , java . lang . String ) { twitter4j . Twitter twitter = com . baeldung . Application . g... | org . junit . Assert . assertEquals ( msg , tweet ) |
testWithOverwrite ( ) { at . favre . tools . apksigner . ui . Arg parsedArg = at . favre . tools . apksigner . ui . CLIParser . parse ( at . favre . tools . apksigner . ui . CLIParserTest . asArgArray ( ( ( "-" + ( CLIParser . ARG_APK_FILE ) ) + "./<sp>--overwrite" ) ) ) ; at . favre . tools . apksigner . ui . Arg expe... | org . junit . Assert . assertEquals ( expectedArg , parsedArg ) |
writeJson_register ( ) { biweekly . ICalendar ical = new biweekly . ICalendar ( ) ; ical . setProductId ( ( ( java . lang . String ) ( null ) ) ) ; ical . addProperty ( new biweekly . BiweeklyTest . TestProperty ( 1 ) ) ; ical . addComponent ( new biweekly . BiweeklyTest . Party ( ) ) ; java . lang . String expected = ... | org . junit . Assert . assertEquals ( expected , actual ) |
testKerbFileAccess ( ) { org . apache . flume . sink . hdfs . TestHDFSEventSink . LOG . debug ( "Starting<sp>testKerbFileAccess()<sp>..." ) ; final java . lang . String fileName = "FlumeData" ; final long rollCount = 5 ; final long batchSize = 2 ; java . lang . String newPath = ( testPath ) + "is<sp>nonexistent<sp>or<s... | org . junit . Assert . assertTrue ( expected . getMessage ( ) . contains ( "is<sp>nonexistent<sp>or<sp>can't<sp>read." ) ) |
testXMLSourceFactoryParse ( ) { org . jboss . forge . parser . xml . Node xmlNode = factory . parse ( "<test/>" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( "test" , xmlNode . getName ( ) ) |
testCreateRandomBoolean ( ) { final java . lang . Boolean result = net . sf . qualitytest . blueprint . Create . randomBoolean ( ) . createValue ( java . lang . Object . class , net . sf . qualitytest . blueprint . Blueprint . def ( ) , new net . sf . qualitytest . blueprint . BlueprintSession ( ) ) ; "<AssertPlaceHold... | org . junit . Assert . assertNotNull ( result ) |
testMarshall ( ) { org . jacorb . test . bugs . bug384 . TestObject serverObj = org . jacorb . test . bugs . bug384 . TestObjectHelper . narrow ( testObject ) ; org . jacorb . test . bugs . bug384 . A [ ] result = serverObj . testMarshall ( ) ; "<AssertPlaceHolder>" ; } testMarshall ( ) { org . jacorb . test . bugs . b... | org . junit . Assert . assertNotNull ( result ) |
testToBooleanArrayForNull ( ) { "<AssertPlaceHolder>" ; } toObjectArray ( boolean [ ] ) { if ( array == null ) { return null ; } if ( ( array . length ) == 0 ) { return cz . zcu . kiv . jop . util . ArrayUtils . EMPTY_BOOLEAN_OBJECT_ARRAY ; } java . lang . Boolean [ ] retArray = new java . lang . Boolean [ array . leng... | org . junit . Assert . assertNull ( cz . zcu . kiv . jop . util . ArrayUtils . toObjectArray ( ( ( boolean [ ] ) ( null ) ) ) ) |
testSetDate ( ) { java . util . Date newDate = org . dayatang . utils . DateUtils . parseDate ( "2008-05-11" ) ; instance . setDate ( "birthday" , newDate ) ; "<AssertPlaceHolder>" ; } getDate ( java . lang . String ) { return getDate ( key , ( ( java . util . Date ) ( null ) ) ) ; } | org . junit . Assert . assertEquals ( newDate , instance . getDate ( "birthday" ) ) |
toStringNoFamily ( ) { org . batfish . datamodel . vendor_family . VendorFamily family = new org . batfish . datamodel . vendor_family . VendorFamily ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return java . lang . String . join ( "<sp>" , java . util . stream . Stream . of ( _aws , _cisco , _cumulus , _f5Bigip , _j... | org . junit . Assert . assertThat ( family . toString ( ) , org . hamcrest . Matchers . equalTo ( "" ) ) |
whenCreatedFromMapWithImage_hasSpecifiedValue ( ) { oracle . kubernetes . operator . helm . HelmOperatorValues values = new oracle . kubernetes . operator . helm . HelmOperatorValues ( com . google . common . collect . ImmutableMap . of ( "image" , stringValue ) ) ; "<AssertPlaceHolder>" ; } getWeblogicOperatorImage ( ... | org . junit . Assert . assertThat ( values . getWeblogicOperatorImage ( ) , org . hamcrest . Matchers . equalTo ( stringValue ) ) |
testDuble ( ) { org . apache . avro . Schema . Type type = Schema . Type . DOUBLE ; org . apache . avro . Schema simple = org . apache . avro . SchemaBuilder . builder ( ) . doubleType ( ) ; org . apache . avro . Schema expected = primitive ( type , simple ) ; org . apache . avro . Schema built1 = org . apache . avro .... | org . junit . Assert . assertEquals ( expected , built1 ) |
encodeSignatureUsingBase64 ( ) { final byte [ ] sig = "foobar" . getBytes ( tests . unit . com . microsoft . azure . sdk . iot . device . auth . SignatureHelperTest . UTF8 ) ; byte [ ] testBase64Sig = com . microsoft . azure . sdk . iot . device . auth . SignatureHelper . encodeSignatureBase64 ( sig ) ; final byte [ ] ... | org . junit . Assert . assertThat ( testBase64Sig , org . hamcrest . CoreMatchers . is ( expectedBase64Sig ) ) |
testDeserializationException ( ) { BaseHandler . CONFIG_FILE = "/config/handler_config.json" ; handler . skipWriteStats = true ; java . util . List < com . nextdoor . bender . handler . BaseHandlerTest . DummyEvent > events = new java . util . ArrayList < com . nextdoor . bender . handler . BaseHandlerTest . DummyEvent... | org . junit . Assert . assertEquals ( 1 , proc . getErrorCountStat ( ) . getValue ( ) ) |
testIdentifiableSearch1 ( ) { org . hisp . dhis . query . Query query = org . hisp . dhis . query . Query . from ( schemaService . getDynamicSchema ( org . hisp . dhis . dataelement . DataElementGroup . class ) , Junction . Type . OR ) ; query . add ( org . hisp . dhis . query . Restrictions . eq ( "name" , "DataElemen... | org . junit . Assert . assertEquals ( 2 , objects . size ( ) ) |
testClosedOpenAscending ( ) { org . apache . commons . functor . range . FloatRange range = org . apache . commons . functor . range . Ranges . floatRange ( ( - 5.0F ) , BoundType . CLOSED , 5.0F , BoundType . OPEN , 3.0F ) ; java . util . List < java . lang . Float > expected = java . util . Arrays . asList ( ( - 5.0F... | org . junit . Assert . assertEquals ( expected , elements ) |
givenGroupIsEmpty_whenGetMostSpecificMatchSpecificity_thenReturnsAbsent ( ) { java . util . List < com . brandwatch . robots . matching . Matchable < java . lang . String > > group = com . google . common . collect . ImmutableList . of ( ) ; java . lang . String agent = "googlebot" ; com . google . common . base . Opti... | org . junit . Assert . assertThat ( longestMatch , org . hamcrest . Matchers . equalTo ( com . google . common . base . Optional . < java . lang . Double > absent ( ) ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . workflow . kaleo . model . KaleoTaskAssignmentInstance . class , _dynamicQueryClassLoader ) ; dy... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testGetServiceProperties ( ) { org . apache . ambari . server . controller . AmbariManagementController managementController = createNiceMock ( org . apache . ambari . server . controller . AmbariManagementController . class ) ; org . apache . ambari . server . controller . spi . Resource . Type type = Resource . Type ... | org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableSet . of ( expected ) , resources ) |
test27 ( ) { "<AssertPlaceHolder>" ; } getByLocale ( java . util . Locale ) { if ( locale == null ) { return null ; } java . lang . String language = locale . getLanguage ( ) ; if ( ( language == null ) || ( ( language . length ( ) ) == 0 ) ) { return com . neovisionaries . i18n . LanguageCode . undefined ; } return co... | org . junit . Assert . assertSame ( LanguageCode . undefined , com . neovisionaries . i18n . LanguageCode . getByLocale ( new java . util . Locale ( "" ) ) ) |
elementHasNoAttributes ( ) { goToUrlAndDontReloadIfAlreadyOpen ( "http://acama-systems.de/" ) ; com . abmash . api . HtmlElement element = com . abmash . test . TestAbmashCore . browser . query ( select ( "html<sp>><sp>body" ) ) . findFirst ( ) ; java . util . HashSet < java . lang . String > expctdAttributeNames = new... | org . junit . Assert . assertEquals ( expctdAttributeNames , actualAttributeNames ) |
testGetKeystoreInfo ( ) { org . codice . ddf . security . certificate . keystore . editor . KeystoreEditor keystoreEditor = new org . codice . ddf . security . certificate . keystore . editor . KeystoreEditor ( ) ; java . util . List < java . util . Map < java . lang . String , java . lang . Object > > keystore = keyst... | org . junit . Assert . assertThat ( keystore . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
testCommentToString ( ) { com . thoughtworks . qdox . model . JavaAnnotatedElement annotatedElement = mock ( com . thoughtworks . qdox . model . JavaAnnotatedElement . class ) ; when ( annotatedElement . getComment ( ) ) . thenReturn ( "Hello" ) ; java . lang . String expected = "" + ( ( "/**\n" + "<sp>*<sp>Hello\n" ) ... | org . junit . Assert . assertEquals ( expected , modelWriter . toString ( ) ) |
testGetIllegalArgument ( ) { final java . util . ArrayList < java . lang . Integer > lst = new java . util . ArrayList < java . lang . Integer > ( ) ; lst . add ( java . lang . Integer . valueOf ( 42 ) ) ; final net . sf . qualitycheck . exception . IllegalArgumentHolder < java . lang . Object > iah = new net . sf . qu... | org . junit . Assert . assertEquals ( lst , iah . getIllegalArgument ( ) ) |
testCreateTenantVDCEdgeDeviceProfile ( ) { boolean response = com . cloud . network . cisco . CiscoVnmcConnectionTest . connection . createTenantVDCEdgeDeviceProfile ( com . cloud . network . cisco . CiscoVnmcConnectionTest . tenantName ) ; "<AssertPlaceHolder>" ; } createTenantVDCEdgeDeviceProfile ( java . lang . Stri... | org . junit . Assert . assertTrue ( response ) |
shouldPrintUsageBecausePortOptionIsMissing ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "-f" , "dataset.xsd" , "-h" , "myHost" , "-c" , "TestCluster" } ; org . cassandraunit . cli . CassandraUnitCommandLineLoader . parseCommandLine ( args ) ; "<AssertPlaceHolder>" ; } isUsageBeenPrinted ( ) { re... | org . junit . Assert . assertThat ( org . cassandraunit . cli . CassandraUnitCommandLineLoader . isUsageBeenPrinted ( ) , org . hamcrest . Matchers . is ( true ) ) |
shouldSubscribe ( ) { repository . save ( person ) ; repository . async ( ) . findAll ( ) . subscribe ( repository :: exists ) ; "<AssertPlaceHolder>" ; } exists ( T extends com . github . jloisel . reactive . entity . api . ReactiveEntity ) { return exists ( entity . getId ( ) ) ; } | org . junit . Assert . assertTrue ( repository . exists ( person ) ) |
testUpdateEventCommentReply ( ) { io . restassured . RestAssured . given ( ) . pathParam ( "eventId" , "asdasd" ) . pathParam ( "commentId" , 33 ) . pathParam ( "replyId" , 78 ) . expect ( ) . statusCode ( HttpStatus . SC_BAD_REQUEST ) . when ( ) . put ( org . opencastproject . adminui . endpoint . AbstractEventEndpoin... | org . junit . Assert . assertEquals ( "Text" , reply . get ( "text" ) ) |
decode_values_with_gibberish_in_them ( ) { final java . lang . String data = "asfjdlkasjdflk" ; final java . util . Map < java . lang . String , java . lang . String > outMap = new java . util . HashMap < java . lang . String , java . lang . String > ( 1 ) ; ninja . utils . CookieDataCodec . decode ( outMap , data ) ; ... | org . junit . Assert . assertEquals ( 0 , outMap . size ( ) ) |
testLimitOrdered ( ) { com . orientechnologies . orient . core . sql . query . OSQLSynchQuery sql = new com . orientechnologies . orient . core . sql . query . OSQLSynchQuery ( "SELECT<sp>from<sp>alphabet<sp>ORDER<sp>BY<sp>letter<sp>LIMIT<sp>9" ) ; com . orientechnologies . orient . core . sql . List < com . orientechn... | org . junit . Assert . assertEquals ( 9 , results . size ( ) ) |
testTwofactsTwocashFlowMovement ( ) { sessionStatefull = util . KnowledgeSessionHelper . getStatefulKnowledgeSessionWithCallback ( droolscours . Testlesson2bis . kieContainer , "lesson2a-session" ) ; droolscours . util . OutputDisplay display = new droolscours . util . OutputDisplay ( ) ; sessionStatefull . setGlobal (... | org . junit . Assert . assertEquals ( a . getBalance ( ) , 1000 , 0 ) |
testCallableServiceShouldExitWhenTaskCompleted ( ) { expect ( taskMock . call ( ) ) . andReturn ( Boolean . TRUE ) ; onErrorMock . accept ( anyObject ( java . util . concurrent . TimeoutException . class ) ) ; expectLastCall ( ) . andThrow ( new java . lang . AssertionError ( "No<sp>error<sp>expected" ) ) . anyTimes ( ... | org . junit . Assert . assertEquals ( Boolean . TRUE , serviceResult ) |
testErrorInRebalancePartitionRevocation ( ) { java . lang . RuntimeException exception = new java . lang . RuntimeException ( "Revocation<sp>error" ) ; createTask ( initialState ) ; expectInitializeTask ( ) ; expectPollInitialAssignment ( ) ; expectRebalanceRevocationError ( exception ) ; org . powermock . api . easymo... | org . junit . Assert . assertEquals ( exception , e ) |
testCreateConsumer ( ) { try ( org . apache . qpid . jms . test . testpeer . TestAmqpPeer testPeer = new org . apache . qpid . jms . test . testpeer . TestAmqpPeer ( ) ) { javax . jms . JMSContext context = testFixture . createJMSContext ( testPeer ) ; testPeer . expectBegin ( ) ; testPeer . expectReceiverAttach ( ) ; ... | org . junit . Assert . assertNotNull ( consumer ) |
testStreamReferent ( ) { final java . util . Map < uk . gov . dstl . baleen . types . semantic . ReferenceTarget , uk . gov . dstl . baleen . types . semantic . Entity > referentMap = new java . util . HashMap ( ) ; referentMap . put ( chrisRT , chris ) ; referentMap . put ( londonRT , london ) ; final java . util . st... | org . junit . Assert . assertEquals ( 4 , stream . count ( ) ) |
testModel ( ) { io . swagger . models . Model actualModel = com . vmware . admiral . host . swagger . SwaggerDocumentationUtils . model ( AnnotatedServiceMock . AnnotatedServiceDocumentMock . class ) ; "<AssertPlaceHolder>" ; } model ( java . lang . Class ) { com . vmware . admiral . host . swagger . ApiModel annotatio... | org . junit . Assert . assertEquals ( model , actualModel ) |
testGetWidth ( ) { column . setWidth ( 100 ) ; "<AssertPlaceHolder>" ; } getWidth ( ) { checkWidget ( ) ; return width ; } | org . junit . Assert . assertEquals ( 100 , column . getWidth ( ) ) |
testTagsGet ( ) { org . wso2 . carbon . apimgt . rest . api . store . impl . TestUtil . printTestMethodName ( ) ; org . wso2 . carbon . apimgt . rest . api . store . impl . TagsApiServiceImpl tagsApiService = new org . wso2 . carbon . apimgt . rest . api . store . impl . TagsApiServiceImpl ( ) ; org . wso2 . carbon . a... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testGetWifiNetInterfaceAddressConfigsNoWifi ( ) { org . eclipse . kura . net . admin . NetworkAdminServiceImpl nasi = new org . eclipse . kura . net . admin . NetworkAdminServiceImpl ( ) ; java . util . List < org . eclipse . kura . net . NetInterfaceConfig < ? extends org . eclipse . kura . net . NetInterfaceAddressCo... | org . junit . Assert . assertNull ( result ) |
testResettingConversationID ( ) { fish . payara . notification . requesttracing . RequestTraceSpan re = new fish . payara . notification . requesttracing . RequestTraceSpan ( fish . payara . notification . requesttracing . EventType . TRACE_START , "Start" ) ; eventStore . storeEvent ( re ) ; for ( int i = 0 ; i < 10 ;... | org . junit . Assert . assertEquals ( newID , event . getTraceId ( ) ) |
testUploadQuestionGroup_ValidateForInvalidCountry ( ) { when ( requestContext . getMessageContext ( ) ) . thenReturn ( messageContext ) ; org . mifos . platform . questionnaire . ui . model . UploadQuestionGroupForm form = new org . mifos . platform . questionnaire . ui . model . UploadQuestionGroupForm ( ) ; form . se... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( "failure" ) ) |
testConsumerWithNoMessageCanCloseBeforeRollback ( ) { try ( org . apache . qpid . jms . test . testpeer . TestAmqpPeer testPeer = new org . apache . qpid . jms . test . testpeer . TestAmqpPeer ( ) ) { javax . jms . Connection connection = testFixture . establishConnecton ( testPeer ) ; connection . start ( ) ; testPeer... | org . junit . Assert . assertNull ( messageConsumer . receiveNoWait ( ) ) |
testDeleteIdsNoId ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . stmt . StatementExecutorTest . NoId , java . lang . Object > noIdDao = createDao ( com . j256 . ormlite . stmt . StatementExecutorTest . NoId . class , true ) ; com . j256 . ormlite . stmt . StatementExecutorTest . NoId noId = new com . j... | org . junit . Assert . assertEquals ( 1 , noIdDao . create ( noId ) ) |
composeBitmapOfZerosAndOnesWithBitmapOfOnes ( ) { com . googlecode . javaewah32 . EWAHCompressedBitmap32 bitmap1 = com . googlecode . javaewah32 . EWAHCompressedBitmap32 . bitmapOf ( ) ; bitmap1 . setSizeInBits ( com . googlecode . javaewah32 . EWAHCompressedBitmap32 . WORD_IN_BITS , false ) ; bitmap1 . setSizeInBits (... | org . junit . Assert . assertEquals ( bitmap1 , result ) |
test_loadProperties_oneFile ( ) { java . util . Properties p = com . alibaba . dubbo . common . utils . ConfigUtils . loadProperties ( "properties.load" , false ) ; java . util . Properties expected = new java . util . Properties ( ) ; expected . put ( "a" , "12" ) ; expected . put ( "b" , "34" ) ; expected . put ( "c"... | org . junit . Assert . assertEquals ( expected , p ) |
testPersistentShadowElement ( ) { org . zkoss . zats . mimic . DesktopAgent desktop = connect ( getTestURL ( "F80-ZK-2950.zul" ) ) ; org . zkoss . zats . mimic . ComponentAgent windowAgent = desktop . query ( "window" ) ; "<AssertPlaceHolder>" ; } getShadowSize ( org . zkoss . zats . mimic . ComponentAgent ) { java . u... | org . junit . Assert . assertEquals ( 1 , getShadowSize ( windowAgent ) ) |
parse_empty_2 ( ) { "<AssertPlaceHolder>" ; } parse ( byte [ ] ) { try { return parseAny ( bytes ) ; } catch ( org . codehaus . jackson . JsonParseException error ) { throw new com . psddev . dari . util . JsonParsingException ( "Can't<sp>parse<sp>JSON<sp>bytes!" , error ) ; } catch ( java . io . IOException error ) { ... | org . junit . Assert . assertEquals ( null , parser . parse ( "<sp>" ) ) |
selectNodesWithNS ( ) { org . xmlunit . xpath . XPathEngine e = getEngine ( ) ; source = org . xmlunit . builder . Input . fromString ( "<n:d<sp>xmlns:n='urn:test:1'><n:e/></n:d>" ) . build ( ) ; java . util . HashMap < java . lang . String , java . lang . String > m = new java . util . HashMap < java . lang . String ,... | org . junit . Assert . assertTrue ( it . iterator ( ) . hasNext ( ) ) |
testFindByAbnAndLabInfoId ( ) { java . util . List < org . oscarehr . common . model . LabTestResults > results = dao . findByAbnAndLabInfoId ( "A" , 100 ) ; "<AssertPlaceHolder>" ; } findByAbnAndLabInfoId ( java . lang . String , java . lang . Integer ) { javax . persistence . Query query = createQuery ( "r" , "r.abn<... | org . junit . Assert . assertNotNull ( results ) |
getIndexIdsShouldNotIncludeNegativeIds ( ) { array . put ( ( - 1 ) , array , "a" ) ; "<AssertPlaceHolder>" ; } getIndexIds ( ) { java . lang . Object [ ] ids = getIds ( ) ; java . util . List < java . lang . Integer > indices = new java . util . ArrayList < java . lang . Integer > ( ids . length ) ; for ( java . lang .... | org . junit . Assert . assertThat ( array . getIndexIds ( ) , org . hamcrest . core . Is . is ( new java . lang . Integer [ ] { } ) ) |
testCommsManagerLogging ( ) { org . societies . integration . test . bit . assessment . NominalTestCaseLowerTester . LOG . info ( "[#1870]<sp>testCommsManagerLogging()" ) ; org . societies . api . identity . IIdentity to = org . societies . integration . test . bit . assessment . NominalTestCaseLowerTester . identityMa... | org . junit . Assert . assertEquals ( ( num1 + 2 ) , num2 ) |
VerifyEMRProperties ( ) { org . apache . apex . malhar . lib . db . redshift . RedshiftJdbcTransactionalOperatorTest . RedshiftJdbcTransactionableTestOutputOperator operator = new org . apache . apex . malhar . lib . db . redshift . RedshiftJdbcTransactionalOperatorTest . RedshiftJdbcTransactionableTestOutputOperator (... | org . junit . Assert . assertNotNull ( operator . getEmrClusterId ( ) ) |
testDependencyOrderedStageCreate ( ) { org . apache . ambari . server . state . cluster . ClusterImpl cluster = mock ( org . apache . ambari . server . state . cluster . ClusterImpl . class ) ; when ( cluster . getCurrentStackVersion ( ) ) . thenReturn ( new org . apache . ambari . server . state . StackId ( "DATANODE"... | org . junit . Assert . assertEquals ( 1 , outStages . size ( ) ) |
testHasAppEngineFacet_withFacet ( ) { org . eclipse . wst . common . project . facet . core . IProjectFacet projectFacet = org . eclipse . wst . common . project . facet . core . ProjectFacetsManager . getProjectFacet ( AppEngineFlexWarFacet . ID ) ; when ( mockFacetedProject . hasProjectFacet ( projectFacet ) ) . then... | org . junit . Assert . assertTrue ( com . google . cloud . tools . eclipse . appengine . facets . AppEngineFlexWarFacet . hasFacet ( mockFacetedProject ) ) |
testApplyDelegate ( ) { de . rub . nds . tlsattacker . core . config . Config config = de . rub . nds . tlsattacker . core . config . Config . createConfig ( ) ; config . setDynamicWorkflow ( false ) ; args = new java . lang . String [ 1 ] ; args [ 0 ] = "-dynamic_workflow" ; jcommander . parse ( args ) ; delegate . ap... | org . junit . Assert . assertTrue ( config . isDynamicWorkflow ( ) ) |
testGetDeviceBy64BitAddrNoMatchingDevices ( ) { network . addRemoteDevice ( remoteDevice3 ) ; com . digi . xbee . api . RemoteXBeeDevice found = network . getDevice ( new com . digi . xbee . api . models . XBee64BitAddress ( "1234" ) ) ; "<AssertPlaceHolder>" ; } getDevice ( com . digi . xbee . api . models . XBee16Bit... | org . junit . Assert . assertNull ( found ) |
test_BrowserFunction_callback_with_String ( ) { org . junit . Assume . assumeFalse ( webkit1SkipMsg ( ) , isWebkit1 ) ; final java . util . concurrent . atomic . AtomicReference < java . lang . String > returnValue = new java . util . concurrent . atomic . AtomicReference ( ) ; class JavascriptCallback extends org . ec... | org . junit . Assert . assertTrue ( message , passed ) |
testMoney ( ) { java . sql . Connection con = org . postgresql . test . TestUtil . openDB ( ) ; java . sql . Statement st = con . createStatement ( ) ; java . sql . ResultSet rs = st . executeQuery ( "select<sp>cost<sp>from<sp>test_c" ) ; "<AssertPlaceHolder>" ; while ( rs . next ( ) ) { rs . getDouble ( 1 ) ; } rs . c... | org . junit . Assert . assertNotNull ( rs ) |
isAliveShouldReturnFalseIfItNotHoldsTheLock ( ) { initShouldNotCreateTheSchemaIfItAlreadyExists ( ) ; reset ( connection , metaData , statement , preparedStatement , resultSet ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connectio... | org . junit . Assert . assertFalse ( alive ) |
testLinkedList ( ) { org . simpleflatmapper . util . TypeReference < java . util . LinkedList < java . lang . String > > typeReference = new org . simpleflatmapper . util . TypeReference < java . util . LinkedList < java . lang . String > > ( ) { } ; "<AssertPlaceHolder>" ; } testGetterSetterOnList ( org . simpleflatma... | org . junit . Assert . assertTrue ( ( ( testGetterSetterOnList ( typeReference ) ) instanceof java . util . LinkedList ) ) |
getStorageUnitUploadCredential ( ) { org . finra . herd . model . api . xml . BusinessObjectDataKey businessObjectDataKey = new org . finra . herd . model . api . xml . BusinessObjectDataKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITION_VALUES... | org . junit . Assert . assertEquals ( storageUnitUploadCredential , result ) |
createIndexDoLookupBlankName ( ) { org . eol . globi . taxon . TaxonLookupServiceImpl taxonLookupServiceImpl = new org . eol . globi . taxon . TaxonLookupServiceImpl ( new org . apache . lucene . store . RAMDirectory ( ) ) ; taxonLookupServiceImpl . start ( ) ; taxonLookupServiceImpl . addTerm ( new org . eol . globi .... | org . junit . Assert . assertThat ( ids . length , org . hamcrest . core . Is . is ( 0 ) ) |
contains_none_returns_true_when_expression_values_not_in_array ( ) { com . redhat . lightblue . query . QueryExpression expr = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'array':'field6.nf5',<sp>'contains':'$none',<sp>'values':[1,2,3,4]}" ) ; com . redhat . lightblue . eval . QueryE... | org . junit . Assert . assertTrue ( context . getResult ( ) ) |
testNextBlock ( ) { org . apache . tajo . algebra . Expr context = org . apache . tajo . master . TestExecutionBlockCursor . analyzer . parse ( ( "select<sp>s_acctbal,<sp>s_name,<sp>n_name,<sp>p_partkey,<sp>p_mfgr,<sp>s_address,<sp>s_phone,<sp>s_comment,<sp>ps_supplycost,<sp>" + ( ( ( ( "r_name,<sp>p_type,<sp>p_size<sp... | org . junit . Assert . assertEquals ( 6 , count ) |
testMissingNewVersion ( ) { japicmp . maven . Parameter parameter = new japicmp . maven . Parameter ( ) ; parameter . setIgnoreMissingNewVersion ( "true" ) ; japicmp . maven . VersionChange vc = new japicmp . maven . VersionChange ( java . util . Collections . singletonList ( new japicmp . cmp . JApiCmpArchive ( new ja... | org . junit . Assert . assertThat ( vc . computeChangeType ( ) . get ( ) , org . hamcrest . core . Is . is ( SemanticVersion . ChangeType . UNCHANGED ) ) |
testMasterCoprocessorsReported ( ) { final java . lang . String loadedMasterCoprocessorsVerify = ( "[" + ( org . apache . hadoop . hbase . coprocessor . TestClassLoading . masterCoprocessor . getSimpleName ( ) ) ) + "]" ; java . lang . String loadedMasterCoprocessors = java . util . Arrays . toString ( org . apache . h... | org . junit . Assert . assertEquals ( loadedMasterCoprocessorsVerify , loadedMasterCoprocessors ) |
testFilterLT ( ) { io . katharsis . queryspec . QuerySpec spec = new io . katharsis . queryspec . QuerySpec ( io . katharsis . resource . mock . models . Task . class ) ; spec . addFilter ( new io . katharsis . queryspec . FilterSpec ( java . util . Arrays . asList ( "id" ) , FilterOperator . LT , 1L ) ) ; java . util ... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
testExonicFivePrimeOma1 ( ) { final java . lang . String outPath = runJannovarOnVCFLine ( "/sv_header.vcf" , "1\t59012403\t.\tN\t<INS>\t.\t.\tSVTYPE=INS;END=59012403" ) ; final java . lang . String expected = "1\t59012403\t.\tN\t<INS>\t.\t.\tEND=59012403;" + ( "SVANN=insertion&5_prime_UTR_exon_variant&structural_varian... | org . junit . Assert . assertEquals ( expected , actual ) |
test ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( strategy ) |
findByBigDecimalTest ( ) { java . util . List < cn . hutool . db . Entity > results = cn . hutool . db . CRUDTest . db . findAll ( cn . hutool . db . Entity . create ( "user" ) . set ( "age" , new java . math . BigDecimal ( "12" ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; } | org . junit . Assert . assertEquals ( 2 , results . size ( ) ) |
testSetSeed ( ) { System . out . println ( "setSeed" ) ; java . lang . Integer value = 1 ; edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . RFBuilder instance = new edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . RFBuilder ( "test.hex" ) ; java . lang . String expResult = "http://localh... | org . junit . Assert . assertEquals ( expResult , result ) |
executeShouldRetryUntilRetryHandlerReturnsFalseAndRethrowLastException ( ) { org . codegist . crest . io . RequestException requestException1 = mock ( org . codegist . crest . io . RequestException . class ) ; org . codegist . crest . io . RequestException requestException2 = mock ( org . codegist . crest . io . Reques... | org . junit . Assert . assertSame ( requestException2 , e ) |
testTopIndex_AdjustIfBigger ( ) { int visibleItems = 3 ; table . setSize ( 100 , ( visibleItems * ( table . getItemHeight ( ) ) ) ) ; org . eclipse . swt . widgets . Table_Test . createTableItems ( table , 20 ) ; table . setTopIndex ( 14 ) ; for ( int i = 10 ; i < 20 ; i ++ ) { table . getItem ( 10 ) . dispose ( ) ; } ... | org . junit . Assert . assertEquals ( ( itemCount - visibleItemCount ) , table . getTopIndex ( ) ) |
when_no_frames_should_have_no_animation ( ) { final net . mostlyoriginal . api . utils . Aseprite . AseFormat ase = createTestAse ( ) ; "<AssertPlaceHolder>" ; } fromAse ( java . lang . String , net . mostlyoriginal . api . utils . Aseprite$AseFormat , com . badlogic . gdx . graphics . Texture ) { if ( ! ( ase . durati... | org . junit . Assert . assertNull ( net . mostlyoriginal . api . utils . Aseprite . fromAse ( "test" , ase , mock ( com . badlogic . gdx . graphics . Texture . class ) ) . get ( "test" ) ) |
testHashCode ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCode landCode = new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCode ( nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCodeTest . STRING_1234 ) ; final nl . bzk . migratiebrp . conver... | org . junit . Assert . assertEquals ( landCode . hashCode ( ) , landCode2 . hashCode ( ) ) |
testAdd ( ) { final org . apache . rya . mongodb . MongoDBRyaDAO dao = new org . apache . rya . mongodb . MongoDBRyaDAO ( ) ; try { dao . setConf ( conf ) ; dao . init ( ) ; final org . apache . rya . api . domain . RyaStatement . RyaStatementBuilder builder = new org . apache . rya . api . domain . RyaStatement . RyaS... | org . junit . Assert . assertEquals ( coll . count ( ) , 1 ) |
theResourcesPerDayIsCalculatedCorrectlyIfTheStartIsInTheMiddleOfADay ( ) { givenStartDate ( org . libreplan . business . workingday . IntraDayDate . create ( new org . joda . time . LocalDate ( 2009 , 10 , 10 ) , org . libreplan . business . workingday . EffortDuration . hours ( 2 ) ) ) ; givenSpecificAllocations ( org... | org . junit . Assert . assertThat ( allocation . getResourcesPerDay ( ) , org . hamcrest . CoreMatchers . equalTo ( org . libreplan . business . workingday . ResourcesPerDay . amount ( 1 ) ) ) |
listNone ( ) { for ( java . lang . String user : ss . list ( ) ) { ss . delete ( user ) ; } "<AssertPlaceHolder>" ; } list ( ) { return credsManager . list ( ) ; } | org . junit . Assert . assertTrue ( ss . list ( ) . isEmpty ( ) ) |
testFindMultipleMidwife ( ) { int id1 = 101 ; int id2 = 202 ; int id3 = 303 ; java . lang . String midwife1 = "alpha" ; java . lang . String midwife2 = "bravo" ; org . oscarehr . common . model . DemographicCust demoCust1 = new org . oscarehr . common . model . DemographicCust ( ) ; org . oscarehr . common . dao . util... | org . junit . Assert . assertTrue ( true ) |
testSingleResult ( ) { org . hawkular . apm . server . api . task . ProcessingUnit < java . lang . String , java . lang . String > pu = new org . hawkular . apm . server . api . task . ProcessingUnit < java . lang . String , java . lang . String > ( ) ; org . hawkular . apm . server . api . task . Processor < java . la... | org . junit . Assert . assertEquals ( source , results ) |
testSalienceMinInteger ( ) { java . lang . String text = "package<sp>org.kie.test\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "global<sp>java.util.List<sp>list\n" + "<sp>);\n" 2 ) + "when\n" ) + "then\n" ) + "<sp>list.add(<sp>\"a\"<sp>);\n" ) + "<sp>);\n" 3 ) + "<sp>);\n" 0 ) + "rule<sp>b\n" ) + "<sp>salience<sp>(<sp>Inte... | org . junit . Assert . assertEquals ( "b" , list . get ( 2 ) ) |
testOnPlayerInteractGameModes ( ) { org . bukkit . event . player . PlayerInteractEvent event = new org . bukkit . event . player . PlayerInteractEvent ( who , org . bukkit . event . block . Action . RIGHT_CLICK_BLOCK , item , clickedBlock , org . bukkit . block . BlockFace . EAST ) ; for ( org . bukkit . GameMode gm :... | org . junit . Assert . assertFalse ( listener . onPlayerInteract ( event ) ) |
testCloning ( ) { com . flowpowered . math . vector . Vector3f vector = new com . flowpowered . math . vector . Vector3f ( 3 , 2 , 5 ) ; "<AssertPlaceHolder>" ; } clone ( ) { return new com . flowpowered . math . vector . Vector4l ( this ) ; } | org . junit . Assert . assertEquals ( vector , vector . clone ( ) ) |
testStringValueSort ( ) { org . openl . rules . helpers . StringValue [ ] strValueArray = new org . openl . rules . helpers . StringValue [ ] { null , new org . openl . rules . helpers . StringValue ( "asd" ) , new org . openl . rules . helpers . StringValue ( "ac" ) , null , null } ; org . openl . rules . helpers . St... | org . junit . Assert . assertArrayEquals ( expecteds , actuals ) |
testToShort ( ) { byte [ ] bytes = org . apache . hadoop . hbase . util . Bytes . toBytes ( 1 ) ; "<AssertPlaceHolder>" ; } toShort ( byte [ ] ) { return java . lang . Short . parseShort ( "6" ) ; } | org . junit . Assert . assertEquals ( org . apache . hadoop . hbase . util . Bytes . toShort ( bytes ) , util . toShort ( bytes ) ) |
checkClosingRegistrationTest ( ) { singletonServiceGroup . initialize ( ) ; verify ( mockEosService ) . registerCandidate ( org . opendaylight . mdsal . singleton . dom . impl . ClusterSingletonServiceGroupImplTest . MAIN_ENTITY ) ; singletonServiceGroup . registerService ( firstReg ) ; singletonServiceGroup . ownershi... | org . junit . Assert . assertNotNull ( singletonServiceGroup . unregisterService ( firstReg ) ) |
testAttach ( ) { try ( com . graphaware . module . timetree . proc . Transaction tx = getDatabase ( ) . beginTx ( ) ) { getDatabase ( ) . execute ( ( "CREATE<sp>(e:Event<sp>{id:<sp>123})<sp>" + ( "WITH<sp>e<sp>" + "CALL<sp>ga.timetree.events.attach({node:<sp>e,<sp>time:<sp>timestamp(),<sp>relationshipType:<sp>'OCCURED_... | org . junit . Assert . assertEquals ( instant . getProperty ( "value" ) , dayOfMonth ) |
useTemporaryFileNameCanBeCustomized ( ) { org . springframework . context . annotation . AnnotationConfigApplicationContext context = new org . springframework . context . annotation . AnnotationConfigApplicationContext ( ) ; org . springframework . boot . test . EnvironmentTestUtils . addEnvironment ( context , "useTe... | org . junit . Assert . assertFalse ( properties . isUseTemporaryFilename ( ) ) |
testGetLastApiUseTime ( ) { System . out . println ( "getLastApiUseTime" ) ; java . sql . Timestamp result = edu . harvard . iq . dataverse . authorization . users . AuthenticatedUserTest . testUser . getLastApiUseTime ( ) ; "<AssertPlaceHolder>" ; } getLastApiUseTime ( ) { return this . lastApiUseTime ; } | org . junit . Assert . assertEquals ( edu . harvard . iq . dataverse . authorization . users . AuthenticatedUserTest . testUser . getLastApiUseTime ( ) , result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.