Package org.jboss.dna.graph.connector

Examples of org.jboss.dna.graph.connector.RepositoryContext


        config.create("/a").and();
        config.create("/a/b").and();
        config.create("/a/b/Test Repository").and();
        config.create("/a/b/Test Repository/dna:workspaces").and();

        repositoryContext = new RepositoryContext() {
            public ExecutionContext getExecutionContext() {
                return context;
            }

            public Observer getObserver() {
View Full Code Here


        assertThat(workspace.contains("source1", "no workspace"), is(false));
    }

    @Test
    public void shouldConsiderWorkspacesEqualIfSameSourceNameAndSameWorkspaceNameAndSameProjections() {
        RepositoryContext otherReposContext = mock(RepositoryContext.class);
        stub(otherReposContext.getExecutionContext()).toReturn(context);
        CachePolicy otherPolicy = mock(CachePolicy.class);
        FederatedWorkspace other = new FederatedWorkspace(otherReposContext, sourceName, workspaceName, projections, otherPolicy);
        assertThat(workspace.equals(other), is(true));
    }
View Full Code Here

        assertThat(workspace.equals(other), is(true));
    }

    @Test
    public void shouldConsiderWorkspacesNotEqualIfDifferentSourceName() {
        RepositoryContext otherReposContext = mock(RepositoryContext.class);
        stub(otherReposContext.getExecutionContext()).toReturn(context);
        CachePolicy otherPolicy = mock(CachePolicy.class);
        FederatedWorkspace other = new FederatedWorkspace(otherReposContext, "diff", workspaceName, projections, otherPolicy);
        assertThat(workspace.equals(other), is(false));
    }
View Full Code Here

        assertThat(workspace.equals(other), is(false));
    }

    @Test
    public void shouldConsiderWorkspacesNotEqualIfDifferentWorkspaceName() {
        RepositoryContext otherReposContext = mock(RepositoryContext.class);
        stub(otherReposContext.getExecutionContext()).toReturn(context);
        CachePolicy otherPolicy = mock(CachePolicy.class);
        FederatedWorkspace other = new FederatedWorkspace(otherReposContext, sourceName, "diff", projections, otherPolicy);
        assertThat(workspace.equals(other), is(false));
    }
View Full Code Here

        assertThat(workspace.equals(other), is(false));
    }

    @Test
    public void shouldConsiderWorkspacesNotEqualIfDifferentProjections() {
        RepositoryContext otherReposContext = mock(RepositoryContext.class);
        stub(otherReposContext.getExecutionContext()).toReturn(context);
        CachePolicy otherPolicy = mock(CachePolicy.class);
        FederatedWorkspace other = new FederatedWorkspace(otherReposContext, sourceName, workspaceName,
                                                          projections.subList(0, 3), otherPolicy);
        assertThat(workspace.equals(other), is(false));
    }
View Full Code Here

                    return connection;
                }
            };

            // Initialize the source with the rest of the environment ...
            source.initialize(new RepositoryContext() {
                public ExecutionContext getExecutionContext() {
                    return context;
                }

                @SuppressWarnings( "synthetic-access" )
View Full Code Here

        configurationSourceName = "configuration";
        repositoryName = "Test Repository";
        configRepositorySource = new InMemoryRepositorySource();
        configRepositorySource.setName("Configuration Repository");

        repositoryContext = new RepositoryContext() {
            @SuppressWarnings( "synthetic-access" )
            public ExecutionContext getExecutionContext() {
                return context;
            }
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.connector.RepositoryContext

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.