src/test/java/de/blau/android/presets/PresetTest.java
/**
     * Test that we match the expected PresetItem
     */
Test that we match the expected PresetItem
Test that we match the expected PresetItem
@Test
    public void matching2() {
        PresetItem item = presets[0].getItemByName("Traffic Sign Forward", null);
        assertNotNull(item);
        Map<String, String> tags = new HashMap<>();
        tags.put("traffic_sign:forward", "something"); 
        assertEquals(1, item.matchesRecommended(tags));
        PresetItem sign = Preset.findBestMatch(presets, tags, null);
        assertEquals(item, sign);
        assertTrue(item.hasKeyValue("traffic_sign:forward", "anything")); 
    }
@ Test public void matching2 ( ) { PresetItem item = presets [ 0 ] . getItemByName ( "Traffic Sign Forward" , null ) ; assertNotNull ( item ) ; Map < String , String > tags = new HashMap < > ( ) ; tags . put ( "traffic_sign:forward" , "something" ) ; assertEquals ( 1 , item . matchesRecommended ( tags ) ) ; PresetItem sign = Preset . findBestMatch ( presets , tags , null ) ; assertEquals ( item , sign ) ; assertTrue ( item . hasKeyValue ( "traffic_sign:forward" , "anything" ) ) ; }
Test that we match the expected PresetItem
Test that we match the expected PresetItem
// this is a text field // test field