Package org.jvnet.localizer

Examples of org.jvnet.localizer.Localizable


            i = i.getPreviousBuild();
        }
        if (totalCount > 0) {
            int score = (int) ((100.0 * (totalCount - failCount)) / totalCount);

            Localizable description;
            if (failCount == 0) {
                description = Messages._Job_NoRecentBuildFailed();
            } else if (totalCount == failCount) {
                // this should catch the case where totalCount == 1
                // as failCount must be between 0 and totalCount
View Full Code Here


    public HealthReport getBuildHealth() {
        final int totalCount = getTotalCount();
        final int failCount = getFailCount();
        int score = (totalCount == 0) ? 100 : (int) (100.0 * (1.0 - ((double)failCount) / totalCount));
        Localizable description, displayName = Messages._AbstractTestResultAction_getDisplayName();
        if (totalCount == 0) {
          description = Messages._AbstractTestResultAction_zeroTestDescription(displayName);
        } else {
          description = Messages._AbstractTestResultAction_TestsDescription(displayName, failCount, totalCount);
        }
View Full Code Here

    @Test
    public void verifyNumberOfItems() {
        AnnotationProvider provider = mock(AnnotationProvider.class);
        DryHealthDescriptor healthDescriptor = new DryHealthDescriptor(NullHealthDescriptor.NULL_HEALTH_DESCRIPTOR);

        Localizable description = healthDescriptor.createDescription(provider);
        assertEquals(WRONG_DESCRIPTION, Messages.DRY_ResultAction_HealthReportNoItem(), description.toString());

        when(provider.getNumberOfAnnotations()).thenReturn(1);
        description = healthDescriptor.createDescription(provider);
        assertEquals(WRONG_DESCRIPTION, Messages.DRY_ResultAction_HealthReportSingleItem(), description.toString());

        when(provider.getNumberOfAnnotations()).thenReturn(2);
        description = healthDescriptor.createDescription(provider);
        assertEquals(WRONG_DESCRIPTION, Messages.DRY_ResultAction_HealthReportMultipleItem(2), description.toString());
    }
View Full Code Here

    @Test
    public void verifyNumberOfItems() {
        AnnotationProvider provider = mock(AnnotationProvider.class);
        FindBugsHealthDescriptor healthDescriptor = new FindBugsHealthDescriptor(NullHealthDescriptor.NULL_HEALTH_DESCRIPTOR);

        Localizable description = healthDescriptor.createDescription(provider);
        assertEquals(WRONG_DESCRIPTION, Messages.FindBugs_ResultAction_HealthReportNoItem(), description.toString());

        when(provider.getNumberOfAnnotations()).thenReturn(1);
        description = healthDescriptor.createDescription(provider);
        assertEquals(WRONG_DESCRIPTION, Messages.FindBugs_ResultAction_HealthReportSingleItem(), description.toString());

        when(provider.getNumberOfAnnotations()).thenReturn(2);
        description = healthDescriptor.createDescription(provider);
        assertEquals(WRONG_DESCRIPTION, Messages.FindBugs_ResultAction_HealthReportMultipleItem(2), description.toString());
    }
View Full Code Here

    /**
     * Diff Visualizers
     *
     */
    public static Localizable _Services_DiffVisualizers() {
        return new Localizable(holder, "Services/DiffVisualizers");
    }
View Full Code Here

    /**
     * Patch
     *
     */
    public static Localizable _BTN_Patch() {
        return new Localizable(holder, "BTN_Patch");
    }
View Full Code Here

    /**
     * Visualizer.
     *
     */
    public static Localizable _ACS_VisualizerA11yDesc() {
        return new Localizable(holder, "ACS_VisualizerA11yDesc");
    }
View Full Code Here

    /**
     * Choose diff visualizer.
     *
     */
    public static Localizable _ACS_VisualizerPropertyPanelA11yDesc() {
        return new Localizable(holder, "ACS_VisualizerPropertyPanelA11yDesc");
    }
View Full Code Here

    /**
     * No Diff Visualizer is registered in the system.
     *
     */
    public static Localizable _MSG_NoDiffVisualizer() {
        return new Localizable(holder, "MSG_NoDiffVisualizer");
    }
View Full Code Here

    /**
     * The command executed by the external diff engine.
     *
     */
    public static Localizable _HINT_diffCmd() {
        return new Localizable(holder, "HINT_diffCmd");
    }
View Full Code Here

TOP

Related Classes of org.jvnet.localizer.Localizable

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.