Package org.zanata.apicompat.rest.dto.stats

Examples of org.zanata.apicompat.rest.dto.stats.ContainerTranslationStatistics


    }

    @Test
    @RunAsClient
    public void getStatisticsForIteration() throws Exception {
        ContainerTranslationStatistics stats =
                statsResource.getStatistics("sample-project", "1.0", true,
                        true, null);

        int wordStatCount = 0;
        int mssgStatCount = 0;

        assertThat(stats.getStats().size(), greaterThan(0));
        assertThat(stats.getDetailedStats().size(), greaterThan(0)); // Has
                                                                     // document
                                                                     // stats
        for (TranslationStatistics langStats : stats.getStats()) {
            assertThat(
                    langStats.getTotal(),
                    equalTo(langStats.getUntranslated()
                            + langStats.getNeedReview()
                            + langStats.getTranslated()));
View Full Code Here


    }

    @Test
    @RunAsClient
    public void getStatisticsForDocument() throws Exception {
        ContainerTranslationStatistics stats =
                statsResource.getStatistics("sample-project", "1.0",
                        "my/path/document.txt", true, null);

        int wordStatCount = 0;
        int mssgStatCount = 0;

        assertThat(stats.getStats().size(), greaterThan(0));
        for (TranslationStatistics langStats : stats.getStats()) {
            assertThat(
                    langStats.getTotal(),
                    equalTo(langStats.getUntranslated()
                            + langStats.getNeedReview()
                            + langStats.getTranslated()));
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getStatisticsForIterationAndLocale() throws Exception {
        ContainerTranslationStatistics stats =
                statsResource.getStatistics("sample-project", "1.0", true,
                        false, new String[] { "as" });

        assertThat(stats.getStats().size(), is(1)); // Just one locale and no
                                                    // word level stats
        assertThat(stats.getDetailedStats().size(), greaterThan(0)); // Has
                                                                     // document
                                                                     // stats
        for (TranslationStatistics langStats : stats.getStats()) {
            assertThat(
                    langStats.getTotal(),
                    equalTo(langStats.getUntranslated()
                            + langStats.getNeedReview()
                            + langStats.getTranslated()));
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getStatisticsForDocumentAndLocale() throws Exception {
        ContainerTranslationStatistics stats =
                statsResource.getStatistics("sample-project", "1.0",
                        "my/path/document.txt", true, new String[] { "as" });

        assertThat(stats.getStats().size(), is(2)); // Just one locale
        for (TranslationStatistics langStats : stats.getStats()) {
            assertThat(
                    langStats.getTotal(),
                    equalTo(langStats.getUntranslated()
                            + langStats.getNeedReview()
                            + langStats.getTranslated()));
View Full Code Here

TOP

Related Classes of org.zanata.apicompat.rest.dto.stats.ContainerTranslationStatistics

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.