Package autocomplete

Class AutocompleteTests

    • Field Detail

      • MAX_CITIES

        private static final int MAX_CITIES
        Maximum number of cities to parse.
        See Also:
        Constant Field Values
      • cities

        private final List<String> cities
        Associating each city name to the importance weight of that city.
      • reference

        private final Autocomplete reference
        Reference implementation of the Autocomplete interface for comparison.
    • Constructor Detail

      • AutocompleteTests

        public AutocompleteTests()
    • Method Detail

      • comparePrefixSea

        @Test
        void comparePrefixSea()
      • compareRandomPrefixes

        @Test
        void compareRandomPrefixes()
      • assertAllMatches

        void assertAllMatches​(String prefix)
        Asserts that the reference and testing implementations' allMatches methods produce the same results ignoring order.
        Parameters:
        prefix - the prefix string to pass to allMatches