Package org.jsurveylib.model.i18n

Examples of org.jsurveylib.model.i18n.Strings


        }
        return defaultValue;
    }

    public Strings getStrings() {
        return new Strings() {
            public String getNextString() {
                return i18nString("nextString", "Next");
            }

            public String getPreviousString() {
View Full Code Here


    }

    @Test
    public void defaultI18NStrings() throws Exception {
        XMLSurveyReader reader = new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\io\\xmlsurveyreaderfiles\\defaulti18nstrings.xml"));
        Strings strings = reader.getStrings();
        assertEquals("Next", strings.getNextString());
        assertEquals("Previous", strings.getPreviousString());
        assertEquals("Finish", strings.getFinishString());
        assertEquals("Page", strings.getPageString());
        assertEquals("of", strings.getOfString());
        assertEquals("Browse", strings.getBrowseString());
        assertEquals("File", strings.getFileString());
        assertEquals("View", strings.getViewString());
        assertEquals("First Page", strings.getFirstPageString());
        assertEquals("Previous Page", strings.getPreviousPageString());
        assertEquals("Next Page", strings.getNextPageString());
        assertEquals("Last Page", strings.getLastPageString());
        assertEquals("Open...", strings.getOpenString());
        assertEquals("Save", strings.getSaveString());
        assertEquals("Save As...", strings.getSaveAsString());
        assertEquals("Unsaved Changes", strings.getUnsavedChangesString());
        assertEquals("This survey has unsaved changes.  Choose OK to save these changes to\n", strings.getSaveToWorkingFileNotificationString());
        assertEquals("This survey has unsaved changes.  Choose OK to save these changes.", strings.getSaveToNewFileNotificationString());

    }
View Full Code Here

    }

    @Test
    public void i18NStringsDeprecated() throws Exception {
        XMLSurveyReader reader = new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\io\\xmlsurveyreaderfiles\\i18nstringsdeprecated.xml"));
        Strings strings = reader.getStrings();
        assertEquals("1", strings.getNextString());
        assertEquals("2", strings.getPreviousString());
        assertEquals("3", strings.getFinishString());
        assertEquals("4", strings.getPageString());
        assertEquals("5", strings.getOfString());       
    }
View Full Code Here

    }

    @Test
    public void i18NStrings() throws Exception {
        XMLSurveyReader reader = new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\io\\xmlsurveyreaderfiles\\i18nstrings.xml"));
        Strings strings = reader.getStrings();
        assertEquals("1", strings.getNextString());
        assertEquals("2", strings.getPreviousString());
        assertEquals("3", strings.getFinishString());
        assertEquals("4", strings.getPageString());
        assertEquals("5", strings.getOfString());
        assertEquals("6", strings.getBrowseString());
        assertEquals("7", strings.getFileString());
        assertEquals("8", strings.getViewString());
        assertEquals("9", strings.getFirstPageString());
        assertEquals("10", strings.getPreviousPageString());
        assertEquals("11", strings.getNextPageString());
        assertEquals("12", strings.getLastPageString());
        assertEquals("13", strings.getOpenString());
        assertEquals("14", strings.getSaveString());
        assertEquals("15", strings.getSaveAsString());
        assertEquals("16", strings.getUnsavedChangesString());
        assertEquals("17", strings.getSaveToWorkingFileNotificationString());
        assertEquals("18", strings.getSaveToNewFileNotificationString());
    }
View Full Code Here

TOP

Related Classes of org.jsurveylib.model.i18n.Strings

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.