input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSingleImageSparkTransform ( ) { int seed = 12345 ; java . io . File f1 = new org . nd4j . linalg . io . ClassPathResource ( "datavec-spark-inference/testimages/class1/A.jpg" ) . getFile ( ) ; org . datavec . spark . transform . model . SingleImageRecord imgRecord = new org . datavec . spark . transform . model . Si... | org . junit . Assert . assertEquals ( 1 , fromBase64 . size ( 0 ) ) |
shouldUseCollectionConverterWhenItExists ( ) { br . com . caelum . vraptor . serialization . gson . GsonJSONSerialization serialization = serializationWithAdapter ( new br . com . caelum . vraptor . serialization . gson . GsonJSONSerializationTest . CollectionSerializer ( ) ) ; java . lang . String expectedResult = "[\... | org . junit . Assert . assertThat ( result ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) ) |
testGetEjbHome ( ) { java . lang . Object home = org . jboss . additional . testsuite . jdkall . present . management . deploy . runtime . StatelessEJBRemoteHomeRuntimeNameTestCase . context . lookup ( getEJBHomeJNDIBinding ( ) ) ; "<AssertPlaceHolder>" ; } getEJBHomeJNDIBinding ( ) { final java . lang . String appName... | org . junit . Assert . assertTrue ( ( home instanceof org . jboss . additional . testsuite . jdkall . present . management . deploy . runtime . SimpleHome ) ) |
testSingleConditionPassenger ( ) { gov . gtas . model . udr . json . QueryTerm cond = gov . gtas . rule . builder . RuleBuilderTestUtils . createQueryTerm ( EntityEnum . PASSENGER , PassengerMapping . DOB , CriteriaOperatorEnum . BETWEEN , new java . lang . String [ ] { "1990-01-01" , "1998-12-31" } , TypeEnum . DATE )... | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
testNextHopSelf ( ) { org . opendaylight . yang . gen . v1 . http . openconfig . net . yang . routing . policy . rev151009 . routing . policy . top . routing . policy . policy . definitions . policy . definition . statements . Statement statement = this . basicStatements . stream ( ) . filter ( ( st ) -> st . getName (... | org . junit . Assert . assertEquals ( expected , result . getAttributes ( ) ) |
spatialQueries ( ) { java . util . Set < java . lang . Integer > actual = new java . util . HashSet ( ) ; java . util . Set < java . lang . Integer > expected = new java . util . HashSet ( ) ; java . lang . String selectSQL = "select<sp>id<sp>from<sp>boxes<sp>where<sp>geo_overlaps(geo_wkt(box),<sp>geo_wkt(?))" ; java .... | org . junit . Assert . assertEquals ( expected , actual ) |
testEmpty ( ) { activeToolManager . register ( getClass ( ) . getResourceAsStream ( "empty.xml" ) ) ; "<AssertPlaceHolder>" ; } findTools ( java . util . Set , java . util . Set ) { org . sakaiproject . tool . api . ActiveToolManager manager = org . sakaiproject . tool . cover . ActiveToolManager . getInstance ( ) ; if... | org . junit . Assert . assertTrue ( activeToolManager . findTools ( null , null ) . isEmpty ( ) ) |
testVersionBytes ( ) { final com . yoghurt . crypto . transactions . shared . domain . Transaction parsedTransaction = com . yoghurt . crypto . transactions . client . util . transaction . TransactionParseUtil . parseTransactionBytes ( com . googlecode . gwt . crypto . bouncycastle . util . encoders . Hex . decode ( co... | org . junit . Assert . assertEquals ( 1 , parsedTransaction . getVersion ( ) ) |
uploadVideo ( ) { java . io . InputStream is = new java . io . FileInputStream ( "/Users/jy/Downloads/test.mp4" ) ; java . lang . String fileName = "" ; java . lang . String title = "" ; java . lang . String description = "" ; com . foxinmy . weixin4j . tuple . MpVideo mpVideo = mediaApi . uploadVideo ( is , fileName ,... | org . junit . Assert . assertTrue ( ( ( mpVideo . getMediaId ( ) ) != null ) ) |
testMultiplicationWithVector ( ) { com . hackoeur . jglm . Mat4 m1 = new com . hackoeur . jglm . Mat4 ( 49.0F , 50.0F , 29.0F , 12.0F , 23.0F , 90.0F , 45.0F , 32.0F , 5.0F , 47.0F , 46.0F , 89.0F , 86.0F , 88.0F , 20.0F , 58.0F ) ; com . hackoeur . jglm . Vec4 v1 = new com . hackoeur . jglm . Vec4 ( 54.0F , 43.0F , 28... | org . junit . Assert . assertEquals ( expectedMul , multiplied ) |
testEdgeIndexViaRootGetEdges ( ) { com . tinkerpop . blueprints . impls . orient . OrientGraph g = com . gentics . mesh . graphdb . orientdb . EdgeIndexPerformanceTest . factory . getTx ( ) ; try { long start = java . lang . System . currentTimeMillis ( ) ; for ( int i = 0 ; i < ( com . gentics . mesh . graphdb . orien... | org . junit . Assert . assertTrue ( edges . iterator ( ) . hasNext ( ) ) |
toString_containsFields ( ) { com . google . auth . oauth2 . ComputeEngineCredentialsTest . MockMetadataServerTransportFactory serverTransportFactory = new com . google . auth . oauth2 . ComputeEngineCredentialsTest . MockMetadataServerTransportFactory ( ) ; java . lang . String expectedToString = java . lang . String ... | org . junit . Assert . assertEquals ( expectedToString , credentials . toString ( ) ) |
usesLogicalInterfacesLegacySff ( ) { when ( sff . getSffDataPlaneLocator ( ) ) . thenReturn ( new java . util . ArrayList ( ) ) ; "<AssertPlaceHolder>" ; } usesLogicalInterfaces ( org . opendaylight . yang . gen . v1 . urn . cisco . params . xml . ns . yang . sfc . sff . rev140701 . service . function . forwarders . Se... | org . junit . Assert . assertFalse ( handler . usesLogicalInterfaces ( sff ) ) |
testLoadAllOntologies ( ) { owltools . io . ParserWrapper pw = new owltools . io . ParserWrapper ( ) ; pw . addIRIMapper ( new owltools . io . CatalogXmlIRIMapper ( owltools . solrj . AllOntologyLoaderIntegrationRunner . catalogXml ) ) ; final owltools . graph . OWLGraphWrapper g = pw . parseToOWLGraph ( owltools . sol... | org . junit . Assert . assertTrue ( ( ( owltools . solrj . AllOntologyLoaderIntegrationRunner . solrCounter ) > 0 ) ) |
indexOfId_tableNewlyAddedItem_returnsFour ( ) { java . lang . Object id = container . addItem ( ) ; "<AssertPlaceHolder>" ; } indexOfId ( java . lang . Object ) { for ( int ix = 0 ; ix < ( addedItems . size ( ) ) ; ix ++ ) { com . vaadin . v7 . data . util . sqlcontainer . RowItem item = addedItems . get ( ix ) ; if ( ... | org . junit . Assert . assertEquals ( 4 , container . indexOfId ( id ) ) |
testGetAvgCharWidthUsesStorageForKnownStrings ( ) { org . eclipse . rap . rwt . internal . textsize . ProbeResultStore probeStore = org . eclipse . rap . rwt . internal . textsize . ProbeResultStore . getInstance ( ) ; org . eclipse . swt . graphics . Point probeSize = new org . eclipse . swt . graphics . Point ( ( ( P... | org . junit . Assert . assertEquals ( 4 , determined , 0 ) |
testBuildWithParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String docNum = "doc<sp>num" ; java . lang . String email = "email@email.com" ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date birthDate = new java . util .... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testLookupSuccessfull ( ) { org . opengis . referencing . crs . CoordinateReferenceSystem crs = org . geotools . referencing . CRS . decode ( "EPSG:42101" ) ; java . lang . String code = org . geotools . referencing . CRS . lookupIdentifier ( crs , true ) ; "<AssertPlaceHolder>" ; } lookupIdentifier ( org . opengis . r... | org . junit . Assert . assertEquals ( "EPSG:42101" , code ) |
testSingleFilePath ( ) { buildRule . executeTarget ( "test_single_file_path" ) ; java . io . File file = new java . io . File ( buildRule . getProject ( ) . getProperty ( "output" ) , "copytest_single_file_path.tmp" ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return super . getProject ( ) . get... | org . junit . Assert . assertTrue ( file . exists ( ) ) |
testSessionDestroyedIsDebugEnabledFalse ( ) { org . terasoluna . gfw . web . logback . LogLevelChangeUtil . setLogLevel ( LogLevelChangeUtil . LogLevel . INFO ) ; listener . sessionDestroyed ( httpSessionEvent ) ; "<AssertPlaceHolder>" ; } sessionDestroyed ( javax . servlet . http . HttpSessionEvent ) { if ( org . tera... | org . junit . Assert . assertThat ( logger . isDebugEnabled ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
completeCircuitCollectionSerializationDeserializationTest ( ) { org . opennaas . extensions . genericnetwork . test . capability . nclprovisioner . CircuitCollectionSerializationTest . LOG . info ( "CircuitCollection<sp>Serialization<sp>Test" ) ; org . opennaas . extensions . genericnetwork . capability . nclprovisione... | org . junit . Assert . assertEquals ( circuitCollection , generatedCircuitCollection ) |
run ( ) { net . openhft . chronicle . wire . TextMethodTester test = new net . openhft . chronicle . wire . TextMethodTester ( "methods-in.yaml" , net . openhft . chronicle . wire . MockMethodsImpl :: new , net . openhft . chronicle . wire . MockMethods . class , "methods-in.yaml" ) . setup ( "methods-in.yaml" ) . run ... | org . junit . Assert . assertEquals ( test . expected ( ) , test . actual ( ) ) |
should_follow_indentation_policy_of_indented_tables_and_values ( ) { java . lang . String output = new com . moandjiezana . toml . TomlWriter . Builder ( ) . indentValuesBy ( 2 ) . indentTablesBy ( 2 ) . build ( ) . write ( buildNestedMap ( ) ) ; java . lang . String expected = "aBoolean<sp>=<sp>true\n\n" + ( ( ( ( ( (... | org . junit . Assert . assertEquals ( expected , output ) |
testInvariantNotCalled ( ) { de . vksi . c4j . systemtest . config . purebehaviorskiponly . PureBehaviorSkipOnlySystemTest . ContractClass . invariantCalled = false ; target . pureMethod ( ) ; "<AssertPlaceHolder>" ; } pureMethod ( ) { } | org . junit . Assert . assertFalse ( de . vksi . c4j . systemtest . config . purebehaviorskiponly . PureBehaviorSkipOnlySystemTest . ContractClass . invariantCalled ) |
testTrainC_ClassificationDataSet ( ) { System . out . println ( "trainC" ) ; for ( jsat . classifiers . trees . TreePruner . PruningMethod pruneMethod : TreePruner . PruningMethod . values ( ) ) for ( jsat . classifiers . trees . ImpurityScore . ImpurityMeasure gainMethod : ImpurityScore . ImpurityMeasure . values ( ) ... | org . junit . Assert . assertTrue ( ( attempts > 0 ) ) |
testNextSelectionDistanceWithSmallerRecentSpan ( ) { org . eclipse . jgit . internal . storage . pack . PackWriterBitmapPreparer preparer = newPeparer ( org . eclipse . jgit . internal . storage . pack . DEFAULT_BITMAP_RECENT_COMMIT_COUNT , 10 , org . eclipse . jgit . internal . storage . pack . DEFAULT_BITMAP_DISTANT_... | org . junit . Assert . assertEquals ( pair [ 1 ] , preparer . nextSpan ( pair [ 0 ] ) ) |
test_CaptureEnPassantLeftFalse ( ) { classUnderTest = addBlackPawn ( GenericPosition . e4 ) ; pl . add ( new eubos . board . pieces . Knight ( eubos . board . pieces . Piece . Colour . white , GenericPosition . f2 ) ) ; pm = new eubos . position . PositionManager ( new eubos . board . Board ( pl ) , eubos . board . pie... | org . junit . Assert . assertFalse ( ml . contains ( expectedMove ) ) |
testSelectInvalidSubclassOnOptional ( ) { java . lang . Number number = 42 ; com . annimon . stream . Optional < java . lang . String > result = com . annimon . stream . Optional . of ( number ) . select ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return new com . annimon . stream . test ... | org . junit . Assert . assertThat ( result , isEmpty ( ) ) |
testreadBytes ( ) { @ org . jetbrains . annotations . NotNull net . openhft . chronicle . wire . Wire wire = new net . openhft . chronicle . wire . BinaryWire ( nativeBytes ( ) ) ; wire . write ( "a" ) . typePrefix ( net . openhft . chronicle . wire . BinaryWire2Test . BytesHolder . class ) . marshallable ( ( w ) -> w ... | org . junit . Assert . assertEquals ( "Hello<sp>World" , bh2 . bytes . toString ( ) ) |
shouldRetrieveOfficeName ( ) { java . lang . Short officeId = java . lang . Short . valueOf ( "3" ) ; org . mifos . customers . office . business . OfficeBO office = new org . mifos . domain . builders . OfficeBuilder ( ) . withName ( "officeTestName" ) . build ( ) ; when ( officeDao . findOfficeById ( officeId ) ) . t... | org . junit . Assert . assertThat ( personnelDto . getOfficeName ( ) , org . hamcrest . Matchers . is ( "officeTestName" ) ) |
extraOptionsAreNotAppended_WhenTheyAreEmpty ( ) { java . util . Map < java . lang . String , java . lang . String > extraOptions = generateExtraOptions ( org . pentaho . di . core . database . DatabaseMeta_AppendExtraParamsTest . CONN_TYPE_MSSQL , 0 ) ; final java . lang . String validKey = ( ( org . pentaho . di . cor... | org . junit . Assert . assertEquals ( CONN_URL_NO_EXTRA_OPTIONS , connUrlWithExtraOptions ) |
testBatchedUpdate ( ) { org . teiid . language . Insert command = ( ( org . teiid . language . Insert ) ( org . teiid . translator . jdbc . TranslationHelper . helpTranslate ( TranslationHelper . BQT_VDB , "insert<sp>into<sp>BQT1.SmallA<sp>(IntKey)<sp>values<sp>(1)" ) ) ) ; org . teiid . language . Insert command1 = ( ... | org . junit . Assert . assertArrayEquals ( new int [ ] { 1 , 1 } , updateExecution . getUpdateCounts ( ) ) |
shouldCreateOrder ( ) { net . chrisrichardson . ftgo . orderservice . domain . Order order = new net . chrisrichardson . ftgo . orderservice . domain . Order ( 1 , 2 , java . util . Collections . emptyList ( ) ) ; order . setId ( 101L ) ; when ( orderService . createOrder ( 1 , 2 , java . util . Collections . emptyList... | org . junit . Assert . assertEquals ( 101L , orderId ) |
testIterableSetEmpty ( ) { try ( org . jboss . windup . graph . GraphContext context = factory . create ( true ) ) { java . util . List < org . jboss . windup . graph . model . WindupVertexFrame > models = fillInTestDataAndReturn ( context ) ; org . jboss . windup . graph . iterables . FramesSetIterable iterable = new ... | org . junit . Assert . assertEquals ( 0 , getIterableSize ( iterable ) ) |
testImageCoordinatePairDefaultConstructor ( ) { org . codice . imaging . nitf . core . image . ImageCoordinatePair coord = new org . codice . imaging . nitf . core . image . impl . ImageCoordinatePairImpl ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( coord ) |
rfc6979 ( ) { org . json . JSONArray tests = readArray ( com . bitsofproof . supernode . api . RFC6979Test . TESTS ) ; for ( int i = 0 ; i < ( tests . length ( ) ) ; ++ i ) { org . json . JSONObject test = tests . getJSONObject ( i ) ; com . bitsofproof . supernode . common . ECKeyPair key = com . bitsofproof . superno... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expectedSignature , signature ) ) |
testDistinctUnionOrderByInt ( ) { com . splicemachine . derby . impl . sql . execute . operations . List < java . lang . Object [ ] > expected = com . splicemachine . derby . impl . sql . execute . operations . Arrays . asList ( o ( 1 ) , o ( 2 ) , o ( 4 ) , o ( 5 ) , o ( 7 ) , o ( 10 ) , o ( 20 ) , o ( 40 ) , o ( 50 )... | org . junit . Assert . assertArrayEquals ( expected . toArray ( ) , result . toArray ( ) ) |
hasManagerRole_MARKETPLACE_OWNER ( ) { org . oscm . domobjects . PlatformUser user = createUserWithRole ( UserRoleType . MARKETPLACE_OWNER ) ; "<AssertPlaceHolder>" ; } hasManagerRole ( ) { for ( org . oscm . domobjects . RoleAssignment roleAssignment : assignedRoles ) { if ( roleAssignment . getRole ( ) . getRoleName ... | org . junit . Assert . assertTrue ( user . hasManagerRole ( ) ) |
testLotsOfConcurrentConnections ( ) { java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; final javax . jms . ConnectionFactory factory = createConnectionFactory ( ) ; int connectionCount = 400 ; final java . util . concurrent . atomic . AtomicInteger t... | org . junit . Assert . assertNotNull ( connection . getBrokerName ( ) ) |
testCircularDeclarationWithExtension ( ) { java . lang . String drl = "package<sp>org.drools.compiler.test\n" + ( ( ( ( ( ( ( ( "declare<sp>FactA\n" + "<sp>fieldB:<sp>FactB\n" ) + "package<sp>org.drools.compiler.test\n" 3 ) + "declare<sp>FactB<sp>extends<sp>FactA<sp>end\n" ) + "rule<sp>R1<sp>when\n" ) + "package<sp>org... | org . junit . Assert . assertEquals ( 1 , rules ) |
staticConfigShouldWork ( ) { final com . spotify . apollo . Environment environment = sut . withStaticConfig ( configNode ) . build ( ) . create ( com . spotify . apollo . environment . EnvironmentFactoryTest . SERVICE_NAME , routingContext ) ; "<AssertPlaceHolder>" ; } config ( ) { return configResolver . getConfig ( ... | org . junit . Assert . assertEquals ( configNode , environment . config ( ) ) |
testEncryptSignatureConfig ( ) { org . apache . cxf . service . Service service = createService ( ) ; java . util . Map < java . lang . String , java . lang . Object > inConfig = new java . util . HashMap ( ) ; inConfig . put ( ConfigurationConstants . PW_CALLBACK_REF , new org . apache . cxf . ws . security . wss4j . ... | org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) ) |
testBuildAndSearchBinaryPermutationIndex ( ) { int peterRank = positionalBuildSearchGetRank ( "-dimension<sp>1024<sp>-vectortype<sp>binary<sp>-seedlength<sp>512<sp>-positionalmethod<sp>permutation<sp>-luceneindexpath<sp>positional_index" , "-searchtype<sp>permutation<sp>-queryvectorfile<sp>elementalvectors.bin<sp>-sear... | org . junit . Assert . assertTrue ( ( 3 >= peterRank ) ) |
testSetAndGetCombinationType ( ) { doCallRealMethod ( ) . when ( condition ) . setCombinationType ( anyString ( ) ) ; when ( condition . getCombinationType ( ) ) . thenCallRealMethod ( ) ; condition . setCombinationType ( comboName ) ; "<AssertPlaceHolder>" ; } getCombinationType ( ) { return this . comboType ; } | org . junit . Assert . assertEquals ( condition . getCombinationType ( ) , comboName ) |
conversations ( ) { "<AssertPlaceHolder>" ; } conversations ( ) { org . junit . Assert . assertThat ( facebook . conversations ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . ConversationMethods . class ) ) ; } | org . junit . Assert . assertThat ( facebook . conversations ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . ConversationMethods . class ) ) |
testSerialization ( ) { org . jfree . data . time . TimeSeriesCollection c1 = new org . jfree . data . time . TimeSeriesCollection ( createSeries ( ) ) ; org . jfree . data . time . TimeSeriesCollection c2 = ( ( org . jfree . data . time . TimeSeriesCollection ) ( org . jfree . chart . TestUtils . serialised ( c1 ) ) )... | org . junit . Assert . assertEquals ( c1 , c2 ) |
treeScoringTest_Iris_1 ( ) { org . apache . pig . impl . logicalLayer . schema . Schema inputSchema = buildIrisInputSchema ( ) ; org . apache . pig . data . Tuple inputTuple = tf . newTuple ( ) ; org . apache . pig . data . Tuple expected = tf . newTuple ( ) ; { inputTuple = this . buildIrisInputEvent ( 5.1 , 3.5 , 1.4... | org . junit . Assert . assertEquals ( expected , observed ) |
testTest ( ) { org . apache . commons . functor . NullaryPredicate p = new org . apache . commons . functor . adapter . FullyBoundNullaryPredicate ( new org . apache . commons . functor . adapter . BinaryFunctionBinaryPredicate < java . lang . Object , java . lang . Boolean > ( org . apache . commons . functor . core .... | org . junit . Assert . assertTrue ( p . test ( ) ) |
testOrganizationsWithMoreThanOneSubscription_invisibleSubscriptions ( ) { final org . oscm . domobjects . TechnicalProduct tProd = runTX ( new java . util . concurrent . Callable < org . oscm . domobjects . TechnicalProduct > ( ) { @ org . oscm . domobjects . Override public org . oscm . domobjects . TechnicalProduct c... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 0 ) , result ) |
testDataAccessFinderFindsIt ( ) { java . util . Iterator < org . geotools . data . DataAccessFactory > allFactories = org . geotools . data . DataAccessFinder . getAllDataStores ( ) ; org . geotools . arcsde . ArcSDEDataStoreFactory sdeFac = null ; while ( allFactories . hasNext ( ) ) { org . geotools . data . DataAcce... | org . junit . Assert . assertNotNull ( sdeFac ) |
shouldBeAbleToAddJobsByName ( ) { org . knowm . sundial . SundialJobScheduler . addJob ( "jobByName" , "org.knowm.sundial.jobs.SampleJob1" ) ; "<AssertPlaceHolder>" ; } getAllJobNames ( ) { java . util . List < java . lang . String > allJobNames = new java . util . ArrayList < java . lang . String > ( ) ; try { java . ... | org . junit . Assert . assertTrue ( org . knowm . sundial . SundialJobScheduler . getAllJobNames ( ) . contains ( "jobByName" ) ) |
testFindURLSetter ( ) { final java . lang . String url = "www.google.com" ; org . supercsv . util . ReflectionUtils . findSetter ( bean , "URL" , java . lang . String . class ) . invoke ( bean , url ) ; "<AssertPlaceHolder>" ; } getURL ( ) { return URL ; } | org . junit . Assert . assertEquals ( url , bean . getURL ( ) ) |
validInputShouldPass ( ) { eu . inmite . android . lib . validations . RegExpValidatorTest . ModelWithValidation model = eu . inmite . android . lib . validations . RegExpValidatorTest . initModel ( ) ; model . txtNotNumber . setText ( "absd,/.';" ) ; model . editNumber . setText ( "0123456789" ) ; final boolean valid ... | org . junit . Assert . assertTrue ( valid ) |
test_plus_longPeriodUnit_zero ( ) { java . time . LocalDate t = TEST_2007_07_15 . plus ( 0 , ChronoUnit . DAYS ) ; "<AssertPlaceHolder>" ; } plus ( long , java . time . temporal . TemporalUnit ) { if ( unit instanceof java . time . temporal . ChronoUnit ) { java . time . temporal . ChronoUnit f = ( ( java . time . temp... | org . junit . Assert . assertSame ( t , TEST_2007_07_15 ) |
testIntValue ( ) { "<AssertPlaceHolder>" ; } intValue ( ) { return sun . util . logging . PlatformLogger . Level . LEVEL_VALUES [ this . ordinal ( ) ] ; } | org . junit . Assert . assertEquals ( 10 , new java . lang . Integer ( ( ( int ) ( 10 ) ) ) . intValue ( ) , 0 ) |
succeedsWhenInnerMatcherSucceeds ( ) { "<AssertPlaceHolder>" ; } isThrowable ( org . hamcrest . Matcher ) { return new org . junit . internal . matchers . StacktracePrintingMatcher < T > ( throwableMatcher ) ; } | org . junit . Assert . assertTrue ( org . junit . internal . matchers . StacktracePrintingMatcher . isThrowable ( org . hamcrest . CoreMatchers . any ( java . lang . Throwable . class ) ) . matches ( new java . lang . Exception ( ) ) ) |
testGetFeatureInfoRemoteWmsCachedGmlOutputValid ( ) { java . io . InputStream response = doGetFeatureInfo ( "remotewms_dominant_vegetation_cached" , "utah" , "57142.857142857145" , "application/gml+xml;<sp>version=3.1" ) ; java . lang . String [ ] schemaUrls = new java . lang . String [ 2 ] ; schemaUrls [ 0 ] = org . d... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
datumAanvangVerledenR1872 ( ) { final nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElement relatie = new nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElement ( nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElementTest . ATTRIBUTEN , new nl . bzk . brp . bijhouding . bericht .... | org . junit . Assert . assertEquals ( 0 , relatie . valideerInhoud ( ) . size ( ) ) |
testGetMessageAnnotationWhenMessageHasAnnotationsMap ( ) { java . util . Map < org . apache . qpid . proton . amqp . Symbol , java . lang . Object > messageAnnotationsMap = new java . util . HashMap ( ) ; messageAnnotationsMap . put ( org . apache . qpid . proton . amqp . Symbol . valueOf ( "x-opt-test" ) , Boolean . T... | org . junit . Assert . assertNotNull ( org . apache . activemq . artemis . protocol . amqp . converter . AMQPMessageSupport . getMessageAnnotation ( "x-opt-test" , message ) ) |
randomTest02 ( ) { long seed = java . lang . System . currentTimeMillis ( ) ; com . github . neuralnetworks . tensor . Matrix openClResult = randomTest ( Runtime . OPENCL , seed , 100000 , 1 , 10 , 10 ) ; com . github . neuralnetworks . tensor . Matrix seqResult = randomTest ( Runtime . CPU_SEQ , seed , 100000 , 1 , 10... | org . junit . Assert . assertTrue ( isEqual ( openClResult , seqResult ) ) |
cancelButtonDiscardsChanges ( ) { java . lang . String firstCellText = $ ( com . vaadin . testbench . elements . GridElement . class ) . first ( ) . getCell ( 0 , 0 ) . getText ( ) ; getRows ( ) . get ( 0 ) . findElement ( org . openqa . selenium . By . tagName ( "td" ) ) . click ( ) ; org . openqa . selenium . WebElem... | org . junit . Assert . assertEquals ( $ ( com . vaadin . testbench . elements . GridElement . class ) . first ( ) . getCell ( 0 , 0 ) . getText ( ) , firstCellText ) |
testFillTransform_EmptyMetricsList ( ) { com . salesforce . dva . argus . service . metric . transform . Transform fillTransform = new com . salesforce . dva . argus . service . metric . transform . FillTransform ( ) ; java . util . List < java . lang . String > constants = new java . util . ArrayList ( ) ; constants .... | org . junit . Assert . assertEquals ( metrics . size ( ) , 0 ) |
a_loadQueryRestrictionStrategyAsContainsTest ( ) { org . geosdi . geoplatform . connector . server . request . v110 . query . repository . QueryRestrictionStrategy < org . geosdi . geoplatform . xml . filter . v110 . ComparisonOpsType > containsStrategy = org . geosdi . geoplatform . connector . wfs . services . WFSQue... | org . junit . Assert . assertNotNull ( containsStrategy ) |
validateServiceImp4 ( ) { java . util . List < org . ebayopensource . turmeric . tools . codegen . validator . MessageObject > errMsgList = null ; try { org . ebayopensource . turmeric . tools . codegen . validator . SourceValidator . validateServiceImpl ( org . ebayopensource . turmeric . tools . codegen . SimpleServi... | org . junit . Assert . assertNull ( errMsgList ) |
testUsesHandlerAuthenticationScheme ( ) { java . security . Principal principal = mock ( java . security . Principal . class ) ; when ( authenticationHandler . getAuthenticationScheme ( ) ) . thenReturn ( SecurityContext . BASIC_AUTH ) ; when ( authenticationHandler . authenticate ( any ( javax . ws . rs . container . ... | org . junit . Assert . assertEquals ( SecurityContext . BASIC_AUTH , context . getAuthenticationScheme ( ) ) |
executeAndExtractWithMultipleResults ( ) { java . util . List < java . lang . String > results = java . util . Arrays . asList ( "one" , "two" , "three" ) ; org . springframework . data . gemfire . function . execution . AbstractFunctionExecution functionExecution = new org . springframework . data . gemfire . function... | org . junit . Assert . assertThat ( functionExecution . executeAndExtract ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "one" ) ) ) |
testShort1 ( ) { short [ ] target = new short [ ] { 2 , 1 , 0 } ; "<AssertPlaceHolder>" ; } quickSortP ( int [ ] ) { int [ ] permutation = new int [ target . length ] ; for ( int i = 1 ; i < ( target . length ) ; ++ i ) permutation [ i ] = i ; cc . redberry . rings . util . ArraysUtil . quickSort ( target , 0 , target ... | org . junit . Assert . assertArrayEquals ( new int [ ] { 2 , 1 , 0 } , cc . redberry . rings . util . ArraysUtil . quickSortP ( target ) ) |
testCreteEmbeddedServerFromConfig ( ) { org . apache . jackrabbit . oak . plugins . index . solr . configuration . SolrServerConfiguration < org . apache . jackrabbit . oak . plugins . index . solr . server . EmbeddedSolrServerProvider > embeddedSolrServerSolrServerConfiguration = new org . apache . jackrabbit . oak . ... | org . junit . Assert . assertNotNull ( embeddedSolrServerProvider ) |
testDeleteDeletedProperty ( ) { theirRoot . getTree ( "/" ) . removeProperty ( "a" ) ; ourRoot . getTree ( "/" ) . removeProperty ( "a" ) ; theirRoot . commit ( ) ; ourRoot . commit ( ) ; org . apache . jackrabbit . oak . api . PropertyState p = ourRoot . getTree ( "/" ) . getProperty ( "a" ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertNull ( p ) |
testIsEmptyOnNullValue ( ) { "<AssertPlaceHolder>" ; } isEmpty ( ) { return new com . annimon . stream . test . hamcrest . OptionalMatcher . IsEmptyMatcher ( ) ; } | org . junit . Assert . assertThat ( null , com . annimon . stream . test . hamcrest . OptionalMatcher . isEmpty ( ) ) |
testSetServiceRequestType ( ) { empty . setServiceRequestType ( "test" ) ; "<AssertPlaceHolder>" ; } getServiceRequestType ( ) { return this . serviceRequestType ; } | org . junit . Assert . assertEquals ( "test" , empty . getServiceRequestType ( ) ) |
testCollect ( ) { java . util . List < java . lang . String > strings = java . util . Arrays . asList ( "this" , "is" , "a" , "test" ) ; java . util . List < edu . jhu . pacaya . sch . util . Indexed < java . lang . String > > collected = new java . util . ArrayList ( edu . jhu . pacaya . sch . util . Indexed . collect... | org . junit . Assert . assertEquals ( expected , collected ) |
testGetSubVector ( ) { org . apache . commons . math4 . linear . RealVector u = createVector ( ) ; org . apache . commons . math4 . linear . RealVector v = org . apache . commons . math4 . linear . RealVector . unmodifiableRealVector ( u ) ; for ( int i = 0 ; i < ( org . apache . commons . math4 . linear . Unmodifiable... | org . junit . Assert . assertTrue ( org . apache . commons . math4 . linear . UnmodifiableRealVectorAbstractTest . equals ( exp , act ) ) |
test_withZone_same ( ) { java . time . Clock test = java . time . Clock . tick ( java . time . Clock . system ( test . java . time . TestClock_Tick . PARIS ) , java . time . Duration . ofMillis ( 500 ) ) ; java . time . Clock changed = test . withZone ( test . java . time . TestClock_Tick . PARIS ) ; "<AssertPlaceHolde... | org . junit . Assert . assertSame ( test , changed ) |
testJAXBElement ( ) { com . sun . jersey . api . client . WebResource webResource = resource ( ) ; com . sun . jersey . api . client . GenericType < javax . xml . bind . JAXBElement < com . sun . jersey . samples . jaxb . JAXBXmlType > > genericType = new com . sun . jersey . api . client . GenericType < javax . xml . ... | org . junit . Assert . assertEquals ( e1 . getValue ( ) , e2 . getValue ( ) ) |
testVersionRangeIntersectionSimpleNoOverlap ( ) { org . jboss . forge . furnace . versions . VersionRange versionRange1 = org . jboss . forge . furnace . versions . Versions . parseVersionRange ( "(10,20)" ) ; org . jboss . forge . furnace . versions . VersionRange versionRange2 = org . jboss . forge . furnace . versio... | org . junit . Assert . assertFalse ( overlap ) |
whenHasFacetNoSuperType ( ) { @ javax . jdo . annotations . Version class Child { } context . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockChildType ) . getCorrespondingClass ( ) ; inSequence ( sequence ) ; will ( returnValue ( Child . class ) ) ; oneOf ( mockChildType ) . superclass ( ) ; inSequence (... | org . junit . Assert . assertThat ( validationFailures . getNumberOfMessages ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testObservation ( ) { org . hl7 . fhir . instance . model . Observation o = new org . hl7 . fhir . instance . model . Observation ( ) ; o . addIdentifier ( ) . setSystem ( "http://acme.org" ) . setValue ( "1234" ) ; o . setStatus ( Observation . ObservationStatus . FINAL ) ; o . getCode ( ) . addCoding ( ) . setSystem ... | org . junit . Assert . assertTrue ( result . isSuccessful ( ) ) |
testInitOutBuffer ( ) { org . hawkular . apm . client . collector . internal . FragmentBuilder builder = new org . hawkular . apm . client . collector . internal . FragmentBuilder ( ) ; builder . initOutBuffer ( 1 ) ; "<AssertPlaceHolder>" ; } isOutBufferActive ( java . lang . Object ) { return collector ( ) . isOutBuf... | org . junit . Assert . assertTrue ( builder . isOutBufferActive ( 1 ) ) |
test3 ( ) { com . creactiviti . piper . core . task . SpelTaskEvaluator evaluator = new com . creactiviti . piper . core . task . SpelTaskEvaluator ( ) ; com . creactiviti . piper . core . task . TaskExecution jt = com . creactiviti . piper . core . task . SimpleTaskExecution . createFrom ( "hello" , "${name}" ) ; com ... | org . junit . Assert . assertEquals ( "arik" , evaluated . getString ( "hello" ) ) |
testBug56568b ( ) { getTomcatInstanceTestWebapp ( false , true ) ; int rc = methodUrl ( ( ( "http://localhost:" + ( getPort ( ) ) ) + "/test/jsp/error.jsp" ) , new org . apache . tomcat . util . buf . ByteChunk ( ) , 500000 , null , null , "PUT" ) ; "<AssertPlaceHolder>" ; } getPort ( ) { return tomcat . getConnector (... | org . junit . Assert . assertEquals ( 200 , rc ) |
emptyTopNodesShouldProduceEmptyList ( ) { com . graphaware . module . noderank . TopRankedNodes topNodes = new com . graphaware . module . noderank . TopRankedNodes ( ) ; topNodes . initializeIfNeeded ( null , getDatabase ( ) , com . graphaware . module . noderank . NodeRankModuleConfiguration . defaultConfiguration ( ... | org . junit . Assert . assertTrue ( topNodes . getTopNodes ( ) . isEmpty ( ) ) |
extract ( ) { oasis . names . tc . ebxml_regrep . xsd . rim . _3 . ExtrinsicObjectType extrinsicObject = createExtrinsicObject ( "size" , "value" ) ; javax . xml . bind . JAXBElement < oasis . names . tc . ebxml_regrep . xsd . rim . _3 . ExtrinsicObjectType > jaxbWrapper = wrapExtrinsicObject ( extrinsicObject ) ; gov ... | org . junit . Assert . assertEquals ( "value" , payloadSize . get ( ) ) |
testSaveUnicode ( ) { net . runelite . cache . script . Instructions instructions = new net . runelite . cache . script . Instructions ( ) ; instructions . init ( ) ; net . runelite . cache . definitions . ScriptDefinition script = new net . runelite . cache . script . assembler . Assembler ( instructions ) . assemble ... | org . junit . Assert . assertEquals ( script , loadedScripot ) |
testFind ( ) { prepareForQuery ( ) ; java . util . List < in . cubestack . apps . android . storm . entitites . TestEntity > response = baseService . findAll ( in . cubestack . apps . android . storm . entitites . TestEntity . class , in . cubestack . android . lib . storm . criteria . Order . orderFor ( in . cubestack... | org . junit . Assert . assertNotNull ( response ) |
ifNextProgrammeIsSelectedWhenCurrentIsEmptyReturnsNextProgrammeIterable ( ) { com . google . common . collect . ImmutableList . Builder < com . metabroadcast . atlas . glycerin . model . Programme > programmesList = com . google . common . collect . ImmutableList . builder ( ) ; org . atlasapi . remotesite . bbc . nitr... | org . junit . Assert . assertTrue ( programmes . hasNext ( ) ) |
setBasePathWithDash ( ) { javax . servlet . ServletContext servletContext = createMock ( javax . servlet . ServletContext . class ) ; expectGetResource ( servletContext , "src/test/resources/mustache/specs/" ) ; replay ( servletContext ) ; com . github . jknack . handlebars . io . TemplateSource source = new com . gith... | org . junit . Assert . assertNotNull ( source ) |
getLookupColumnName ( ) { "<AssertPlaceHolder>" ; } getLookupColumnName ( ) { return null ; } | org . junit . Assert . assertNull ( subject . getLookupColumnName ( ) ) |
testTotalEntriesWithMultipleRatingsEntries ( ) { java . lang . String className = com . liferay . portal . kernel . util . StringUtil . randomString ( ) ; long classPK = com . liferay . portal . kernel . test . util . RandomTestUtil . randomLong ( ) ; com . liferay . portal . kernel . service . ServiceContext serviceCo... | org . junit . Assert . assertEquals ( 2 , ratingsStats . getTotalEntries ( ) ) |
testNullAddsAreIgnored ( ) { final com . github . rnewson . couchdb . lucene . DocumentConverter converter = new com . github . rnewson . couchdb . lucene . DocumentConverter ( context , view ( "function(doc)<sp>{var<sp>ret=new<sp>Document();<sp>ret.add(doc.nope);<sp>return<sp>ret;}" ) ) ; final java . util . Collectio... | org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testPrepareExecution ( ) { org . teiid . language . Command command = org . teiid . translator . jdbc . TranslationHelper . helpTranslate ( TranslationHelper . BQT_VDB , "call<sp>native('select<sp>*<sp>from<sp>Source<sp>where<sp>e1<sp>=<sp>?',<sp>2)" ) ; java . sql . Connection connection = org . mockito . Mockito . mo... | org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { 5 , "five" } , ( ( java . lang . Object [ ] ) ( execution . next ( ) . get ( 0 ) ) ) ) |
testPostPublicMessageWithEmptyMessage ( ) { org . xwiki . eventstream . Event postedMessage = setupForPublicMessage ( ) ; this . stream . postPublicMessage ( "" ) ; "<AssertPlaceHolder>" ; } getBody ( ) { return this . body ; } | org . junit . Assert . assertEquals ( "" , postedMessage . getBody ( ) ) |
testGetWriteOpration ( ) { "<AssertPlaceHolder>" ; } getWriteOperation ( ) { return writeOperation ; } | org . junit . Assert . assertEquals ( operation , writer . getWriteOperation ( ) ) |
testLessThanRecordThresholdCount ( ) { int thresholdCount = 5 ; org . kaaproject . kaa . client . logging . LogStorageStatus logStorageStatus = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . logging . LogStorageStatus . class ) ; org . mockito . Mockito . when ( logStorageStatus . getRecordCount ( )... | org . junit . Assert . assertEquals ( strategy . checkUploadNeeded ( logStorageStatus ) , LogUploadStrategyDecision . NOOP ) |
testReadWronglyEncodedDatasetByChangingDefaultCharacterSet ( ) { org . dcm4che3 . data . Attributes a = new org . dcm4che3 . data . Attributes ( ) ; a . setString ( Tag . SpecificCharacterSet , VR . CS , "ISO<sp>2022<sp>IR<sp>6" ) ; java . lang . String NAME = "Äneas^Rüdiger" ; a . setBytes ( Tag . PatientName , VR . P... | org . junit . Assert . assertEquals ( NAME , a . getString ( Tag . PatientName ) ) |
verifySimpleGraphGeneration ( ) { final org . opennms . features . topology . plugins . topo . asset . NodeProvider nodeProvider = new org . opennms . features . topology . plugins . topo . asset . NodeProvider ( ) { @ org . opennms . features . topology . plugins . topo . asset . Override public java . util . List < o... | org . junit . Assert . assertEquals ( generatedGraphML , expectedGraphML ) |
testStartsWithName002 ( ) { java . lang . String test = "t=test,cn=test" ; javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( test ) ; javax . naming . ldap . LdapName n = new javax . naming . ldap . LdapName ( "cn=test" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ln . startsWith ( n ) ) |
testMockRun ( ) { if ( ( isCassandraRunning ( ) ) == false ) return ; java . net . URL url = getResource ( "etc/test-run.xml" ) ; "<AssertPlaceHolder>" ; org . jgroups . JChannel channel = new org . jgroups . JChannel ( url ) ; channel . setReceiver ( new org . jgroups . ReceiverAdapter ( ) { public void receive ( org ... | org . junit . Assert . assertNotNull ( url ) |
403 ( ) { try { com . fujitsu . dc . test . utils . CellUtils . create ( com . fujitsu . dc . test . jersey . cell . auth . MyPasswordTest . UNIT_USER_CELL , AbstractCase . MASTER_TOKEN_NAME , HttpStatus . SC_CREATED ) ; com . fujitsu . dc . test . utils . AccountUtils . create ( AbstractCase . MASTER_TOKEN_NAME , com ... | org . junit . Assert . assertEquals ( 403 , response . getStatusCode ( ) ) |
testGetUGIFromKerberosSubject ( ) { java . lang . String user1keyTabFilepath = ( java . lang . System . getProperty ( "kdc.resource.dir" ) ) + "/keytabs/user1.keytab" ; org . apache . hadoop . security . UserGroupInformation ugi = org . apache . hadoop . security . UserGroupInformation . loginUserFromKeytabAndReturnUGI... | org . junit . Assert . assertEquals ( doAsUserName , "user1@EXAMPLE.COM" ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.