input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
numberProcedure ( ) { org . eclipse . collections . api . block . procedure . Procedure < java . lang . Integer > procedure = new org . eclipse . collections . impl . block . procedure . checked . CheckedProcedure < java . lang . Integer > ( ) { @ org . eclipse . collections . impl . block . procedure . checked . Overr... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , integer ) |
testSerialization ( ) { org . jfree . chart . labels . BoxAndWhiskerXYToolTipGenerator g1 = new org . jfree . chart . labels . BoxAndWhiskerXYToolTipGenerator ( ) ; org . jfree . chart . labels . BoxAndWhiskerXYToolTipGenerator g2 = ( ( org . jfree . chart . labels . BoxAndWhiskerXYToolTipGenerator ) ( org . jfree . ch... | org . junit . Assert . assertEquals ( g1 , g2 ) |
testTransform ( ) { final org . drools . core . spi . ObjectType type = new org . drools . core . base . ClassObjectType ( java . lang . String . class ) ; final org . drools . core . rule . Pattern a = new org . drools . core . rule . Pattern ( 0 , type , "a" ) ; final org . drools . core . rule . Pattern b = new org ... | org . junit . Assert . assertEquals ( correctResultAnds [ j ] , ands [ j ] ) |
getPortSuffix_SAML_SP ( ) { java . util . Map < java . lang . String , org . oscm . app . v2_0 . data . Setting > settings = getSettingsForMode ( "SAML_SP" ) ; java . lang . String actual = besDAO . getPortSuffix ( settings ) ; "<AssertPlaceHolder>" ; } getPortSuffix ( java . util . Map ) { if ( isSsoMode ( settings ) ... | org . junit . Assert . assertEquals ( "PortSTS" , actual ) |
testGetHystrixFailureType ( ) { com . liferay . dynamic . data . mapping . data . provider . internal . DDMDataProviderInvokerImpl ddmDataProviderInvoker = new com . liferay . dynamic . data . mapping . data . provider . internal . DDMDataProviderInvokerImpl ( ) ; com . netflix . hystrix . exception . HystrixRuntimeExc... | org . junit . Assert . assertEquals ( HystrixRuntimeException . FailureType . TIMEOUT , failureType ) |
foldRight ( ) { com . jnape . palatable . lambda . semigroup . Semigroup < java . lang . Integer > sum = ( x , y ) -> x + y ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 6 ) ) , sum . foldRight ( 0 , asList ( 1 , 2 , 3 ) ) ) |
test_createPomCreator_nullWinCP ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( IBuildPomCreatorParameters . PROCESSOR , new org . talend . designer . core . build . TestProcessor ( ) ... | org . junit . Assert . assertNull ( provider . createPomCreator ( parameters ) ) |
testGetReaderSchemaForReflect ( ) { java . lang . Class < java . lang . String > type = java . lang . String . class ; org . apache . avro . Schema writerSchema = org . apache . avro . reflect . ReflectData . get ( ) . getSchema ( java . lang . String . class ) ; org . apache . avro . Schema expResult = writerSchema ; ... | org . junit . Assert . assertEquals ( expResult , result ) |
testCommandHelp ( ) { int rc = run ( "test" , "--help" ) ; verify ( console ) . info ( "\nUsage:<sp>{}<sp>[general<sp>options]<sp>{}<sp>{}<sp>[command<sp>options]" , new java . lang . Object [ ] { Main . DEFAULT_PROGRAM_NAME , "test" , "<test<sp>dataset<sp>names>" } ) ; verify ( console ) . info ( contains ( "Descripti... | org . junit . Assert . assertEquals ( 0 , rc ) |
test ( ) { org . zkoss . zats . mimic . DesktopAgent desktop = connect ( ) ; org . zkoss . zats . mimic . ComponentAgent listbox = desktop . query ( "listbox" ) ; "<AssertPlaceHolder>" ; } query ( java . lang . String ) { final java . util . Iterator < org . zkoss . zk . ui . Component > found = org . zkoss . zk . ui .... | org . junit . Assert . assertTrue ( ( listbox != null ) ) |
metadataDocument ( ) { final org . apache . http . HttpResponse response = callUri ( "$metadata" ) ; checkMediaType ( response , HttpContentType . APPLICATION_XML_UTF8 ) ; "<AssertPlaceHolder>" ; notFound ( "$invalid" ) ; badRequest ( "$metadata?$format=atom" ) ; } getBody ( org . apache . http . HttpResponse ) { org .... | org . junit . Assert . assertFalse ( getBody ( response ) . isEmpty ( ) ) |
responseShouldHaveCachedValueSet ( ) { org . codehaus . httpcache4j . Headers headers = new org . codehaus . httpcache4j . Headers ( ) . add ( org . codehaus . httpcache4j . CacheHeaderBuilder . getBuilder ( ) . createHITXCacheHeader ( ) ) ; org . codehaus . httpcache4j . HTTPResponse response = new org . codehaus . ht... | org . junit . Assert . assertTrue ( response . isCached ( ) ) |
testIsSSLNoPrivateHeadersTrue ( ) { mock . checking ( new org . jmock . Expectations ( ) { { one ( conn ) . getRequest ( ) ; will ( returnValue ( request ) ) ; one ( conn ) . useTrustedHeaders ( ) ; will ( returnValue ( false ) ) ; one ( conn ) . getTrustedHeader ( "$WSSC" ) ; will ( returnValue ( "https" ) ) ; one ( c... | org . junit . Assert . assertTrue ( ssl ) |
shouldIgnoreUnknownBucketCapabilities ( ) { java . lang . String raw = com . couchbase . client . core . util . Resources . read ( "config_with_invalid_capability.json" , getClass ( ) ) ; com . couchbase . client . core . config . BucketConfig config = com . couchbase . client . core . config . parser . BucketConfigPar... | org . junit . Assert . assertEquals ( 1 , config . nodes ( ) . size ( ) ) |
testSerialization ( ) { org . jfree . chart . axis . MonthDateFormat mf1 = new org . jfree . chart . axis . MonthDateFormat ( ) ; org . jfree . chart . axis . MonthDateFormat mf2 = ( ( org . jfree . chart . axis . MonthDateFormat ) ( org . jfree . chart . TestUtilities . serialised ( mf1 ) ) ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertTrue ( mf1 . equals ( mf2 ) ) |
testShiftRangeNullFloat ( ) { final float [ ] array = null ; org . apache . commons . lang3 . ArrayUtils . shift ( array , 1 , 1 , 1 ) ; "<AssertPlaceHolder>" ; } shift ( boolean [ ] , int , int , int ) { if ( array == null ) { return ; } if ( ( startIndexInclusive >= ( ( array . length ) - 1 ) ) || ( endIndexExclusive... | org . junit . Assert . assertNull ( array ) |
deleteIndexVertexItem ( ) { final java . util . HashMap < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "key" , "name" ) ; parameters . put ( "value" , "0" ) ; parameters . put ( "id" , "1" ) ; final com . ti... | org . junit . Assert . assertFalse ( vertices . iterator ( ) . hasNext ( ) ) |
getParentVariableScope ( ) { "<AssertPlaceHolder>" ; } getVariableScope ( java . lang . String ) { switch ( codeOfScope ) { case "s" : return org . pentaho . di . trans . steps . scriptvalues_mod . ScriptValuesAddedFunctions . VariableScope . SYSTEM ; case "r" : return org . pentaho . di . trans . steps . scriptvalues_... | org . junit . Assert . assertEquals ( org . pentaho . di . trans . steps . scriptvalues_mod . ScriptValuesAddedFunctions . getVariableScope ( "p" ) , ScriptValuesAddedFunctions . VariableScope . PARENT ) |
testPOF ( ) { final java . lang . String query = "SELECT<sp>*<sp>{<sp>?s<sp><<sp>[<sp><name><sp>?n<sp>]<sp>}" ; final org . openrdf . sindice . query . parser . sparql . ast . ASTQueryContainer ast = org . openrdf . sindice . query . parser . sparql . ast . SyntaxTreeBuilder . parseQuery ( query ) ; final java . lang .... | org . junit . Assert . assertArrayEquals ( expectedVars , actualVars ) |
cascadeOnMethodReturningAParameterizedClassWithAGenericMethod ( mockit . CascadingWithGenericsTest$A ) { new mockit . Expectations ( ) { { a . getB ( ) . getValue ( ) ; result = "test" ; } } ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( "test" , a . getB ( ) . getValue ( ) ) |
testProcessNoOptions4 ( ) { java . util . List < java . lang . String > nonOptions = op . process ( com . google . common . collect . Lists . newArrayList ( "command" , "arg" , "arg" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( first ) != null ? first . count ( ) : 0 ; } | org . junit . Assert . assertEquals ( nonOptions . size ( ) , 2 ) |
countConsumerOnlyOnceIfMoreContractsMatchToSameConsumer ( ) { org . candlepin . model . Consumer c = createConsumer ( owner ) ; java . lang . String contr1 = "contract-1" ; java . lang . String contr2 = "contract-2" ; createProductAndBindItToConsumer ( owner , c , contr1 ) ; createProductAndBindItToConsumer ( owner , c... | org . junit . Assert . assertEquals ( 1 , count ) |
testMisc ( ) { "<AssertPlaceHolder>" ; new com . liferay . portal . kernel . portlet . PortletIdCodec ( ) ; } generateInstanceId ( ) { return com . liferay . portal . kernel . util . StringUtil . randomString ( 12 ) ; } | org . junit . Assert . assertNotNull ( com . liferay . portal . kernel . portlet . PortletIdCodec . generateInstanceId ( ) ) |
test_min ( ) { "<AssertPlaceHolder>" ; } min ( int [ ] ) { return org . nutz . lang . Maths . takeOne ( new org . nutz . lang . Maths . CompareSomeThing ( ) { public boolean compare ( int arg0 , int arg1 ) { return arg0 < arg1 ; } } , nums ) ; } | org . junit . Assert . assertEquals ( org . nutz . lang . Maths . min ( nums ) , ( - 4 ) ) |
testContentTypeEvaluationNullOperation ( ) { java . lang . String methodName = "testContentTypeEvaluationNullOperation" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( ( ( "***************<sp>START:<sp>" + methodName ) + "<sp>*****************" ) ) ; ddf . catalog . data . impl . MetacardImpl metacard = new... | org . junit . Assert . assertTrue ( ctp . matches ( testEvent ) ) |
interfaceNamesNull ( ) { com . navercorp . pinpoint . profiler . instrument . classreading . DefaultInternalClassMetadata classMetadata = new com . navercorp . pinpoint . profiler . instrument . classreading . DefaultInternalClassMetadata ( "java/lang/String" , "java/lang/Object" , null , java . util . Collections . < ... | org . junit . Assert . assertEquals ( 0 , classMetadata . getInterfaceInternalNames ( ) . size ( ) ) |
testGetMappingByNullIdReturnsNull ( ) { com . ocpsoft . pretty . faces . config . mapping . UrlMapping mapping2 = com . ocpsoft . pretty . faces . config . PrettyConfigTest . config . getMappingById ( null ) ; "<AssertPlaceHolder>" ; } getMappingById ( java . lang . String ) { if ( id != null ) { if ( id . startsWith (... | org . junit . Assert . assertEquals ( null , mapping2 ) |
removeIfTest ( ) { java . util . Collection < part2 . point . ColoredPoint > collection = new java . util . ArrayList ( ) ; collection . add ( new part2 . point . ColoredPoint ( 1.0 , 2.0 , 16711680 ) ) ; collection . add ( new part2 . point . ColoredPoint ( ( - 1.0 ) , ( - 2.0 ) , 255 ) ) ; collection . removeIf ( new... | org . junit . Assert . assertEquals ( 1 , collection . size ( ) ) |
testHybridisationSp3d1T ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( HYBRIDISATION_NUMBER , 4 ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; when ( atom . getHyb... | org . junit . Assert . assertTrue ( expr . matches ( atom ) ) |
testDisableCache ( ) { org . jboss . forge . addon . projects . Projects . disableCache ( ) ; "<AssertPlaceHolder>" ; } isCacheDisabled ( ) { return org . jboss . forge . addon . projects . Projects . cacheDisabledFlag ; } | org . junit . Assert . assertTrue ( org . jboss . forge . addon . projects . Projects . isCacheDisabled ( ) ) |
queue ( ) { final ru . lessons . lesson_12 . BlockQueue < ru . lessons . lesson_10 . User > queue = new ru . lessons . lesson_12 . BlockQueue < ru . lessons . lesson_10 . User > ( ) ; final java . util . List < ru . lessons . lesson_12 . BlockQueueTest . Customer > customers = java . util . Arrays . asList ( new ru . l... | org . junit . Assert . assertEquals ( count , producer . size ( ) ) |
testGetColor ( ) { System . out . println ( "getColor" ) ; java . awt . Color expResult = java . awt . Color . CYAN ; mudmap2 . backend . PlaceGroup instance = new mudmap2 . backend . PlaceGroup ( "myGroup" , expResult ) ; java . awt . Color result = instance . getColor ( ) ; "<AssertPlaceHolder>" ; } getColor ( ) { re... | org . junit . Assert . assertEquals ( expResult , result ) |
testSerialization ( ) { org . jfree . chart . labels . IntervalCategoryToolTipGenerator g1 = new org . jfree . chart . labels . IntervalCategoryToolTipGenerator ( "{3}<sp>-<sp>{4}" , java . text . DateFormat . getInstance ( ) ) ; org . jfree . chart . labels . IntervalCategoryToolTipGenerator g2 = ( ( org . jfree . cha... | org . junit . Assert . assertEquals ( g1 , g2 ) |
CallFromInnerClass ( ) { java . lang . String fromClass = "Domain.Direct.Violating.CallFromInnerClass.CallingInnerClass" ; java . lang . String toClass = "Technology.Direct.Dao.CallInstanceOuterClassDAO.CallInstanceInnerClassDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayLi... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
testGridWithZeroLengthANDEmptyDelimiter_fail ( ) { expected = "Length<sp>should<sp>not<sp>be<sp>zero<sp>or<sp>negative" ; mixedSchemeGridRule . validate ( getSchema ( "0" , "" ) , "schema" ) ; "<AssertPlaceHolder>" ; } getErrorMessage ( ) { return errorMessage ; } | org . junit . Assert . assertEquals ( expected , mixedSchemeGridRule . getErrorMessage ( ) ) |
testGetFragmentSortColumnAllTypes ( ) { for ( org . sagebionetworks . repo . model . entity . SortBy sort : org . sagebionetworks . repo . model . entity . SortBy . values ( ) ) { java . lang . String result = org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . getFragmentSortColumn ( sort ) ; "<AssertPlac... | org . junit . Assert . assertNotNull ( result ) |
testBind ( ) { control . bind ( session ) ; "<AssertPlaceHolder>" ; verify ( editor ) . bind ( session ) ; verify ( canvasHandler ) . addDomainObjectListener ( any ( org . kie . workbench . common . stunner . core . client . canvas . listener . CanvasDomainObjectListener . class ) ) ; } getExpressionEditor ( ) { return... | org . junit . Assert . assertNotNull ( control . getExpressionEditor ( ) ) |
testSelect3 ( ) { org . la4j . matrix . Matrix a = matrixA ( ) ; int [ ] rowInd = new int [ ] { 1 , 3 , 4 } ; int [ ] colInd = new int [ ] { 0 , 1 , 2 , 3 , 4 , 5 } ; org . la4j . matrix . Matrix b = m ( org . la4j . matrix . MatrixTest . a ( 3.96 , 8.26 , 2.51 , 9.61 , 4.63 , 6.12 ) , org . la4j . matrix . MatrixTest ... | org . junit . Assert . assertEquals ( b , a . select ( rowInd , colInd ) ) |
testValidateClassImplementingCloneable ( ) { java . util . Set < javax . validation . ConstraintViolation < org . apache . bval . jsr . ValidationTest . TestCloneableClass > > errors = validator . validate ( new org . apache . bval . jsr . ValidationTest . TestCloneableClass ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ... | org . junit . Assert . assertTrue ( errors . isEmpty ( ) ) |
testRegisterCustomerForSupplierMailServerNotAvailable ( ) { container . login ( java . lang . String . valueOf ( supplier1User . getKey ( ) ) , org . oscm . accountservice . bean . ROLE_SERVICE_MANAGER ) ; org . oscm . internal . vo . VOOrganization org = new org . oscm . internal . vo . VOOrganization ( ) ; org . setL... | org . junit . Assert . assertEquals ( customersBefore , customersAfter ) |
testGetPolicyTransformer ( ) { gov . hhs . fha . nhinc . orchestration . Orchestratable instance = new gov . hhs . fha . nhinc . orchestration . OrchestratableTest . OrchestratableImpl ( ) ; gov . hhs . fha . nhinc . orchestration . PolicyTransformer expResult = null ; gov . hhs . fha . nhinc . orchestration . PolicyTr... | org . junit . Assert . assertEquals ( expResult , result ) |
testChannelDescriptor ( ) { org . eclipse . kura . internal . driver . eddystone . EddystoneDriver svc = new org . eclipse . kura . internal . driver . eddystone . EddystoneDriver ( ) ; @ org . eclipse . kura . internal . driver . eddystone . SuppressWarnings ( "unchecked" ) java . util . List < org . eclipse . kura . ... | org . junit . Assert . assertEquals ( 1 , elements . size ( ) ) |
nary_in_int_array_returns_true_when_field_value_matches_expression ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field6.nf3','op':'$in','values':[1,2,3,4]}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = c... | org . junit . Assert . assertTrue ( ctx . getResult ( ) ) |
testAssertionGroupsRequestWithInternalArtifact_Negative ( ) { System . out . println ( "\n***Starting<sp>testAssertionGroupsRequestWithInternalArtifact_Negative" ) ; org . ebayopensource . turmeric . services . assertionsservice . junit . ApplyAssertionGroupsRequest request = new org . ebayopensource . turmeric . servi... | org . junit . Assert . assertEquals ( org . ebayopensource . turmeric . services . assertionsservice . junit . PASS , result ) |
missingAnnotationTest ( ) { when ( identity . isLoggedIn ( ) ) . thenReturn ( true ) ; when ( authenticatorInstance . isUnsatisfied ( ) ) . thenReturn ( false ) ; when ( authenticatorInstance . get ( ) ) . thenReturn ( mock ( org . picketlink . authentication . Authenticator . class ) ) ; "<AssertPlaceHolder>" ; } reso... | org . junit . Assert . assertTrue ( ( ( resolver . resolve ( ) ) == null ) ) |
testSetLifecyclePaused ( ) { status . pauseMessageProcessing ( false ) ; "<AssertPlaceHolder>" ; verify ( eventBus ) . post ( Lifecycle . PAUSED ) ; } isProcessing ( ) { return isProcessing . get ( ) ; } | org . junit . Assert . assertFalse ( status . isProcessing ( ) ) |
testHandlesExtensions ( ) { java . io . File crlToChange = writeCRL ( createCRL ( ) ) ; org . candlepin . util . X509CRLStreamWriter stream = fileConstructor . newInstance ( crlToChange , ( ( java . security . interfaces . RSAPrivateKey ) ( keyPair . getPrivate ( ) ) ) , ( ( java . security . interfaces . RSAPublicKey ... | org . junit . Assert . assertEquals ( expected , discoveredSerials ) |
shouldGenerateAlternateElementsDueToGivenFunction ( ) { final com . google . common . base . Function < org . joda . time . LocalDate , org . joda . time . LocalDate > NEXT_WORKING_DAY = new com . google . common . base . Function < org . joda . time . LocalDate , org . joda . time . LocalDate > ( ) { @ com . qcadoo . ... | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( thursday , friday , monday , tuesday ) , nextFourDays ) |
testCopyForAtPre ( ) { org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceString . msg = org . dresdenocl . modelinstancetype . test . msg . ModelInstanceTypeTestSuiteMessages . TestModelInstanceString_CopyForAtPreIsWrong ; for ( org . dresdenocl . modelinstancetype . types . IModelInstanceString aS... | org . junit . Assert . assertNotNull ( org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceString . msg , aString . copyForAtPre ( ) ) |
testRemoveDisambiguation ( ) { java . lang . String content = "{{OtherTopics|Upgrade<sp>Instructions}}\ntest" ; java . lang . String expected = "\ntest" ; java . lang . String actual = _translate ( content ) ; "<AssertPlaceHolder>" ; } _translate ( com . liferay . portal . kernel . exception . PortalException ) { if ( ... | org . junit . Assert . assertEquals ( expected , actual ) |
testDateFunction ( ) { java . lang . String startDateString = "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" ; java . lang . String endDateString = "Wed<sp>Apr<sp>9<sp>10:30:57<sp>GMT<sp>2014" ; java . lang . String UPTIME = "UPTIME." ; java . lang . String dateFormat = "%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y" ; java . ... | org . junit . Assert . assertEquals ( "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 2 , sql ) |
test_api_keys_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . GET ) ; request . set... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
testReturnOriginalStateOne ( ) { final com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; final com . orientechnologies . orient . core . db . record . OTrackedList < java . lang . String > trackedList = new com . orien... | org . junit . Assert . assertEquals ( original , trackedList . returnOriginalState ( firedEvents ) ) |
getBijhoudingsaardTestOK ( ) { final nl . bzk . migratiebrp . conversie . model . brp . attribuut . BrpBijhoudingsaardCode baCode = nl . bzk . migratiebrp . conversie . model . brp . attribuut . BrpBijhoudingsaardCode . INGEZETENE ; final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Bi... | org . junit . Assert . assertEquals ( expected , resultAt ) |
interceptCall_restoresIfListenerThrows ( ) { io . grpc . Context origContext = io . grpc . Context . current ( ) ; final io . grpc . ServerCall . Listener < java . lang . Object > listener = new io . grpc . ServerCall . Listener < java . lang . Object > ( ) { @ java . lang . Override public void onMessage ( java . lang... | org . junit . Assert . assertSame ( origContext , io . grpc . Context . current ( ) ) |
step5_testUpdateMetadata ( ) { java . util . concurrent . ConcurrentHashMap < java . lang . String , org . apache . vxquery . runtime . functions . index . update . XmlMetadata > fromFileMap = org . apache . vxquery . indexing . MetaFileUtilTest . metaFileUtil . getMetadata ( ) ; org . apache . vxquery . runtime . func... | org . junit . Assert . assertNotNull ( org . apache . vxquery . indexing . MetaFileUtilTest . metaFileUtil . getMetadata ( ) ) |
executeJarExitException ( ) { int [ ] exitCode = new int [ ] { - 1 } ; org . spincast . plugins . processutils . JarExecutionHandlerDefault handler = new org . spincast . plugins . processutils . JarExecutionHandlerDefault ( ) { @ org . spincast . plugins . processutils . tests . Override public void onExit ( int exitV... | org . junit . Assert . assertEquals ( 1 , exitCode [ 0 ] ) |
testGetVertex ( ) { System . out . println ( "--<sp>testGetVertex" ) ; com . tinkerpop . blueprints . Vertex v_1 = com . couchbase . graph . CBGraphTest . graph . addVertex ( "tgv_1" ) ; System . out . println ( ( "v_1<sp>=<sp>" + ( v_1 . toString ( ) ) ) ) ; com . tinkerpop . blueprints . Vertex v_1_2 = com . couchbas... | org . junit . Assert . assertEquals ( v_1 . toString ( ) , v_1_2 . toString ( ) ) |
roundTripOfCustomModelWithNegativeDomPattern ( ) { java . lang . Object model = net . time4j . tz . threeten . NegativeDayOfMonthPatternTest . createModel ( ) ; java . lang . Object copy = net . time4j . tz . threeten . NegativeDayOfMonthPatternTest . roundtrip ( model ) ; "<AssertPlaceHolder>" ; } roundtrip ( java . l... | org . junit . Assert . assertThat ( model , org . hamcrest . CoreMatchers . is ( copy ) ) |
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . TeamDomainChangeEvent event = new com . github . seratch . jslack . api . model . event . TeamDomainChangeEvent ( ) ; java . lan... | org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . sync . model . SyncDevice . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . por... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testJoinElementsNull ( ) { java . util . Set < java . lang . String > elements = null ; java . lang . String separator = "," ; java . lang . String join = com . erudika . para . utils . filters . CORSFilter . join ( elements , separator ) ; "<AssertPlaceHolder>" ; } join ( java . util . Collection , java . lang . Strin... | org . junit . Assert . assertNull ( join ) |
testBadInit15 ( ) { thrown . expect ( org . apache . kylin . cube . IllegalStateException . class ) ; org . apache . kylin . cube . model . CubeDesc cubeDesc = org . apache . kylin . cube . CubeDescManager . getInstance ( getTestConfig ( ) ) . getCubeDesc ( org . apache . kylin . cube . CubeDescTest . CUBE_WITH_SLR_DES... | org . junit . Assert . assertEquals ( measureForTransCnt . getName ( ) , "TRANS_CNT" ) |
testJavaPathCmd ( ) { org . junit . Assume . assumeTrue ( com . dslplatform . compiler . client . Utils . isWindows ( ) ) ; context . put ( JavaPath . INSTANCE , ( ( com . dslplatform . compiler . client . parameters . JavaPathTest . fakeJavaPath ) + "/cmd" ) ) ; "<AssertPlaceHolder>" ; } check ( com . dslplatform . co... | org . junit . Assert . assertTrue ( JavaPath . INSTANCE . check ( context ) ) |
testCount ( ) { int total = dao . count ( ) ; "<AssertPlaceHolder>" ; } count ( ) { long c = ( ( java . lang . Long ) ( currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . ArrayRun . class ) . setProjection ( org . hibernate . criterion . Projections . rowCount ( ) ) . uniqueResult ( ) )... | org . junit . Assert . assertEquals ( 3 , total ) |
testGetGreetingCorrectActionCapital ( ) { when ( mockEditor . composeEmail ( ) ) . thenReturn ( "test<sp>email" ) ; java . lang . String reply = emailController . getGreeting ( "COMPOSE" ) ; "<AssertPlaceHolder>" ; } composeEmail ( ) { return "hola<sp>mundo" ; } | org . junit . Assert . assertEquals ( "test<sp>email" , reply ) |
testInvalidAssociationEnd ( ) { when ( plugin . isAssociationEnd ( org . mockito . Mockito . any ( org . slc . sli . modeling . tools . xmigen . ClassType . class ) , org . mockito . Mockito . any ( org . slc . sli . modeling . tools . xmigen . Attribute . class ) , org . mockito . Mockito . any ( org . slc . sli . mod... | org . junit . Assert . assertNotNull ( org . slc . sli . modeling . tools . xmigen . Xsd2UmlLinker . link ( model , plugin ) ) |
testDuplicateTestResults ( ) { hudson . tasks . Maven . MavenInstallation mavenInstallation = configureMaven3x ( ) ; hudson . maven . MavenModuleSet m = j . jenkins . createProject ( hudson . maven . MavenModuleSet . class , "p" ) ; m . setMaven ( mavenInstallation . getName ( ) ) ; m . getReporters ( ) . add ( new hud... | org . junit . Assert . assertEquals ( 4 , totalCount ) |
returnsFalseWhenLockingNullPatient ( ) { org . mockito . Mockito . doReturn ( null ) . when ( this . patientDocument ) . getXObject ( org . mockito . Matchers . < org . xwiki . model . reference . EntityReference > any ( ) ) ; org . mockito . Mockito . doReturn ( true ) . when ( this . entityAccess ) . hasAccessLevel (... | org . junit . Assert . assertFalse ( mockedLockManager . lockPatientRecord ( null ) ) |
testWhereClauseWithParenthesis ( ) { org . nuxeo . ecm . core . query . sql . model . SQLQuery query = org . nuxeo . ecm . core . query . sql . SQLQueryParser . parse ( "SELECT<sp>p1,<sp>p2<sp>FROM<sp>t<sp>WHERE<sp>(title<sp>=<sp>\"test\"<sp>OR<sp>p2<sp>>=<sp>10.2)<sp>AND<sp>p1<sp>+<sp>p2<sp><<sp>5" ) ; org . nuxeo . e... | org . junit . Assert . assertEquals ( myquery , query ) |
testDangelchevCentralityStream ( ) { org . neo4j . graphdb . Result result = org . neo4j . graphalgo . algo . EmptyGraphIntegrationTest . db . execute ( ( ( "CALL<sp>algo.closeness.dangalchev.stream('',<sp>'',<sp>{graph:'" + ( graphImpl ) ) + "'})" ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( offset ) < ( nod... | org . junit . Assert . assertFalse ( result . hasNext ( ) ) |
testMapWrapper ( ) { try ( net . openhft . chronicle . queue . impl . single . ChronicleQueue syncQ = builder ( getTmpDir ( ) , this . wireType ) . build ( ) ) { net . openhft . chronicle . queue . impl . single . File name2 = net . openhft . chronicle . queue . impl . single . DirectoryUtils . tempDir ( testName . get... | org . junit . Assert . assertEquals ( 1.2 , object . map . get ( "hello" ) , 0.0 ) |
testDestMicroservice ( ) { requestHeader . setDestMicroservice ( "test" ) ; "<AssertPlaceHolder>" ; } getDestMicroservice ( ) { return destMicroservice ; } | org . junit . Assert . assertEquals ( "test" , requestHeader . getDestMicroservice ( ) ) |
testToString ( ) { java . lang . StringBuilder expectedString = new java . lang . StringBuilder ( ) ; int size = this . classUnderTest ( ) . size ( ) ; for ( char each = 0 ; each < size ; each ++ ) { expectedString . append ( ( ( char ) ( each + ( ( char ) ( 1 ) ) ) ) ) ; } "<AssertPlaceHolder>" ; } toString ( ) { retu... | org . junit . Assert . assertEquals ( expectedString . toString ( ) , this . classUnderTest ( ) . toString ( ) ) |
testLookupFilter ( ) { org . pentaho . di . connections . vfs . VFSLookupFilter vfsLookupFilter = new org . pentaho . di . connections . vfs . VFSLookupFilter ( ) ; vfsLookupFilter . addKeyLookup ( org . pentaho . di . connections . ConnectionManagerTest . EXAMPLE , org . pentaho . di . connections . ConnectionManagerT... | org . junit . Assert . assertEquals ( org . pentaho . di . connections . ConnectionManagerTest . TestConnectionProvider . SCHEME , connectionManager . getLookupKey ( org . pentaho . di . connections . ConnectionManagerTest . EXAMPLE ) ) |
test_getIntersections_Line ( ) { org . eclipse . gef . geometry . planar . Line l = new org . eclipse . gef . geometry . planar . Line ( 100.0 , 150.0 , 550.0 , 150.0 ) ; org . eclipse . gef . geometry . planar . CubicCurve c = new org . eclipse . gef . geometry . planar . CubicCurve ( 504.0 , 225.0 , 504.0 , 150.94119... | org . junit . Assert . assertEquals ( 1 , inters . length ) |
parseJsonString_NoValues ( ) { org . oscm . json . JsonObject jsonObj = jsonConverter . parseJsonString ( org . oscm . json . JsonConverterTest . JSON_STRING_PARAMS_ID_NULLVALUE ) ; java . util . List < org . oscm . json . JsonParameter > params = jsonObj . getParameters ( ) ; for ( org . oscm . json . JsonParameter p ... | org . junit . Assert . assertNull ( p . getValue ( ) ) |
testParseValid ( ) { for ( final java . lang . String url : org . mycore . datamodel . common . MCRDataURLTest . VALID ) { try { org . mycore . datamodel . common . MCRDataURL dataURL = org . mycore . datamodel . common . MCRDataURL . parse ( url ) ; "<AssertPlaceHolder>" ; } catch ( java . nio . charset . IllegalChars... | org . junit . Assert . assertNotNull ( dataURL ) |
testContextWorkspaceName ( ) { final java . lang . String user = "hendrix" ; org . uberfire . workspace . WorkspaceContext . set ( user ) ; java . lang . String name = this . resolver . getWorkspaceName ( ) ; "<AssertPlaceHolder>" ; } getWorkspaceName ( ) { try { org . uberfire . rpc . SessionInfo sessionInfo = getSess... | org . junit . Assert . assertEquals ( user , name ) |
testGetNoValueSnak ( ) { org . wikidata . wdtk . datamodel . helpers . NoValueSnak o1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeNoValueSnak ( factory . getPropertyIdValue ( "P42" , "foo" ) ) ; org . wikidata . wdtk . datamodel . helpers . NoValueSnak o2 = factory . getNoValueSnak ( factory . getPr... | org . junit . Assert . assertEquals ( o1 , o2 ) |
testStubbingSpiedInstance ( org . jukito . BindSpyTest$SimpleClass ) { doReturn ( "Mocked<sp>string" ) . when ( simpleClass ) . callTestMethodOnMock ( ) ; java . lang . String result = simpleClass . callTestMethodOnMock ( ) ; "<AssertPlaceHolder>" ; verify ( mockA , never ( ) ) . test ( ) ; verify ( mockB , never ( ) )... | org . junit . Assert . assertEquals ( "Mocked<sp>string" , result ) |
testSearchQualifiedWithCustomReferenceParam ( ) { ca . uhn . fhir . jpa . provider . r4 . SearchParameter fooSp = new ca . uhn . fhir . jpa . provider . r4 . SearchParameter ( ) ; fooSp . addBase ( "Observation" ) ; fooSp . setCode ( "foo" ) ; fooSp . setType ( org . hl7 . fhir . r4 . model . Enumerations . SearchParam... | org . junit . Assert . assertThat ( foundResources , org . hamcrest . Matchers . contains ( obsId1 . getValue ( ) ) ) |
testListPlaceholderTilde ( ) { final ch . cyberduck . core . s3 . Path container = new ch . cyberduck . core . s3 . Path ( "test-us-east-1-cyberduck" , java . util . EnumSet . of ( Path . Type . directory , Path . Type . volume ) ) ; container . attributes ( ) . setRegion ( "us-east-1" ) ; final ch . cyberduck . core .... | org . junit . Assert . assertTrue ( list . isEmpty ( ) ) |
testHour ( ) { edu . ucla . sspace . util . TimeSpan ts = new edu . ucla . sspace . util . TimeSpan ( "1h" ) ; java . util . Calendar now = java . util . Calendar . getInstance ( ) ; java . util . Calendar lessThanHourFromNow = java . util . Calendar . getInstance ( ) ; lessThanHourFromNow . add ( Calendar . MINUTE , 1... | org . junit . Assert . assertTrue ( ts . insideRange ( now , lessThanHourFromNow ) ) |
testEmail ( ) { for ( int i = 0 ; i < ( lorem . LoremTest . LOOP_TIMES ) ; i ++ ) { java . lang . String s = lorem . getEmail ( ) ; notBlank ( s ) ; "<AssertPlaceHolder>" ; } } notBlank ( java . lang . String ) { org . junit . Assert . assertNotNull ( s ) ; assertNotEquals ( "" , s . trim ( ) ) ; } | org . junit . Assert . assertFalse ( s , s . contains ( "<sp>" ) ) |
testDdl_TYPE_MONEY ( ) { java . lang . String ddl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>ONE_TYPE<sp>(" + ( org . teiid . designer . vdb . dynamic . TestModelToDdlGenerator . BQT2_TYPE_DDL . TYPE_MONEY ) ) + ")<sp>OPTIONS(UPDATABLE<sp>'TRUE');" ; java . lang . String expectedDdl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>ONE_TYPE<... | org . junit . Assert . assertEquals ( expectedDdl , generatedDdl ) |
testSerialization ( ) { org . jfree . data . KeyedObject ko1 = new org . jfree . data . KeyedObject ( "Test" , "Object" ) ; org . jfree . data . KeyedObject ko2 = ( ( org . jfree . data . KeyedObject ) ( org . jfree . chart . TestUtils . serialised ( ko1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Obje... | org . junit . Assert . assertEquals ( ko1 , ko2 ) |
testFindByJob ( ) { com . salesforce . dva . argus . service . HistoryService historyService = system . getServiceFactory ( ) . getHistoryService ( ) ; com . salesforce . dva . argus . service . UserService userService = system . getServiceFactory ( ) . getUserService ( ) ; com . salesforce . dva . argus . service . Al... | org . junit . Assert . assertEquals ( expected , actual ) |
writeBeanInvalidValue_hasBindings_singleEvent ( ) { binder . forField ( nameField ) . withValidator ( ( name ) -> false , "" ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . readBean ( item ) ; binder . addStatusChangeListener ( this :: statusChanged ) ; "<AssertPlaceHolder>" ; try { binder . wri... | org . junit . Assert . assertNull ( event . get ( ) ) |
emptyPatientExportTest ( ) { org . oscarehr . e2e . model . PatientExport patientExport = new org . oscarehr . e2e . model . PatientExport ( Constants . Runtime . EMPTY_DEMOGRAPHIC ) ; "<AssertPlaceHolder>" ; } isLoaded ( ) { return loaded ; } | org . junit . Assert . assertTrue ( patientExport . isLoaded ( ) ) |
getBestLocaleNotSupported ( ) { org . pdfsam . i18n . DefaultI18nContext victim = new org . pdfsam . i18n . DefaultI18nContext ( ) ; java . util . Locale . setDefault ( Locale . CANADA ) ; "<AssertPlaceHolder>" ; } getBestLocale ( ) { if ( org . pdfsam . i18n . DefaultI18nContext . SUPPORTED_LOCALES . contains ( java .... | org . junit . Assert . assertEquals ( Locale . UK , victim . getBestLocale ( ) ) |
patch_A$int$Seq$int ( ) { com . m3 . scalaflavor4j . Nil < java . lang . String > nil = com . m3 . scalaflavor4j . Nil . < java . lang . String > apply ( ) ; int from = 2 ; com . m3 . scalaflavor4j . Seq < java . lang . String > patch = com . m3 . scalaflavor4j . Seq . apply ( "a" , "b" , "c" ) ; int replaced = 3 ; com... | org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 3 ) ) ) |
testEncodeDecodeModQ ( ) { int [ ] coeffs = net . sf . ntru . polynomial . PolynomialGeneratorForTesting . generateRandomPositive ( 1000 , 2048 ) . coeffs ; byte [ ] data = net . sf . ntru . util . ArrayEncoder . encodeModQ ( coeffs , 2048 ) ; int [ ] coeffs2 = net . sf . ntru . util . ArrayEncoder . decodeModQ ( data ... | org . junit . Assert . assertArrayEquals ( coeffs , coeffs2 ) |
testFindActive ( ) { int active1 = 1 ; int active2 = 2 ; org . oscarehr . common . model . ReportTemplates reportTemp1 = new org . oscarehr . common . model . ReportTemplates ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( reportTemp1 ) ; reportTemp1 . setActive ( act... | org . junit . Assert . assertTrue ( true ) |
testWaitForDependenciesUnfilled ( ) { com . liferay . registry . Registry registry = com . liferay . registry . RegistryUtil . getRegistry ( ) ; final com . liferay . registry . dependency . ServiceDependencyManager serviceDependencyManager = new com . liferay . registry . dependency . ServiceDependencyManager ( ) ; fi... | org . junit . Assert . assertFalse ( dependenciesSatisfied . get ( ) ) |
testContainsReturnsFalseWhenLessThanMinX ( ) { com . github . davidmoten . rtree . geometry . Rectangle r = com . github . davidmoten . rtree . geometry . Geometries . rectangle ( 10 , 20 , 30 , 40 ) ; "<AssertPlaceHolder>" ; } contains ( double , double ) { return ( ( this . x ) == x ) && ( ( this . y ) == y ) ; } | org . junit . Assert . assertFalse ( r . contains ( 9 , 30 ) ) |
menuSizeForUnitAdmin ( ) { doReturn ( Boolean . FALSE ) . when ( ctrl ) . isLoggedInAndAdmin ( ) ; doReturn ( Boolean . FALSE ) . when ( ctrl ) . isLoggedInAndSubscriptionManager ( ) ; doReturn ( Boolean . TRUE ) . when ( ctrl ) . isLoggedInAndUnitAdmin ( ) ; ctrl . getModel ( ) ; int visibleLinks = 0 ; for ( int i = 0... | org . junit . Assert . assertEquals ( 6 , visibleLinks ) |
testGetDatasetLookupEmpty ( ) { metadata . setDataset ( true ) ; org . mockito . Mockito . when ( fieldBean . getFields ( metadata ) ) . thenReturn ( fields ) ; org . mockito . Mockito . when ( chunkBean . get ( metadata , 1 ) ) . thenReturn ( result ) ; org . mockito . Mockito . when ( parameterMap . containsKey ( "fi... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testNormalOperation ( ) { boolean expected = true ; boolean result = org . slieb . throwables . BooleanSupplierWithThrowable . castBooleanSupplierWithThrowable ( ( ) -> expected ) . thatReturnsOnCatch ( false ) . getAsBoolean ( ) ; "<AssertPlaceHolder>" ; } getAsBoolean ( ) { try { return getAsBooleanWithThrowable ( ) ... | org . junit . Assert . assertEquals ( expected , result ) |
testJiraAwareFailureContains ( ) { JiraAwareFailureUtils . jiraMatches . put ( "TEST<sp>UNIQUE<sp>TEST" , "KULRICE-TEST2" ) ; org . kuali . rice . testtools . common . JiraAwareFailureUtils . failOnMatchedJira ( "TEST<sp>UNIQUE<sp>TEST" , this ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Class ) { return ( ge... | org . junit . Assert . assertTrue ( message . contains ( "KULRICE-TEST2" ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.