summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/constants/StyleVersionTest.java
blob: 5d501395175d74725cbe0e86e16cec08a58c9719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package com.mapbox.mapboxsdk.testapp.constants;

import com.mapbox.mapboxsdk.constants.Style;
import com.mapbox.mapboxsdk.testapp.R;
import com.mapbox.mapboxsdk.testapp.activity.BaseActivityTest;
import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * Verifies if Style.java defined constants match the strings.xml equivalent
 */
public class StyleVersionTest extends BaseActivityTest {

  @Override
  protected Class getActivityClass() {
    return EspressoTestActivity.class;
  }

  @Test
  public void mapboxStreets() {
    assertEquals(
      "Mapbox Streets should match",
      Style.MAPBOX_STREETS,
      getString(R.string.mapbox_style_mapbox_streets)
    );
  }

  @Test
  public void satelliteStreets() {
    assertEquals(
      "Satellite Streets should match",
      Style.SATELLITE_STREETS,
      getString(R.string.mapbox_style_satellite_streets)
    );
  }

  @Test
  public void outdoors() {
    assertEquals(
      "Outdoors should match",
      Style.OUTDOORS,
      getString(R.string.mapbox_style_outdoors)
    );
  }

  @Test
  public void satellite() {
    assertEquals(
      "Satellite should match",
      Style.SATELLITE,
      getString(R.string.mapbox_style_satellite)
    );
  }

  @Test
  public void light() {
    assertEquals(
      "Light should match",
      Style.LIGHT,
      getString(R.string.mapbox_style_light)
    );
  }

  @Test
  public void dark() {
    assertEquals(
      "Dark should match",
      Style.DARK,
      getString(R.string.mapbox_style_dark)
    );
  }

  @Test
  public void trafficDay() {
    assertEquals(
      "Traffic Day should match",
      Style.TRAFFIC_DAY,
      getString(R.string.mapbox_style_traffic_day)
    );
  }

  @Test
  public void trafficNight() {
    assertEquals(
      "Traffic Night should match",
      Style.TRAFFIC_NIGHT,
      getString(R.string.mapbox_style_traffic_night)
    );
  }

  @Test
  public void navigationGuidanceDay() {
    assertEquals(
      "Navigation Guidance Day should match",
      Style.NAVIGATION_GUIDANCE_DAY,
      getString(R.string.mapbox_style_navigation_guidance_day)
    );
  }

  @Test
  public void navigationGuidanceNight() {
    assertEquals(
      "Navigation Guidance Night should match",
      Style.NAVIGATION_GUIDANCE_NIGHT,
      getString(R.string.mapbox_style_navigation_guidance_night)
    );
  }

  @Test
  public void navigationPreviewDay() {
    assertEquals(
      "Navigation Preview Day should match",
      Style.NAVIGATION_PREVIEW_DAY,
      getString(R.string.mapbox_style_navigation_preview_day)
    );
  }

  @Test
  public void navigationPreviewNight() {
    assertEquals(
      "Navigation Preview Night should match",
      Style.NAVIGATION_PREVIEW_NIGHT,
      getString(R.string.mapbox_style_navigation_preview_night)
    );
  }
}