|
@@ -37,6 +37,7 @@ public class OptionsTest extends BaseTest {
|
37
|
37
|
private static final String TOP_BAR_FONT_FAMILY = "HelveticaNeue-CondensedBold";
|
38
|
38
|
private static final int SUBTITLE_FONT_SIZE = 14;
|
39
|
39
|
private static final int SUBTITLE_TEXT_COLOR = 0xff123457;
|
|
40
|
+ private static final int SCREEN_BACKGROUND_COLOR = 0xff123458;
|
40
|
41
|
private static final String SUBTITLE_FONT_FAMILY = "HelveticaNeue-Condensed";
|
41
|
42
|
private static final Typeface SUBTITLE_TYPEFACE = Typeface.create("HelveticaNeue-Condensed", Typeface.NORMAL);
|
42
|
43
|
private static final String SUBTITLE_ALIGNMENT = "center";
|
|
@@ -69,7 +70,8 @@ public class OptionsTest extends BaseTest {
|
69
|
70
|
JSONObject json = new JSONObject()
|
70
|
71
|
.put("topBar", createTopBar(TOP_BAR_VISIBLE.get()))
|
71
|
72
|
.put("fab", createFab())
|
72
|
|
- .put("bottomTabs", createBottomTabs());
|
|
73
|
+ .put("bottomTabs", createBottomTabs())
|
|
74
|
+ .put("screenBackgroundColor",SCREEN_BACKGROUND_COLOR);
|
73
|
75
|
Options result = Options.parse(mockLoader, json);
|
74
|
76
|
assertResult(result);
|
75
|
77
|
}
|
|
@@ -99,6 +101,7 @@ public class OptionsTest extends BaseTest {
|
99
|
101
|
assertThat(result.fabOptions.hideOnScroll.get()).isEqualTo(FAB_HIDE_ON_SCROLL);
|
100
|
102
|
assertThat(result.fabOptions.alignVertically.get()).isEqualTo(FAB_ALIGN_VERTICALLY);
|
101
|
103
|
assertThat(result.fabOptions.alignHorizontally.get()).isEqualTo(FAB_ALIGN_HORIZONTALLY);
|
|
104
|
+ assertThat(result.screenBackgroundColor.get()).isEqualTo(SCREEN_BACKGROUND_COLOR);
|
102
|
105
|
}
|
103
|
106
|
|
104
|
107
|
@NonNull
|
|
@@ -211,7 +214,8 @@ public class OptionsTest extends BaseTest {
|
211
|
214
|
JSONObject json = new JSONObject()
|
212
|
215
|
.put("topBar", createTopBar(TOP_BAR_VISIBLE.get()))
|
213
|
216
|
.put("fab", createFab())
|
214
|
|
- .put("bottomTabs", createBottomTabs());
|
|
217
|
+ .put("bottomTabs", createBottomTabs())
|
|
218
|
+ .put("screenBackgroundColor",SCREEN_BACKGROUND_COLOR);
|
215
|
219
|
Options defaultOptions = Options.parse(mockLoader, json);
|
216
|
220
|
Options options = new Options();
|
217
|
221
|
|
|
@@ -223,7 +227,8 @@ public class OptionsTest extends BaseTest {
|
223
|
227
|
JSONObject defaultJson = new JSONObject()
|
224
|
228
|
.put("topBar", createOtherTopBar())
|
225
|
229
|
.put("fab", createOtherFab())
|
226
|
|
- .put("bottomTabs", createOtherBottomTabs());
|
|
230
|
+ .put("bottomTabs", createOtherBottomTabs())
|
|
231
|
+ .put("screenBackgroundColor",SCREEN_BACKGROUND_COLOR);
|
227
|
232
|
Options defaultOptions = Options.parse(mockLoader, defaultJson);
|
228
|
233
|
|
229
|
234
|
JSONObject json = new JSONObject()
|
|
@@ -238,6 +243,8 @@ public class OptionsTest extends BaseTest {
|
238
|
243
|
public void defaultEmptyOptions() {
|
239
|
244
|
Options uut = new Options();
|
240
|
245
|
assertThat(uut.topBarOptions.title.text.get("")).isEmpty();
|
|
246
|
+ assertThat(uut.screenBackgroundColor.hasValue()).isFalse();
|
|
247
|
+
|
241
|
248
|
}
|
242
|
249
|
|
243
|
250
|
@Test
|