Package org.modeshape.common.collection

Examples of org.modeshape.common.collection.Problems.warningCount()


    protected RepositoryConfiguration assertValidWithWarnings( int warnings,
                                                               RepositoryConfiguration config ) {
        Problems results = config.validate();
        assertThat(results.toString(), results.hasErrors(), is(false));
        assertThat(results.toString(), results.warningCount(), is(warnings));
        return config;
    }

    protected RepositoryConfiguration assertValid( String configContent ) {
        return assertValid(assertRead(configContent));
View Full Code Here


    }

    protected RepositoryConfiguration assertHasWarnings( int numberOfWarnings,
                                                         RepositoryConfiguration config ) {
        Problems results = config.validate();
        assertThat(results.toString(), results.warningCount(), is(numberOfWarnings));
        assertThat(results.toString(), results.hasWarnings(), is(numberOfWarnings != 0));
        if (print) {
            System.out.println(results);
        }
        return config;
View Full Code Here

                                                                                        "config/repo-config-with-startup-problems.json"),
                                                                      "Deprecated config");
        repository = new JcrRepository(config);
        repository.start();
        Problems problems = repository.getStartupProblems();
        assertEquals("Expected 2 startup warnings:" + problems.toString(), 1, problems.warningCount());
        assertEquals("Expected 2 startup errors: " + problems.toString(), 2, problems.errorCount());
    }

    @FixFor( "MODE-1863" )
    @Test
View Full Code Here

        RepositoryConfiguration config = RepositoryConfiguration.read(getClass().getClassLoader()
                                                                                .getResourceAsStream("config/repo-config-with-startup-problems.json"),
                                                                      "Deprecated config");
        repository = new JcrRepository(config);
        Problems problems = repository.getStartupProblems();
        assertEquals("Expected 2 startup warnings:" + problems.toString(), 1, problems.warningCount());
        assertEquals("Expected 2 startup errors: " + problems.toString(), 2, problems.errorCount());
    }

    @FixFor( "MODE-2033" )
    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.