|
|
|
|
25
|
public class OptionsTest extends BaseTest {
|
25
|
public class OptionsTest extends BaseTest {
|
26
|
|
26
|
|
27
|
private static final String TITLE = "the title";
|
27
|
private static final String TITLE = "the title";
|
|
|
28
|
+ private static final Number TITLE_HEIGHT = new Number(100);
|
28
|
private static final String FAB_ID = "FAB";
|
29
|
private static final String FAB_ID = "FAB";
|
29
|
private static final String FAB_ALIGN_HORIZONTALLY = "right";
|
30
|
private static final String FAB_ALIGN_HORIZONTALLY = "right";
|
30
|
private static final String FAB_ALIGN_VERTICALLY = "bottom";
|
31
|
private static final String FAB_ALIGN_VERTICALLY = "bottom";
|
|
|
|
|
83
|
private void assertResult(Options result) {
|
84
|
private void assertResult(Options result) {
|
84
|
assertThat(result.topBar.title.text.get()).isEqualTo(TITLE);
|
85
|
assertThat(result.topBar.title.text.get()).isEqualTo(TITLE);
|
85
|
assertThat(result.topBar.background.color.get()).isEqualTo(TOP_BAR_BACKGROUND_COLOR);
|
86
|
assertThat(result.topBar.background.color.get()).isEqualTo(TOP_BAR_BACKGROUND_COLOR);
|
|
|
87
|
+ assertThat(result.topBar.title.height.get()).isEqualTo(TITLE_HEIGHT.get());
|
86
|
assertThat(result.topBar.title.color.get()).isEqualTo(TOP_BAR_TEXT_COLOR);
|
88
|
assertThat(result.topBar.title.color.get()).isEqualTo(TOP_BAR_TEXT_COLOR);
|
87
|
assertThat(result.topBar.title.fontSize.get()).isEqualTo(TOP_BAR_FONT_SIZE);
|
89
|
assertThat(result.topBar.title.fontSize.get()).isEqualTo(TOP_BAR_FONT_SIZE);
|
88
|
assertThat(result.topBar.title.fontFamily).isEqualTo(TOP_BAR_TYPEFACE);
|
90
|
assertThat(result.topBar.title.fontFamily).isEqualTo(TOP_BAR_TYPEFACE);
|
|
|
|
|
134
|
private JSONObject createTitle() throws JSONException {
|
136
|
private JSONObject createTitle() throws JSONException {
|
135
|
return new JSONObject()
|
137
|
return new JSONObject()
|
136
|
.put("text", "the title")
|
138
|
.put("text", "the title")
|
|
|
139
|
+ .put("height", TITLE_HEIGHT.get())
|
137
|
.put("color", TOP_BAR_TEXT_COLOR)
|
140
|
.put("color", TOP_BAR_TEXT_COLOR)
|
138
|
.put("fontSize", TOP_BAR_FONT_SIZE)
|
141
|
.put("fontSize", TOP_BAR_FONT_SIZE)
|
139
|
.put("fontFamily", TOP_BAR_FONT_FAMILY);
|
142
|
.put("fontFamily", TOP_BAR_FONT_FAMILY);
|