input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
drawContextPushPopCountTest ( ) { context . pushCanvas ( page1 ) ; context . popCanvas ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return segments . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , context . size ( ) ) |
testGetRemotePartitionFilePaths ( ) { com . liveramp . hank . storage . cueball . CueballUpdatePlanner updatePlanner = new com . liveramp . hank . storage . cueball . CueballUpdatePlanner ( domain ) ; java . util . List < java . lang . String > paths = updatePlanner . getRemotePartitionFilePaths ( new com . liveramp . ... | org . junit . Assert . assertEquals ( expectedPaths , paths ) |
test_strings_var_sizes ( ) { for ( int i = 0 ; i < 50 ; i ++ ) { java . lang . String s = org . mapdb . elsa . ElsaSerializerBaseTest . randomString ( i ) ; "<AssertPlaceHolder>" ; } } clone ( E ) { return org . mapdb . elsa . ElsaSerializerBaseTest . clonePojo ( value ) ; } | org . junit . Assert . assertEquals ( s , org . mapdb . elsa . ElsaSerializerBaseTest . clone ( s ) ) |
packageNameSetNull ( ) { org . eclipse . bpmn2 . BaseElement baseElement = createBaseElement ( ) ; org . kie . workbench . common . stunner . bpmn . backend . converters . customproperties . CustomAttribute < java . lang . String > packageName = CustomAttribute . packageName . of ( baseElement ) ; packageName . set ( n... | org . junit . Assert . assertEquals ( null , packageName . get ( ) ) |
testEquals ( ) { org . jfree . data . time . Day day1 = new org . jfree . data . time . Day ( 29 , org . jfree . date . MonthConstants . MARCH , 2002 ) ; org . jfree . data . time . Hour hour1 = new org . jfree . data . time . Hour ( 15 , day1 ) ; org . jfree . data . time . Minute minute1 = new org . jfree . data . ti... | org . junit . Assert . assertTrue ( second1 . equals ( second2 ) ) |
testUnreachableRedis ( ) { com . streamsets . pipeline . stage . destination . redis . RedisTargetConfig conf = getDefaultConfig ( ) ; conf . uri = "redis://invalid:6379" ; com . streamsets . pipeline . api . Target target = new com . streamsets . pipeline . stage . destination . redis . RedisTarget ( conf ) ; com . st... | org . junit . Assert . assertFalse ( issues . isEmpty ( ) ) |
getBodyAsString_String ( ) { java . lang . String input = "{}" ; java . lang . String bodyAsString = com . oracle . bmc . http . internal . EntityFactory . getBodyAsString ( input ) ; "<AssertPlaceHolder>" ; } getBodyAsString ( java . lang . Object ) { try { return body instanceof java . lang . String ? ( ( java . lang... | org . junit . Assert . assertEquals ( input , bodyAsString ) |
shouldDecodeValidGetHeadResponses ( ) { java . lang . String recordId = "recordId" ; byte [ ] recordIdBytes = recordId . getBytes ( Charsets . UTF_8 ) ; io . netty . buffer . ByteBuf in = io . netty . buffer . Unpooled . buffer ( ) ; in . writeInt ( ( ( recordIdBytes . length ) + 1 ) ) ; in . writeByte ( Messages . HEA... | org . junit . Assert . assertEquals ( recordId , response . getHeadRecordId ( ) ) |
workWithFalse ( ) { final java . util . concurrent . BlockingQueue < java . lang . Object > values = new java . util . concurrent . LinkedBlockingQueue < java . lang . Object > ( ) ; socket = client ( ) ; socket . on ( Socket . EVENT_CONNECT , new com . github . nkzawa . emitter . Emitter . Listener ( ) { @ com . githu... | org . junit . Assert . assertThat ( ( ( java . lang . Boolean ) ( values . take ( ) ) ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testExpire ( ) { org . redisson . api . RMapCache < java . lang . String , java . lang . String > cache = redisson . getMapCache ( "simple" ) ; cache . put ( "0" , "8" , 1 , TimeUnit . SECONDS ) ; cache . expire ( 100 , TimeUnit . MILLISECONDS ) ; java . lang . Thread . sleep ( 500 ) ; "<AssertPlaceHolder>" ; cache . d... | org . junit . Assert . assertEquals ( 0 , cache . size ( ) ) |
build_shouldInitAuthorField ( ) { com . kiroule . example . springjpaunitils . domain . Book b = builder . author ( com . kiroule . example . springjpaunitils . domain . builder . BookBuilderTest . AUTHOR ) . build ( ) ; "<AssertPlaceHolder>" ; } getAuthor ( ) { return author ; } | org . junit . Assert . assertEquals ( com . kiroule . example . springjpaunitils . domain . builder . BookBuilderTest . AUTHOR , b . getAuthor ( ) ) |
testToArray ( ) { com . carrotsearch . hppc . KTypeArrayDeque < KType > l1 = com . carrotsearch . hppc . KTypeArrayDeque . from ( k1 , k2 , k3 ) ; java . lang . Object [ ] result = l1 . toArray ( ) ; "<AssertPlaceHolder>" ; } toArray ( ) { final int size = size ( ) ; return toArray ( com . carrotsearch . hppc . Intrins... | org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { k1 , k2 , k3 } , result ) |
getResultingSize1WithNonAspectFillAndDownscaling ( ) { final edu . illinois . library . cantaloupe . image . Dimension fullSize = new edu . illinois . library . cantaloupe . image . Dimension ( 600 , 400 ) ; final edu . illinois . library . cantaloupe . image . ScaleConstraint scaleConstraint = new edu . illinois . lib... | org . junit . Assert . assertEquals ( new edu . illinois . library . cantaloupe . image . Dimension ( 400 , 200 ) , instance . getResultingSize ( fullSize , scaleConstraint ) ) |
iterator ( ) { com . gs . collections . api . set . ImmutableSet < java . lang . Integer > objects = this . newSetWith ( 1 , 2 , 3 ) ; java . util . Iterator < java . lang . Integer > iterator = objects . iterator ( ) ; for ( int i = objects . size ( ) ; ( i -- ) > 0 ; ) { java . lang . Integer integer = iterator . nex... | org . junit . Assert . assertEquals ( 3 , ( ( integer . intValue ( ) ) + i ) ) |
shouldReturnBoundary ( ) { java . lang . String boundary = "myboundary" ; multipart = new com . navercorp . volleyextensions . volleyer . multipart . Multipart ( boundary ) ; java . lang . String result = multipart . getBoundary ( ) ; "<AssertPlaceHolder>" ; } getBoundary ( ) { return boundary ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( boundary ) ) |
getSasAuthProviderReturnsNull ( ) { tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig config = tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . newInstance ( tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig . class , mockIotHu... | org . junit . Assert . assertNull ( actualAuthProvider ) |
testToJson ( ) { com . redhat . lightblue . util . JsonObject instance = new com . redhat . lightblue . util . JsonObjectTest . JsonObjectImpl ( ) ; com . fasterxml . jackson . databind . JsonNode expResult = com . fasterxml . jackson . databind . node . NullNode . getInstance ( ) ; com . fasterxml . jackson . databind... | org . junit . Assert . assertEquals ( expResult , result ) |
testUnknownOperation ( ) { timely . netty . udp . UdpDecoder decoder = new timely . netty . udp . UdpDecoder ( ) ; java . util . List < java . lang . Object > results = new java . util . ArrayList < java . lang . Object > ( ) ; java . lang . String put = "version" ; io . netty . buffer . ByteBuf buf = io . netty . buff... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
createPRPA201301RequestWhenContolActProcessNull ( ) { java . lang . String localDeviceId = "1.1" ; gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201301Transforms transforms = new gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201301Transforms ( ) ; org . hl7 . v3 . PRPAIN201305UV02 request = new org . ... | org . junit . Assert . assertNull ( result . getControlActProcess ( ) ) |
testAggregatorsHandling ( ) { org . apache . giraph . conf . GiraphConfiguration conf = new org . apache . giraph . conf . GiraphConfiguration ( ) ; conf . setComputationClass ( org . apache . giraph . examples . AggregatorsTestComputation . class ) ; conf . setVertexInputFormatClass ( AggregatorsTestComputation . Simp... | org . junit . Assert . assertTrue ( job . run ( true ) ) |
size_norbornane ( ) { int [ ] [ ] norbornane = org . openscience . cdk . graph . InitialCyclesTest . norbornane ( ) ; org . openscience . cdk . graph . EdgeShortCycles esc = new org . openscience . cdk . graph . EdgeShortCycles ( norbornane ) ; int [ ] [ ] paths = esc . paths ( ) ; "<AssertPlaceHolder>" ; } paths ( ) {... | org . junit . Assert . assertThat ( paths . length , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testNoInstances ( ) { final java . util . List < org . apache . calcite . avatica . metrics . MetricsSystemFactory > factories = java . util . Collections . emptyList ( ) ; org . apache . calcite . avatica . metrics . MetricsSystemLoader loader = org . mockito . Mockito . mock ( org . apache . calcite . avatica . metri... | org . junit . Assert . assertEquals ( org . apache . calcite . avatica . metrics . noop . NoopMetricsSystem . getInstance ( ) , system ) |
testCacheEnabled ( ) { when ( globalSSMSettings . isDisableCache ( ) ) . thenReturn ( false ) ; cacheBase . afterPropertiesSet ( ) ; "<AssertPlaceHolder>" ; } isCacheDisabled ( ) { return ( ( cacheBase ) != null ) && ( cacheBase . isCacheDisabled ( ) ) ; } | org . junit . Assert . assertFalse ( cacheBase . isCacheDisabled ( ) ) |
asUnmodifiable ( ) { org . eclipse . collections . api . stack . primitive . MutableBooleanStack stack1 = new org . eclipse . collections . impl . stack . mutable . primitive . UnmodifiableBooleanStack ( org . eclipse . collections . impl . stack . mutable . primitive . BooleanArrayStack . newStackWith ( true , false ,... | org . junit . Assert . assertSame ( stack1 , stack1 . asUnmodifiable ( ) ) |
testUnsuccessfulRunner ( ) { software . amazon . kinesis . multilang . MultiLangDaemon . MultiLangRunner runner = new software . amazon . kinesis . multilang . MultiLangDaemon . MultiLangRunner ( scheduler ) ; doThrow ( software . amazon . kinesis . multilang . Exception . class ) . when ( scheduler ) . run ( ) ; int e... | org . junit . Assert . assertThat ( exit , org . hamcrest . Matchers . equalTo ( 1 ) ) |
importGraph2 ( ) { org . nd4j . autodiff . samediff . SameDiff graph = org . nd4j . imports . graphmapper . tf . TFGraphMapper . getInstance ( ) . importGraph ( new org . nd4j . linalg . io . ClassPathResource ( "tf_graphs/tensorflow_inception_graph.pb" ) . getInputStream ( ) ) ; "<AssertPlaceHolder>" ; } getInputStrea... | org . junit . Assert . assertNotNull ( graph ) |
testCreate_attrValue_empty ( ) { com . github . mygreen . supercsv . builder . FieldAccessor field = getFieldAccessor ( com . github . mygreen . supercsv . cellprocessor . constraint . LengthExactFactoryTest . ErrorCsv . class , "col_value_empty" , comparator ) ; com . github . mygreen . supercsv . builder . standard .... | org . junit . Assert . assertThat ( e ) |
testListEmptySequentialDatasets ( ) { try { when ( mockFTPClient . login ( "user" , "pssword" ) ) . thenReturn ( true ) ; when ( mockFTPClient . logout ( ) ) . thenReturn ( true ) ; when ( mockFTPClient . isConnected ( ) ) . thenReturn ( false ) ; when ( mockFTPClient . getReplyCode ( ) ) . thenReturn ( 200 ) ; when ( ... | org . junit . Assert . assertEquals ( 0 , files . size ( ) ) |
testGetSetParentAssetId ( ) { java . lang . String expectedParentAssetId = "testParentAssetId" ; com . microsoft . windowsazure . services . media . models . AssetFileInfo fileInfo = new com . microsoft . windowsazure . services . media . models . AssetFileInfo ( null , new com . microsoft . windowsazure . services . m... | org . junit . Assert . assertEquals ( expectedParentAssetId , actualParentAssetId ) |
testDoubleValue ( ) { java . lang . Double theDouble = new java . lang . Double ( 13 ) ; de . mirkosertic . bytecoder . core . PrimitivesTest . Container theContainer = new de . mirkosertic . bytecoder . core . PrimitivesTest . Container ( ) ; "<AssertPlaceHolder>" ; } doubleValue ( ) { return byteValue ; } | org . junit . Assert . assertEquals ( 13 , ( ( float ) ( theContainer . doubleValue . doubleValue ( ) ) ) , 0 ) |
container_null ( ) { ezvcard . io . json . JCardSerializerTest . Container container = new ezvcard . io . json . JCardSerializerTest . Container ( null ) ; java . io . StringWriter result = new java . io . StringWriter ( ) ; mapper . writeValue ( result , container ) ; java . lang . String actual = result . toString ( ... | org . junit . Assert . assertEquals ( expected , actual ) |
testMapByIntLong ( ) { com . ctrip . hermes . utils . Map < java . lang . Integer , java . lang . Long > map = new com . ctrip . hermes . utils . HashMap ( ) ; for ( int i = 0 ; i < ( com . ctrip . hermes . utils . HermesPrimitiveCodecTest . dataSize ) ; i ++ ) { map . put ( i , ( ( ( long ) ( i ) ) * i ) ) ; } io . ne... | org . junit . Assert . assertEquals ( map , result ) |
testGetItemCount ( ) { createItems ( folder , 3 ) ; "<AssertPlaceHolder>" ; } getItemCount ( ) { checkWidget ( ) ; return hasChildren ? getItemData ( ) . getChildren ( ) . size ( ) : 0 ; } | org . junit . Assert . assertEquals ( 3 , folder . getItemCount ( ) ) |
shouldEqualAbstentionToZeroValue ( ) { final de . thm . arsnova . model . migration . v2 . AnswerOption p1 = new de . thm . arsnova . model . migration . v2 . AnswerOption ( ) ; p1 . setText ( "Yes" ) ; p1 . setCorrect ( true ) ; p1 . setValue ( 10 ) ; final de . thm . arsnova . model . migration . v2 . AnswerOption p2... | org . junit . Assert . assertEquals ( 0 , q . calculateValue ( answer ) ) |
getFunctionApp ( ) { doReturn ( null ) . when ( mojoSpy ) . getAzureClient ( ) ; "<AssertPlaceHolder>" ; } getFunctionApp ( ) { try { return getAzureClient ( ) . appServices ( ) . functionApps ( ) . getByResourceGroup ( getResourceGroup ( ) , getAppName ( ) ) ; } catch ( com . microsoft . azure . maven . auth . AzureAu... | org . junit . Assert . assertNull ( mojoSpy . getFunctionApp ( ) ) |
runTestImplicitFlow1 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "ImplicitFlows/ImplicitFlow1.apk" , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
testStopAfterError ( ) { org . apache . hadoop . yarn . server . nodemanager . DeletionService delSrvc = mock ( org . apache . hadoop . yarn . server . nodemanager . DeletionService . class ) ; org . apache . hadoop . yarn . server . nodemanager . LocalDirsHandlerService mockedDirSvc = mock ( org . apache . hadoop . ya... | org . junit . Assert . assertEquals ( 0 , logAggregationService . getNumAggregators ( ) ) |
startProcess ( ) { org . activiti . engine . RuntimeService runtimeService = activitiRule . getRuntimeService ( ) ; java . util . Map < java . lang . String , java . lang . Object > variableMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; variableMap . put ( "name" , "Activiti" ) ; ... | org . junit . Assert . assertNotNull ( processInstance . getId ( ) ) |
ImmutableSet_castToSet ( ) { com . gs . collections . api . set . ImmutableSet < java . lang . Integer > immutableSet = this . newWith ( 3 , 2 , 1 ) ; java . util . Set < java . lang . Integer > set = immutableSet . castToSet ( ) ; "<AssertPlaceHolder>" ; } castToSet ( ) { return this ; } | org . junit . Assert . assertSame ( immutableSet , set ) |
receiveParsesResponseTopicMandatoryStatusNotFoundException ( ) { final byte [ ] actualPayload = "GetTwinResponseDataContainingDesiredAndReportedPropertiesDocument" . getBytes ( ) ; final java . lang . String expectedTopic = ( "$iothub/twin/res/" + "?$rid=" ) + ( mockReqId ) ; com . microsoft . azure . sdk . iot . devic... | org . junit . Assert . assertNull ( receivedMessage ) |
testCreateContext ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( context ) |
testGetParentTree ( ) { org . outerj . daisy . diff . html . dom . TagNode root = new org . outerj . daisy . diff . html . dom . TagNode ( null , "root" , new org . xml . sax . helpers . AttributesImpl ( ) ) ; org . outerj . daisy . diff . html . dom . TagNode intermediate = new org . outerj . daisy . diff . html . dom... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( root , intermediate ) , leaf . getParentTree ( ) ) |
testLiteralHeaderWithIndexingEncodingRFC7541Examples ( ) { final org . apache . hc . core5 . http2 . hpack . OutboundDynamicTable dynamicTable = new org . apache . hc . core5 . http2 . hpack . OutboundDynamicTable ( ) ; final org . apache . hc . core5 . http2 . hpack . HPackEncoder encoder = new org . apache . hc . cor... | org . junit . Assert . assertArrayEquals ( expected , buf . toByteArray ( ) ) |
testMatchesIsoCompatibleProprietaryCommandApdu_GenericProprietarySm ( ) { byte [ ] apdu = de . persosim . simulator . utils . HexString . toByteArray ( "8CF1F2F3" ) ; boolean result = de . persosim . simulator . apdu . CommandApduFactory . matchesIsoCompatibleProprietaryCommandApdu ( apdu ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertFalse ( result ) |
executesPut ( ) { context . checking ( new org . jmock . Expectations ( ) { { oneOf ( httpClientBuilder ) . build ( ) ; will ( returnValue ( client ) ) ; oneOf ( contextBuilder ) . build ( ) ; will ( returnValue ( localContext ) ) ; oneOf ( client ) . execute ( with ( org . hamcrest . Matchers . < org . apache . http .... | org . junit . Assert . assertThat ( actualResponse , org . hamcrest . Matchers . is ( response ) ) |
testByProvidesNoProcessingBuckFilesProgressIfStorageDoesNotExist ( ) { java . nio . file . Path storagePath = getStorageForTest ( ) ; com . facebook . buck . event . listener . util . ProgressEstimator estimator = new com . facebook . buck . event . listener . util . ProgressEstimator ( storagePath , getBuckEventBus ( ... | org . junit . Assert . assertThat ( estimator . getEstimatedProgressOfParsingBuckFiles ( ) . isPresent ( ) , org . hamcrest . Matchers . equalTo ( false ) ) |
fetchMembers ( ) { com . restfb . DefaultFacebookClient client = new com . restfb . DefaultFacebookClient ( getTestSettings ( ) . getUserAccessToken ( ) , com . restfb . Version . VERSION_2_8 ) ; com . restfb . Connection < com . restfb . types . NamedFacebookType > connection = client . fetchConnection ( ( ( getTestSe... | org . junit . Assert . assertTrue ( ( ( memberList . size ( ) ) > 0 ) ) |
different_type_facet_query ( ) { thrown . expect ( org . apache . metron . indexing . dao . Exception . class ) ; org . apache . metron . indexing . dao . search . SearchRequest request = JSONUtils . INSTANCE . load ( org . apache . metron . indexing . dao . SearchIntegrationTest . differentTypeFacetQuery , org . apach... | org . junit . Assert . assertEquals ( 3 , response . getTotal ( ) ) |
isRequestedToChangePassword_Null ( ) { "<AssertPlaceHolder>" ; } isRequestedToChangePassword ( javax . servlet . http . HttpServletRequest ) { java . lang . String currentPwd = httpRequest . getParameter ( org . oscm . ui . filter . BesServletRequestReader . REQ_PARAM_PASSWORD ) ; java . lang . String newPwd = httpRequ... | org . junit . Assert . assertFalse ( org . oscm . ui . filter . BesServletRequestReader . isRequestedToChangePassword ( request ) ) |
testGetColumnIndex ( ) { builder . addTable ( table , tName , false ) ; builder . addDefinedColumns ( ) ; builder . setAllColumns ( ) ; builder . build ( ) ; final int i = builder . getColumnIndex ( colName . getSPARQLName ( ) ) ; "<AssertPlaceHolder>" ; } getSPARQLName ( ) { return org . xenei . jdbc4sparql . impl . N... | org . junit . Assert . assertEquals ( 0 , i ) |
testCheckApiStatusInactive ( ) { java . lang . Long apiId = 1L ; ca . corefacility . bioinformatics . irida . model . RemoteAPI client = new ca . corefacility . bioinformatics . irida . model . RemoteAPI ( "name" , "http://uri" , "a<sp>description" , "id" , "secret" ) ; when ( remoteAPIService . read ( apiId ) ) . then... | org . junit . Assert . assertEquals ( RemoteAPIController . INVALID_OAUTH_TOKEN , checkApiStatus ) |
testJweAesCbcHmac ( ) { java . lang . String address = ( "https://localhost:" + ( org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJweJwsTest . PORT ) ) + "/jweaescbchmac" ; org . apache . cxf . jaxrs . client . JAXRSClientFactoryBean bean = new org . apache . cxf . jaxrs . client . JAXRSClientFac... | org . junit . Assert . assertEquals ( "book" , text ) |
testAppSubmissionContextForPriority ( ) { org . apache . tez . dag . api . TezConfiguration tezConf = new org . apache . tez . dag . api . TezConfiguration ( ) ; int testpriority = 999 ; org . apache . hadoop . yarn . api . records . ApplicationId appId = org . apache . hadoop . yarn . api . records . ApplicationId . n... | org . junit . Assert . assertEquals ( testpriority , appcontext . getPriority ( ) . getPriority ( ) ) |
astrixDirectComponentAllowsBindingToObjectsInSameProcess ( ) { tutorial . p2 . api . LunchRestaurantFinder restaurantFinderStub = org . mockito . Mockito . mock ( tutorial . p2 . api . LunchRestaurantFinder . class ) ; java . lang . String serviceUri = com . avanza . astrix . beans . service . DirectComponent . registe... | org . junit . Assert . assertEquals ( "Pontus!" , lunchSuggester . randomLunchRestaurant ( ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . knowledge . base . model . KBFolder missingKBFolder = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adapt... | org . junit . Assert . assertNull ( missingKBFolder ) |
getAttributeAsIntList_should_allow_array ( ) { au . edu . wehi . idsv . IdsvVariantContextTest . TestIdsvVariantContext vc = new au . edu . wehi . idsv . IdsvVariantContextTest . TestIdsvVariantContext ( minimalVariant ( ) . attribute ( "intlist" , new int [ ] { 1 , 2 } ) . make ( ) ) ; "<AssertPlaceHolder>" ; } getAtt... | org . junit . Assert . assertEquals ( 2 , vc . getAttributeAsIntList ( "intlist" ) . size ( ) ) |
parseEmptyString ( ) { "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { try { if ( serialized . isEmpty ( ) ) { return com . github . dockerjava . api . model . Ports . Binding . empty ( ) ; } java . lang . String [ ] parts = serialized . split ( ":" ) ; switch ( parts . length ) { case 2 : { return new com .... | org . junit . Assert . assertEquals ( com . github . dockerjava . api . model . Ports . Binding . parse ( "" ) , com . github . dockerjava . api . model . Ports . Binding . empty ( ) ) |
businessKeyJvm2 ( ) { java . lang . String result = testService . getValue ( "user1" , 1 ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . String , int ) { java . lang . Thread . sleep ( ( 60 * 1000 ) ) ; return "success" ; } | org . junit . Assert . assertEquals ( result , "success" ) |
testCompileModuleManyTimes ( ) { org . eclipse . ceylon . itest . AntResult result = ant ( "foo-oom" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , result . getStatusCode ( ) ) |
testArsort ( ) { logger . info ( "arsort" ) ; java . lang . Double [ ] array = new com . datumbox . framework . core . common . utilities . Double [ ] { 1.1 , 1.2 , 1.3 , 1.4 , 1.0 } ; java . lang . Integer [ ] expResult = new java . lang . Integer [ ] { 3 , 2 , 1 , 0 , 4 } ; java . lang . Integer [ ] result = com . da... | org . junit . Assert . assertArrayEquals ( expResult , result ) |
ignoresSamplesOutsideOfSpecifiedMillisecondWindow ( ) { impl = new org . fishwife . jrugged . SampledQuantile ( ( 60 * 1000L ) , java . util . concurrent . TimeUnit . MILLISECONDS ) ; long now = java . lang . System . currentTimeMillis ( ) ; impl . addSample ( 7 , ( now - ( 90 * 1000L ) ) ) ; impl . addSample ( 42 , no... | org . junit . Assert . assertEquals ( 42 , impl . getPercentile ( 50 , ( now + 1 ) ) ) |
test ( ) { javax . persistence . EntityManagerFactory emf = javax . persistence . Persistence . createEntityManagerFactory ( "h2" , new java . util . Properties ( ) ) ; java . nio . file . Path outputFolder = folder . getRoot ( ) . toPath ( ) ; com . querydsl . jpa . codegen . JPADomainExporter exporter = new com . que... | org . junit . Assert . assertFalse ( files . isEmpty ( ) ) |
testMemoryOverflow ( ) { org . apache . drill . exec . physical . impl . xsort . managed . SortConfig sortConfig = new org . apache . drill . exec . physical . impl . xsort . managed . SortConfig ( fixture . getFragmentContext ( ) . getConfig ( ) , fixture . getFragmentContext ( ) . getOptions ( ) ) ; long memoryLimit ... | org . junit . Assert . assertTrue ( memManager . mayOverflow ( ) ) |
testService ( ) { final java . io . File repoRoot = getResource ( "test/repo" ) ; final java . lang . String item = java . nio . file . Paths . get ( "" ) . toAbsolutePath ( ) . resolve ( "./target/test-classes/test/repo" ) . normalize ( ) . toString ( ) ; final java . lang . String [ ] classPath = new java . lang . St... | org . junit . Assert . assertNotNull ( url ) |
aboutAccessAsUser ( ) { accessAsUser ( ) ; driver . findElement ( org . openqa . selenium . By . linkText ( "Sobre" ) ) . click ( ) ; org . openqa . selenium . WebElement txt = driver . findElement ( org . openqa . selenium . By . id ( "about" ) ) ; java . lang . String str = txt . getText ( ) ; java . lang . String me... | org . junit . Assert . assertEquals ( merge , str ) |
storesMeasurementsWithDuplicateTicks ( ) { when ( clock . wallTime ( ) ) . thenReturn ( 20L ) ; reservoir . update ( 1L ) ; reservoir . update ( 2L ) ; "<AssertPlaceHolder>" ; } getMeasurements ( ) { trim ( ) ; return new java . util . ArrayList ( measurements . values ( ) ) ; } | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1L , 2L ) , reservoir . getMeasurements ( ) ) |
testUserAuthInfoWithGroupMembership ( ) { testUser = org . apache . jackrabbit . oak . exercise . ExerciseUtility . createTestUser ( userManager ) ; testGroup = org . apache . jackrabbit . oak . exercise . ExerciseUtility . createTestGroup ( userManager ) ; testGroup . addMember ( testUser ) ; root . commit ( ) ; conte... | org . junit . Assert . assertEquals ( expectedPrincipals , authInfo . getPrincipals ( ) ) |
testCollectionEqSize ( ) { org . hisp . dhis . query . Query query = org . hisp . dhis . query . Query . from ( schemaService . getDynamicSchema ( org . hisp . dhis . dataelement . DataElementGroup . class ) ) ; query . setObjects ( dataElementGroups ) ; query . add ( org . hisp . dhis . query . Restrictions . eq ( "da... | org . junit . Assert . assertEquals ( 2 , objects . size ( ) ) |
overlaps8 ( ) { net . time4j . PlainDate startA = net . time4j . PlainDate . of ( 2014 , 5 , 11 ) ; net . time4j . PlainDate endA = net . time4j . PlainDate . of ( 2014 , 5 , 17 ) ; net . time4j . PlainDate startB = net . time4j . PlainDate . of ( 2014 , 5 , 11 ) ; net . time4j . PlainDate endB = net . time4j . PlainDa... | org . junit . Assert . assertThat ( a . overlaps ( b ) , org . hamcrest . CoreMatchers . is ( false ) ) |
isFilteredByProcessIdInvalidTest ( ) { final java . lang . String processId = "testProc" ; final org . dashbuilder . dataset . filter . DataSetFilter filter = new org . dashbuilder . dataset . filter . DataSetFilter ( ) ; filter . addFilterColumn ( likeTo ( org . jbpm . workbench . pr . client . editors . instance . li... | org . junit . Assert . assertNull ( filterProcessId ) |
testSTProp ( ) { java . lang . String template = "<t.x>" ; org . stringtemplate . v4 . ST st = new org . stringtemplate . v4 . ST ( template ) ; org . stringtemplate . v4 . ST t = new org . stringtemplate . v4 . ST ( "<x>" ) ; t . add ( "x" , "Ter" ) ; st . add ( "t" , t ) ; java . lang . String expected = "Ter" ; java... | org . junit . Assert . assertEquals ( expected , result ) |
testSelectDepartment ( ) { org . foxbpm . engine . impl . identity . Authentication . setAuthenticatedUserId ( "admin" ) ; jdbcTemplate . execute ( "insert<sp>into<sp>au_orginfo(orgid,suporgid)<sp>VALUES<sp>('2001','2001')" ) ; jdbcTemplate . execute ( "insert<sp>into<sp>au_orginfo(orgid,suporgid)<sp>VALUES<sp>('2002',... | org . junit . Assert . assertEquals ( "insert<sp>into<sp>au_group_relation(guid,userid,groupid,grouptype)<sp>VALUES<sp>('10000000000000002','b','2002','dept')" 0 , groupId ) |
test_getpid ( ) { int pid = com . alibaba . rocketmq . common . UtilAll . getPid ( ) ; System . out . println ( ( "PID<sp>=<sp>" + pid ) ) ; "<AssertPlaceHolder>" ; } getPid ( ) { java . lang . management . RuntimeMXBean runtime = java . lang . management . ManagementFactory . getRuntimeMXBean ( ) ; java . lang . Strin... | org . junit . Assert . assertTrue ( ( pid > 0 ) ) |
createDoubleKindTest ( ) { final org . apache . drill . exec . server . options . OptionValue createdValue = org . apache . drill . exec . server . options . OptionValue . create ( OptionValue . Kind . DOUBLE , OptionValue . AccessibleScopes . ALL , "myOption" , "1.5" , OptionValue . OptionScope . SYSTEM ) ; final org ... | org . junit . Assert . assertEquals ( expectedValue , createdValue ) |
testGetNumArgs ( ) { com . att . research . xacmlatt . pdp . std . functions . FunctionDefinitionEquality < java . lang . String > fd = new com . att . research . xacmlatt . pdp . std . functions . FunctionDefinitionEquality < java . lang . String > ( com . att . research . xacml . api . XACML3 . ID_FUNCTION_STRING_EQU... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 2 ) , fd . getNumArgs ( ) ) |
testPut4 ( ) { java . nio . ByteBuffer data = java . nio . ByteBuffer . allocate ( testData . length ) ; data . put ( testData ) ; data . rewind ( ) ; q . put ( data ) ; byte [ ] dada = new byte [ len ] ; q . get ( dada ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object , java . lang . Object ) { if ( left == ... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( dada , testData ) ) |
output ( ) { com . asakusafw . runtime . io . text . directio . AbstractTextStreamFormatTest . MockFormat format = format ( 1 ) ; java . lang . String [ ] [ ] data = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "Hello,<sp>world!" } } ; java . io . ByteArrayOutputStream output = new java . io . Byte... | org . junit . Assert . assertThat ( com . asakusafw . runtime . io . text . directio . AbstractTextStreamFormatTest . deserialize ( output . toByteArray ( ) ) , is ( data ) ) |
testBuildWithEntityFields ( ) { java . lang . String expectedAwql = "SELECT<sp>Id,<sp>Name<sp>LIMIT<sp>0,100" ; com . google . api . ads . adwords . jaxws . utils . v201809 . ServiceQuery serviceQuery = new com . google . api . ads . adwords . jaxws . utils . v201809 . ServiceQuery . Builder ( ) . fields ( CampaignFiel... | org . junit . Assert . assertEquals ( expectedAwql , serviceQuery . toString ( ) ) |
findsPageOfMatthews ( ) { java . util . List < example . springdata . jpa . showcase . core . Customer > customers = repository . findByLastname ( "Matthews" , 0 , 2 ) ; "<AssertPlaceHolder>" ; } findByLastname ( java . lang . String , int , int ) { javax . persistence . TypedQuery < example . springdata . jpa . showca... | org . junit . Assert . assertThat ( customers . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testConcatByteArrays ( ) { byte [ ] a = new byte [ ] { 1 , 2 , 3 } ; byte [ ] b = new byte [ ] { 4 , 5 , 6 } ; byte [ ] concat = new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( concat , concat ( a , b ) ) |
testUpdateLastHealthIndication ( ) { final io . vlingo . cluster . model . node . LocalRegistry registry = join3Nodes ( ) ; final long minTime = java . lang . System . currentTimeMillis ( ) ; final long maxTime = minTime + 100L ; for ( final io . vlingo . wire . node . Node node : registry . liveNodes ( ) ) { registry ... | org . junit . Assert . assertTrue ( ( ( lastHealthIndication >= minTime ) && ( lastHealthIndication <= maxTime ) ) ) |
testOverrideInjectedData ( ) { com . liferay . portal . template . soy . internal . SoyContextImpl soyContextImpl = new com . liferay . portal . template . soy . internal . SoyContextImpl ( ) ; soyContextImpl . putInjectedData ( "injectedKey" , "injectedValue" ) ; java . util . Map < java . lang . String , java . lang ... | org . junit . Assert . assertEquals ( "overrideValue" , soyContextImpl . getInjectedData ( "injectedKey" ) ) |
should_set_description ( ) { org . fest . assertions . core . Matcher < java . lang . Object > condition = new org . fest . assertions . core . Matcher < java . lang . Object > ( "Testing" ) { @ org . fest . assertions . core . Override public boolean matches ( java . lang . Object value ) { return false ; } } ; "<Asse... | org . junit . Assert . assertEquals ( "Testing" , condition . description . value ( ) ) |
validate_nothingsSet_returnsFalse ( ) { boolean expected = false ; eu . chargetime . ocpp . model . basic . types . ChargingStationType sut = createSut ( ) ; boolean result = sut . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; } | org . junit . Assert . assertEquals ( expected , result ) |
testEmptyLocalRepo ( ) { org . jboss . modules . maven . MavenSettings settings = new org . jboss . modules . maven . MavenSettings ( ) ; org . jboss . modules . maven . MavenSettings . parseSettingsXml ( java . nio . file . Paths . get ( org . jboss . modules . maven . MavenSettingsTest . class . getResource ( "settin... | org . junit . Assert . assertNull ( settings . getLocalRepository ( ) ) |
testTokenLoginForDisabledUser ( ) { org . apache . jackrabbit . oak . api . ContentSession cs = null ; try { org . apache . jackrabbit . api . security . user . User user = getTestUser ( ) ; javax . jcr . SimpleCredentials sc = new javax . jcr . SimpleCredentials ( user . getID ( ) , user . getID ( ) . toCharArray ( ) ... | org . junit . Assert . assertNotNull ( token ) |
ensureMockAvailable ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( mock ) |
testIfRemoveOpenEngSBModelEntryWork_shouldWork ( ) { org . openengsb . core . api . model . ModelWrapper wrapper = org . openengsb . core . api . model . ModelWrapper . wrap ( new org . openengsb . core . weaver . test . model . TestModel ( ) ) ; wrapper . addOpenEngSBModelEntry ( new org . openengsb . core . api . mod... | org . junit . Assert . assertThat ( wrapper . toOpenEngSBModelEntries ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 3 ) ) |
testCopyForAtPre ( ) { org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . msg = org . dresdenocl . modelinstancetype . test . msg . ModelInstanceTypeTestSuiteMessages . TestModelInstanceCollection_CopyForAtPreIsWrong ; for ( org . dresdenocl . modelinstancetype . types . IModelInstanceC... | org . junit . Assert . assertNotNull ( org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . msg , aCollection . copyForAtPre ( ) ) |
testNextEnd ( ) { listBox . selectItem ( o2 ) ; listBox . selectNext ( ) ; "<AssertPlaceHolder>" ; } getSelection ( ) { return selection ; } | org . junit . Assert . assertEquals ( o2 , listBox . getSelection ( ) . get ( 0 ) ) |
testPutStageException ( ) { com . streamsets . pipeline . api . service . dataformats . DataFormatGeneratorService dataFormatGeneratorService = org . mockito . Mockito . mock ( com . streamsets . pipeline . api . service . dataformats . DataFormatGeneratorService . class ) ; try { org . mockito . Mockito . when ( dataF... | org . junit . Assert . assertTrue ( issues . isEmpty ( ) ) |
testCreateWithNulls ( ) { org . joor . test . Test2 test2 = org . joor . Reflect . onClass ( org . joor . test . Test2 . class ) . create ( ( ( java . lang . Object ) ( null ) ) ) . < org . joor . test . Test2 > get ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( test2 . n ) |
testAndNot ( ) { int [ ] array1 = new int [ ] { 39173 , 39174 , 39175 , 39176 , 39177 , 39178 , 39179 , 39180 , 39181 , 39182 , 39183 , 39184 , 39185 , 39186 , 39187 , 39188 } ; int [ ] array2 = new int [ ] { 14205 } ; org . roaringbitmap . RoaringBitmap rb1 = org . roaringbitmap . RoaringBitmap . bitmapOf ( array1 ) ;... | org . junit . Assert . assertEquals ( answer . getCardinality ( ) , array1 . length ) |
testRewriteBasicPomWithTagBase ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "basic-pom-with-tag-base" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createDescriptorFromProjects ( reactorProjects , "basic-... | org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) ) |
testStringList2Arry ( ) { java . lang . String [ ] inAry = new java . lang . String [ ] { "e1" , "e2" } ; java . util . List < ? > list = org . nutz . castor . Castors . me ( ) . cast ( inAry , java . lang . String [ ] . class , java . util . List . class ) ; java . lang . String [ ] reAry = org . nutz . castor . Casto... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( inAry , reAry ) ) |
testSerialization_iterators ( ) { java . util . List < org . apache . accumulo . core . client . IteratorSetting > settings = new java . util . ArrayList ( ) ; settings . add ( new org . apache . accumulo . core . client . IteratorSetting ( 50 , "iter" , "iterclass" ) ) ; settings . add ( new org . apache . accumulo . ... | org . junit . Assert . assertEquals ( actualConfig . getIterators ( ) , settings ) |
testStringComplexResult ( ) { java . lang . String str = "abc" ; com . baidu . unbiz . fluentvalidator . ComplexResult ret = com . baidu . unbiz . fluentvalidator . FluentValidator . checkAll ( ) . on ( str , new com . baidu . unbiz . fluentvalidator . validator . StringValidator ( ) ) . doValidate ( ) . result ( com .... | org . junit . Assert . assertThat ( ret . isSuccess ( ) , org . hamcrest . core . Is . is ( true ) ) |
testEchoServer ( ) { com . xjeffrose . xio . bootstrap . XioServerBootstrap bootstrap = com . xjeffrose . xio . bootstrap . XioServerBootstrap . fromConfig ( "xio.testEchoServer" ) . addToPipeline ( new com . xjeffrose . xio . pipeline . XioEchoPipeline ( ) ) ; try ( com . xjeffrose . xio . server . XioServer server = ... | org . junit . Assert . assertEquals ( payload , response ) |
testFindByProviderString ( ) { java . lang . String providerNo1 = "1" ; java . lang . String providerNo2 = "2" ; org . oscarehr . common . model . BatchBilling bBilling1 = new org . oscarehr . common . model . BatchBilling ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass... | org . junit . Assert . assertTrue ( true ) |
delete ( ) { io . fabric8 . commons . ReadyEntity < io . fabric8 . kubernetes . api . model . apps . StatefulSet > statefulSetReady = new io . fabric8 . commons . ReadyEntity ( io . fabric8 . kubernetes . api . model . apps . StatefulSet . class , client , "ss1" , currentNamespace ) ; await ( ) . atMost ( 30 , TimeUnit... | org . junit . Assert . assertTrue ( bDeleted ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.