Package slash.navigation.base

Examples of slash.navigation.base.NavigationFormat


        recentFormatsModel.removeAllFormats();
    }

    @Test
    public void testAddFormat() throws IOException {
        NavigationFormat format = new Gpx11Format();
        recentFormatsModel.addFormat(format);
        assertEquals(asList(format), recentFormatsModel.getFormats());
    }
View Full Code Here


        assertEquals(asList(format), recentFormatsModel.getFormats());
    }

    @Test
    public void testAddExistingFormat() throws IOException {
        NavigationFormat format = new Gpx11Format();
        recentFormatsModel.addFormat(format);
        recentFormatsModel.addFormat(format);
        recentFormatsModel.addFormat(format);
        assertEquals(asList(format), recentFormatsModel.getFormats());
    }
View Full Code Here

        assertEquals(asList(format), recentFormatsModel.getFormats());
    }

    @Test
    public void testReadExistingFormatBug() throws IOException {
        NavigationFormat first = new Gpx11Format();
        NavigationFormat second = new Kml22Format();
        NavigationFormat third = new Tcx2Format();
        recentFormatsModel.addFormat(first);
        recentFormatsModel.addFormat(second);
        recentFormatsModel.addFormat(first);
        recentFormatsModel.addFormat(third);
        assertEquals(asList(third, first, second), recentFormatsModel.getFormats());
View Full Code Here

    @Test
    public void testLatestFirst() throws IOException {
        List<NavigationFormat> expected = new ArrayList<NavigationFormat>();
        for (int i = 0; i < 5; i++) {
            NavigationFormat format = getWriteFormats().get(i);
            recentFormatsModel.addFormat(format);
            expected.add(0, format);
            assertEquals(expected, recentFormatsModel.getFormats());
        }
    }
View Full Code Here

    @Test
    public void testLimit() throws IOException {
        List<NavigationFormat> collected = new ArrayList<NavigationFormat>();
        for (int i = 0; i < 2 * LIMIT; i++) {
            NavigationFormat format = getWriteFormats().get(i);
            recentFormatsModel.addFormat(format);
            collected.add(0, format);
            List<NavigationFormat> expected = collected.subList(0, min(i + 1, LIMIT));
            List<NavigationFormat> actual = recentFormatsModel.getFormats();
            assertEquals(expected.size(), actual.size());
View Full Code Here

TOP

Related Classes of slash.navigation.base.NavigationFormat

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.