Package com.asakusafw.testdriver.core

Examples of com.asakusafw.testdriver.core.VerifyContext


        };
    }

    private List<Difference> test(VerifierFactory factory, String... pattern) {
        try {
            Verifier v = factory.createVerifier(DEFINITION, new VerifyContext(CONTEXT));
            try {
                DataModelSource a = source(pattern);
                try {
                    return v.verify(a);
                } finally {
View Full Code Here


        return calendar;
    }

    @SuppressWarnings("unchecked")
    private static ValuePredicate<Object> parse(PropertyType type, String expr) throws FormatException {
        VerifyContext context = new VerifyContext(new TestContext.Empty());
        ExcelSheetOrdinalRule rule = new ExcelSheetOrdinalRule();
        return (ValuePredicate<Object>) rule.resolve(context, PropertyName.newInstance("testing"), type, expr);
    }
View Full Code Here

        parse(PropertyType.BOOLEAN, "~1");
    }

    @SuppressWarnings("unchecked")
    private static ValuePredicate<Object> parse(PropertyType type, String expr) throws FormatException {
        VerifyContext context = new VerifyContext(new TestContext.Empty());
        ExcelSheetApproximateRule rule = new ExcelSheetApproximateRule();
        return (ValuePredicate<Object>) rule.resolve(context, PropertyName.newInstance("testing"), type, expr);
    }
View Full Code Here

                executor.prepareInput(jobflowInfo, tester.inputs);
                executor.prepareOutput(jobflowInfo, tester.outputs);

                LOG.info("ジョブフローを実行しています: {}#{}",
                        batchDescriptionClass.getName(), flowId);
                VerifyContext verifyContext = new VerifyContext(driverContext);
                executor.runJobflow(jobflowInfo);
                verifyContext.testFinished();

                LOG.info("ジョブフローの実行結果を検証しています: {}#{}",
                        batchDescriptionClass.getName(), flowId);
                executor.verify(jobflowInfo, verifyContext, tester.outputs);
            }
View Full Code Here

        LOG.info("テストデータを配置しています: {}", driverContext.getCallerClass().getName());
        executor.prepareInput(jobflowInfo, inputs);
        executor.prepareOutput(jobflowInfo, outputs);

        LOG.info("フロー部品を実行しています: {}", flowDescription.getClass().getName());
        VerifyContext verifyContext = new VerifyContext(driverContext);
        executor.runJobflow(jobflowInfo);
        verifyContext.testFinished();

        // 実行結果の検証
        LOG.info("実行結果を検証しています: {}", driverContext.getCallerClass().getName());
        executor.verify(jobflowInfo, verifyContext, outputs);
    }
View Full Code Here

        LOG.info("テストデータを配置しています: {}", driverContext.getCallerClass().getName());
        executor.prepareInput(jobflowInfo, inputs);
        executor.prepareOutput(jobflowInfo, outputs);

        LOG.info("ジョブフローを実行しています: {}", jobFlowDescriptionClass.getName());
        VerifyContext verifyContext = new VerifyContext(driverContext);
        executor.runJobflow(jobflowInfo);
        verifyContext.testFinished();

        LOG.info("実行結果を検証しています: {}", driverContext.getCallerClass().getName());
        executor.verify(jobflowInfo, verifyContext, outputs);
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void value_today() throws Exception {
        // 2011/03/31 23:00:00 -> 23:30:00
        VerifyContext context = context(30);
        VerifyRule rule = rule("verify/value_today.xls", context);

        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(2011, 2, 30);
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void value_today_started_yesterday() throws Exception {
        // 2011/03/31 23:00:00 -> 2011/04/01 0:30:00
        VerifyContext context = context(90);
        VerifyRule rule = rule("verify/value_today.xls", context);

        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(2011, 2, 30);
View Full Code Here

     * @throws Exception if occur
     */
    @Test
    public void value_now() throws Exception {
        // 2011/03/31 23:00:00 -> 23:30:00
        VerifyContext context = context(30);
        VerifyRule rule = rule("verify/value_now.xls", context);

        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(2011, 2, 31, 0, 0, 0);
View Full Code Here

    private VerifyContext context(int elapsedMinutes) {
        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(2011, 2, 31, 23, 0, 0);
        VerifyContext result = new VerifyContext(new TestContext.Empty(), calendar.getTime());

        calendar.add(Calendar.MINUTE, elapsedMinutes);
        result.setTestFinished(calendar.getTime());
        return result;
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.testdriver.core.VerifyContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.