Package com.asakusafw.yaess.flowlog

Examples of com.asakusafw.yaess.flowlog.FlowLoggerProfile


    @Test
    public void convert() throws Exception {
        Map<String, String> conf = map(KEY_DIRECTORY, folder.getRoot().getAbsolutePath());
        Map<String, String> vars = map();
        ServiceProfile<FlowLoggerProvider> sp = profile(conf, vars);
        FlowLoggerProfile profile = FlowLoggerProfile.convert(sp);

        assertThat(profile.getDirectory().getCanonicalFile(), is(folder.getRoot().getCanonicalFile()));
        assertThat(profile.getEncoding(), is(Charset.forName(DEFAULT_ENCODING)));
        assertThat(profile.getDateFormat(), is((DateFormat) new SimpleDateFormat(DEFAULT_DATE_FORMAT)));
        assertThat(profile.getStepUnit(), closeTo(Double.parseDouble(DEFAULT_STEP_UNIT), 0.00001));
        assertThat(profile.isReportJob(), is(Boolean.parseBoolean(DEFAULT_REPORT_JOB)));
        assertThat(profile.isDeleteOnSetup(), is(Boolean.parseBoolean(DEFAULT_DELETE_ON_SETUP)));
        assertThat(profile.isDeleteOnCleanup(), is(Boolean.parseBoolean(DEFAULT_DELETE_ON_CLEANUP)));
    }
View Full Code Here


                KEY_REPORT_JOB, "false",
                KEY_DELETE_ON_SETUP, "false",
                KEY_DELETE_ON_CLEANUP, "false");
        Map<String, String> vars = map();
        ServiceProfile<FlowLoggerProvider> sp = profile(conf, vars);
        FlowLoggerProfile profile = FlowLoggerProfile.convert(sp);

        assertThat(profile.getDirectory().getCanonicalFile(), is(folder.getRoot().getCanonicalFile()));
        assertThat(profile.getEncoding(), is(Charset.forName("ASCII")));
        assertThat(profile.getDateFormat(), is((DateFormat) new SimpleDateFormat("yyyy")));
        assertThat(profile.getStepUnit(), closeTo(Double.parseDouble("0.50"), 0.00001));
        assertThat(profile.isReportJob(), is(Boolean.parseBoolean("false")));
        assertThat(profile.isDeleteOnSetup(), is(Boolean.parseBoolean("false")));
        assertThat(profile.isDeleteOnCleanup(), is(Boolean.parseBoolean("false")));
    }
View Full Code Here

                KEY_ENCODING, "${enc}");
        Map<String, String> vars = map(
                "dir", folder.getRoot().getAbsolutePath(),
                "enc", "ASCII");
        ServiceProfile<FlowLoggerProvider> sp = profile(conf, vars);
        FlowLoggerProfile profile = FlowLoggerProfile.convert(sp);

        assertThat(profile.getDirectory().getCanonicalFile(), is(folder.getRoot().getCanonicalFile()));
        assertThat(profile.getEncoding(), is(Charset.forName("ASCII")));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.yaess.flowlog.FlowLoggerProfile

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.