Package com.asakusafw.windgate.core.session

Examples of com.asakusafw.windgate.core.session.SessionProfile


        assertThat(out.exists(), is(false));
    }

    private GateProfile profile() throws IOException {
        CoreProfile core = new CoreProfile(2);
        SessionProfile session = new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        folder.newFolder("session").getAbsolutePath()));
View Full Code Here


     * @throws Throwable if failed
     */
    @Before
    public void setUp() throws Throwable {
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        folder.getRoot().getAbsolutePath())));
View Full Code Here

     * @throws Exception if failed
     */
    @Test(expected = IOException.class)
    public void config_empty() throws Exception {
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.<String, String>emptyMap()));
    }
View Full Code Here

     */
    @Test(expected = IOException.class)
    public void config_unknown_variable() throws Exception {
        Assume.assumeThat(System.getenv("__UNKNOWN_VARIABLE"), is(nullValue()));
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        "${__UNKNOWN_VARIABLE}/hoge")));
View Full Code Here

     */
    @Test(expected = IOException.class)
    public void config_conflict_directory() throws Exception {
        File file = folder.newFile("conflict");
        provider = new FileSessionProvider();
        provider.configure(new SessionProfile(
                FileSessionProvider.class,
                ProfileContext.system(FileSessionProvider.class.getClassLoader()),
                Collections.singletonMap(
                        FileSessionProvider.KEY_DIRECTORY,
                        file.getAbsolutePath())));
View Full Code Here

        }
        LOG.debug("Restoring WindGate profile");
        Properties copy = (Properties) properties.clone();
        CoreProfile core = CoreProfile.loadFrom(copy, context);
        CoreProfile.removeCorrespondingKeys(copy);
        SessionProfile session = SessionProfile.loadFrom(copy, context);
        SessionProfile.removeCorrespondingKeys(copy);
        Collection<? extends ProcessProfile> processes = ProcessProfile.loadFrom(copy, context);
        ProcessProfile.removeCorrespondingKeys(copy);
        Collection<? extends ResourceProfile> resources = ResourceProfile.loadFrom(copy, context);
        ResourceProfile.removeCorrespondingKeys(copy);
View Full Code Here

TOP

Related Classes of com.asakusafw.windgate.core.session.SessionProfile

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.