Skip to content

Commit 40bb4fa

Browse files
committed
- renamed resources - added prefix
1 parent 3f7667b commit 40bb4fa

28 files changed

Lines changed: 186 additions & 210 deletions

settingviews/src/androidTest/java/com/awolity/settingviews/ButtonSettingAttributesTests.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,34 @@ class ButtonSettingAttributesTests {
2929

3030
@Test
3131
fun test_titleText_SetFromAttributes() {
32-
onView(withId(R.id.tv_title)).check(matches(withText(R.string.test_title)))
32+
onView(withId(R.id.tv_title)).check(matches(withText(R.string.SettingViews_test_title)))
3333
}
3434

3535
@Test
3636
fun test_Description_TextSetFromAttributes() {
37-
onView(withId(R.id.tv_desc)).check(matches(withText(R.string.test_description)))
37+
onView(withId(R.id.tv_desc)).check(matches(withText(R.string.SettingViews_test_description)))
3838
}
3939

4040
@Test
4141
fun test_TitleColor_SetFromAttributes() {
42-
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.test_text_title, activityRule.activity.resources)))
42+
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.color_SettingViews_test_text_title, activityRule.activity.resources)))
4343
}
4444

4545
@Test
4646
fun test_DescriptionColor_SetFromAttributes() {
47-
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.test_text_description, activityRule.activity.resources)))
47+
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.color_SettingViews_test_text_description, activityRule.activity.resources)))
4848
}
4949

5050
@Test
5151
fun test_DisabledTitleColor_SetFromAttribute() {
5252
activityRule.runOnUiThread { activityRule.activity.bs.isEnabled = false }
53-
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.test_text_disabled, activityRule.activity.resources)))
53+
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.color_SettingViews_test_text_disabled, activityRule.activity.resources)))
5454
}
5555

5656
@Test
5757
fun test_DisabledDescriptionColor_SetFromAttribute() {
5858
activityRule.runOnUiThread { activityRule.activity.bs.isEnabled = false }
59-
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.test_text_disabled, activityRule.activity.resources)))
59+
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.color_SettingViews_test_text_disabled, activityRule.activity.resources)))
6060
}
6161

6262
@Test

settingviews/src/androidTest/java/com/awolity/settingviews/ButtonSettingDefaultValuesTests.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ButtonSettingDefaultValuesTests {
4141
Espresso.onView(ViewMatchers.withId(R.id.tv_title)).check(
4242
ViewAssertions.matches(
4343
TextColorMatcher.withTextColor(
44-
R.color.text_title,
44+
R.color.color_SettingViews_text_title,
4545
activityRule.activity.resources
4646
)
4747
)
@@ -53,7 +53,7 @@ class ButtonSettingDefaultValuesTests {
5353
Espresso.onView(ViewMatchers.withId(R.id.tv_desc)).check(
5454
ViewAssertions.matches(
5555
TextColorMatcher.withTextColor(
56-
R.color.text_description,
56+
R.color.color_SettingViews_text_description,
5757
activityRule.activity.resources
5858
)
5959
)
@@ -84,7 +84,7 @@ class ButtonSettingDefaultValuesTests {
8484
Espresso.onView(ViewMatchers.withId(R.id.tv_title)).check(
8585
ViewAssertions.matches(
8686
TextColorMatcher.withTextColor(
87-
R.color.text_disabled,
87+
R.color.color_SettingViews_text_disabled,
8888
activityRule.activity.resources
8989
)
9090
)
@@ -97,7 +97,7 @@ class ButtonSettingDefaultValuesTests {
9797
Espresso.onView(ViewMatchers.withId(R.id.tv_desc)).check(
9898
ViewAssertions.matches(
9999
TextColorMatcher.withTextColor(
100-
R.color.text_disabled,
100+
R.color.color_SettingViews_text_disabled,
101101
activityRule.activity.resources
102102
)
103103
)

settingviews/src/androidTest/java/com/awolity/settingviews/ButtonSettingSaveStateTests.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import org.junit.Test
1313
import org.junit.runner.RunWith
1414
import com.awolity.settingviews.TextColorMatcher.withTextColor
1515
import kotlinx.android.synthetic.main.activity_mock_defaults_bs.*
16-
import org.hamcrest.CoreMatchers.not
17-
import java.lang.IllegalStateException
1816

1917
@RunWith(AndroidJUnit4::class)
2018
class ButtonSettingSaveStateTests {
@@ -41,13 +39,13 @@ class ButtonSettingSaveStateTests {
4139
@Test
4240
fun setTitleColor_Rotate_lookTitleColor() {
4341
activityRule.runOnUiThread {
44-
activityRule.activity.bs.setTitleTextColor(activityRule.activity.getColor(R.color.test_text_title))
42+
activityRule.activity.bs.setTitleTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_title))
4543
rotate()
4644
}
4745
onView(withId(R.id.tv_title)).check(
4846
matches(
4947
withTextColor(
50-
R.color.test_text_title,
48+
R.color.color_SettingViews_test_text_title,
5149
activityRule.activity.resources
5250
)
5351
)
@@ -66,13 +64,13 @@ class ButtonSettingSaveStateTests {
6664
@Test
6765
fun setDescriptionColor_Rotate_lookDescriptionColor() {
6866
activityRule.runOnUiThread {
69-
activityRule.activity.bs.setDescriptionTextColor(activityRule.activity.getColor(R.color.test_text_description))
67+
activityRule.activity.bs.setDescriptionTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_description))
7068
rotate()
7169
}
7270
onView(withId(R.id.tv_desc)).check(
7371
matches(
7472
withTextColor(
75-
R.color.test_text_description,
73+
R.color.color_SettingViews_test_text_description,
7674
activityRule.activity.resources
7775
)
7876
)

settingviews/src/androidTest/java/com/awolity/settingviews/ButtonSettingSetFromCodeTests.kt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import org.junit.runner.RunWith
1313
import com.awolity.settingviews.TextColorMatcher.withTextColor
1414
import kotlinx.android.synthetic.main.activity_mock_defaults_bs.*
1515
import org.hamcrest.CoreMatchers.not
16-
import java.lang.IllegalStateException
1716

1817
// TODO: checkable teszt (ha chekable, akkor a checkable-iv-nek kell a hely
1918

@@ -44,7 +43,7 @@ class ButtonSettingSetFromCodeTests {
4443
onView(withId(R.id.tv_title)).check(
4544
matches(
4645
withTextColor(
47-
R.color.text_disabled,
46+
R.color.color_SettingViews_text_disabled,
4847
activityRule.activity.resources
4948
)
5049
)
@@ -57,7 +56,7 @@ class ButtonSettingSetFromCodeTests {
5756
onView(withId(R.id.tv_desc)).check(
5857
matches(
5958
withTextColor(
60-
R.color.text_disabled,
59+
R.color.color_SettingViews_text_disabled,
6160
activityRule.activity.resources
6261
)
6362
)
@@ -79,7 +78,7 @@ class ButtonSettingSetFromCodeTests {
7978
activityRule.activity.bs.isEnabled = false
8079
activityRule.activity.bs.isEnabled = true
8180
}
82-
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.text_title, activityRule.activity.resources)))
81+
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.color_SettingViews_text_title, activityRule.activity.resources)))
8382
}
8483

8584
@Test
@@ -91,7 +90,7 @@ class ButtonSettingSetFromCodeTests {
9190
onView(withId(R.id.tv_desc)).check(
9291
matches(
9392
withTextColor(
94-
R.color.text_description,
93+
R.color.color_SettingViews_text_description,
9594
activityRule.activity.resources
9695
)
9796
)
@@ -119,13 +118,13 @@ class ButtonSettingSetFromCodeTests {
119118
@Test
120119
fun setTitleColor_lookTitleColor() {
121120
activityRule.runOnUiThread {
122-
activityRule.activity.bs.setTitleTextColor(activityRule.activity.getColor(R.color.test_text_title))
121+
activityRule.activity.bs.setTitleTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_title))
123122
activityRule.activity.bs.setTitle(title)
124123
}
125124
onView(withId(R.id.tv_title)).check(
126125
matches(
127126
withTextColor(
128-
R.color.test_text_title,
127+
R.color.color_SettingViews_test_text_title,
129128
activityRule.activity.resources
130129
)
131130
)
@@ -135,13 +134,13 @@ class ButtonSettingSetFromCodeTests {
135134
@Test
136135
fun setDescriptionColor_lookDescriptionColor() {
137136
activityRule.runOnUiThread {
138-
activityRule.activity.bs.setDescriptionTextColor(activityRule.activity.getColor(R.color.test_text_description))
137+
activityRule.activity.bs.setDescriptionTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_description))
139138
activityRule.activity.bs.setDescription(description)
140139
}
141140
onView(withId(R.id.tv_desc)).check(
142141
matches(
143142
withTextColor(
144-
R.color.test_text_description,
143+
R.color.color_SettingViews_test_text_description,
145144
activityRule.activity.resources
146145
)
147146
)
@@ -153,12 +152,12 @@ class ButtonSettingSetFromCodeTests {
153152
activityRule.runOnUiThread {
154153
activityRule.activity.bs.setTitle(title)
155154
activityRule.activity.bs.isEnabled = false
156-
activityRule.activity.bs.setDisabledTextColor(activityRule.activity.getColor(R.color.test_text_disabled))
155+
activityRule.activity.bs.setDisabledTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_disabled))
157156
}
158157
onView(withId(R.id.tv_title)).check(
159158
matches(
160159
withTextColor(
161-
R.color.test_text_disabled,
160+
R.color.color_SettingViews_test_text_disabled,
162161
activityRule.activity.resources
163162
)
164163
)
@@ -168,14 +167,14 @@ class ButtonSettingSetFromCodeTests {
168167
@Test
169168
fun setDisabledColorDescription_lookDisabledColorDescription() {
170169
activityRule.runOnUiThread {
171-
activityRule.activity.bs.setDisabledTextColor(activityRule.activity.getColor(R.color.test_text_disabled))
170+
activityRule.activity.bs.setDisabledTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_disabled))
172171
activityRule.activity.bs.isEnabled = false
173172
activityRule.activity.bs.setDescription(description)
174173
}
175174
onView(withId(R.id.tv_desc)).check(
176175
matches(
177176
withTextColor(
178-
R.color.test_text_disabled,
177+
R.color.color_SettingViews_test_text_disabled,
179178
activityRule.activity.resources
180179
)
181180
)

settingviews/src/androidTest/java/com/awolity/settingviews/RadiogroupSettingAttributesTests.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,51 @@ class RadiogroupSettingAttributesTests {
3030

3131
@Test
3232
fun test_titleText_SetFromAttributes() {
33-
onView(withId(R.id.tv_title)).check(matches(withText(R.string.test_title)))
33+
onView(withId(R.id.tv_title)).check(matches(withText(R.string.SettingViews_test_title)))
3434
}
3535

3636
@Test
3737
fun test_Description_TextSetFromAttributes() {
38-
onView(withId(R.id.tv_desc)).check(matches(withText(R.string.test_description)))
38+
onView(withId(R.id.tv_desc)).check(matches(withText(R.string.SettingViews_test_description)))
3939
}
4040

4141
@Test
4242
fun test_Radiobutton1Label_TextSetFromAttributes() {
43-
onView(withId(R.id.rb_one)).check(matches(withText(R.string.test_text_1)))
43+
onView(withId(R.id.rb_one)).check(matches(withText(R.string.SettingViews_test_text_1)))
4444
}
4545

4646
@Test
4747
fun test_Radiobutton2Label_TextSetFromAttributes() {
48-
onView(withId(R.id.rb_two)).check(matches(withText(R.string.test_text_2)))
48+
onView(withId(R.id.rb_two)).check(matches(withText(R.string.SettingViews_test_text_2)))
4949
}
5050

5151
@Test
5252
fun test_TitleColor_SetFromAttributes() {
53-
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.test_text_title, activityRule.activity.resources)))
53+
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.color_SettingViews_test_text_title, activityRule.activity.resources)))
5454
}
5555

5656
@Test
5757
fun test_DescriptionColor_SetFromAttributes() {
58-
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.test_text_description, activityRule.activity.resources)))
58+
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.color_SettingViews_test_text_description, activityRule.activity.resources)))
5959
}
6060

6161
@Test
6262
fun test_DisabledTitleColor_SetFromAttribute() {
6363
activityRule.runOnUiThread { activityRule.activity.rs.isEnabled = false }
64-
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.test_text_disabled, activityRule.activity.resources)))
64+
onView(withId(R.id.tv_title)).check(matches(withTextColor(R.color.color_SettingViews_test_text_disabled, activityRule.activity.resources)))
6565
}
6666

6767
@Test
6868
fun test_DisabledDescriptionColor_SetFromAttribute() {
6969
activityRule.runOnUiThread { activityRule.activity.rs.isEnabled = false }
70-
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.test_text_disabled, activityRule.activity.resources)))
70+
onView(withId(R.id.tv_desc)).check(matches(withTextColor(R.color.color_SettingViews_test_text_disabled, activityRule.activity.resources)))
7171
}
7272

7373
@Test
7474
fun test_DisabledRadioButtonLabelColor_SetFromAttribute() {
7575
activityRule.runOnUiThread { activityRule.activity.rs.isEnabled = false }
76-
onView(withId(R.id.rb_one)).check(matches(withTextColor(R.color.test_text_disabled, activityRule.activity.resources)))
77-
onView(withId(R.id.rb_two)).check(matches(withTextColor(R.color.test_text_disabled, activityRule.activity.resources)))
76+
onView(withId(R.id.rb_one)).check(matches(withTextColor(R.color.color_SettingViews_test_text_disabled, activityRule.activity.resources)))
77+
onView(withId(R.id.rb_two)).check(matches(withTextColor(R.color.color_SettingViews_test_text_disabled, activityRule.activity.resources)))
7878
}
7979

8080
@Test

settingviews/src/androidTest/java/com/awolity/settingviews/RadiogroupSettingDefaultValuesTests.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class RadiogroupSettingDefaultValuesTests {
5050
onView(withId(R.id.tv_title)).check(
5151
matches(
5252
TextColorMatcher.withTextColor(
53-
R.color.text_title,
53+
R.color.color_SettingViews_text_title,
5454
activityRule.activity.resources
5555
)
5656
)
@@ -62,7 +62,7 @@ class RadiogroupSettingDefaultValuesTests {
6262
onView(withId(R.id.rb_one)).check(
6363
matches(
6464
TextColorMatcher.withTextColor(
65-
R.color.text_description,
65+
R.color.color_SettingViews_text_description,
6666
activityRule.activity.resources
6767
)
6868
)
@@ -92,7 +92,7 @@ class RadiogroupSettingDefaultValuesTests {
9292
onView(withId(R.id.tv_desc)).check(
9393
matches(
9494
TextColorMatcher.withTextColor(
95-
R.color.text_description,
95+
R.color.color_SettingViews_text_description,
9696
activityRule.activity.resources
9797
)
9898
)
@@ -111,7 +111,7 @@ class RadiogroupSettingDefaultValuesTests {
111111
onView(withId(R.id.tv_title)).check(
112112
matches(
113113
TextColorMatcher.withTextColor(
114-
R.color.text_disabled,
114+
R.color.color_SettingViews_text_disabled,
115115
activityRule.activity.resources
116116
)
117117
)
@@ -124,7 +124,7 @@ class RadiogroupSettingDefaultValuesTests {
124124
onView(withId(R.id.tv_desc)).check(
125125
matches(
126126
TextColorMatcher.withTextColor(
127-
R.color.text_disabled,
127+
R.color.color_SettingViews_text_disabled,
128128
activityRule.activity.resources
129129
)
130130
)

settingviews/src/androidTest/java/com/awolity/settingviews/RadiogroupSettingSaveStateTests.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ import org.junit.Rule
1313
import org.junit.Test
1414
import org.junit.runner.RunWith
1515
import com.awolity.settingviews.TextColorMatcher.withTextColor
16-
import kotlinx.android.synthetic.main.activity_mock_defaults_bs.*
1716
import kotlinx.android.synthetic.main.activity_mock_defaults_rs.*
18-
import org.hamcrest.CoreMatchers.not
19-
import java.lang.IllegalStateException
2017

2118
@RunWith(AndroidJUnit4::class)
2219
class RadiogroupSettingSaveStateTests {
@@ -43,13 +40,13 @@ class RadiogroupSettingSaveStateTests {
4340
@Test
4441
fun setTitleColor_Rotate_lookTitleColor() {
4542
activityRule.runOnUiThread {
46-
activityRule.activity.rs.setTitleTextColor(activityRule.activity.getColor(R.color.test_text_title))
43+
activityRule.activity.rs.setTitleTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_title))
4744
rotate()
4845
}
4946
onView(withId(R.id.tv_title)).check(
5047
matches(
5148
withTextColor(
52-
R.color.test_text_title,
49+
R.color.color_SettingViews_test_text_title,
5350
activityRule.activity.resources
5451
)
5552
)
@@ -68,13 +65,13 @@ class RadiogroupSettingSaveStateTests {
6865
@Test
6966
fun setDescriptionColor_Rotate_lookDescriptionColor() {
7067
activityRule.runOnUiThread {
71-
activityRule.activity.rs.setDescriptionTextColor(activityRule.activity.getColor(R.color.test_text_description))
68+
activityRule.activity.rs.setDescriptionTextColor(activityRule.activity.getColor(R.color.color_SettingViews_test_text_description))
7269
rotate()
7370
}
7471
onView(withId(R.id.tv_desc)).check(
7572
matches(
7673
withTextColor(
77-
R.color.test_text_description,
74+
R.color.color_SettingViews_test_text_description,
7875
activityRule.activity.resources
7976
)
8077
)

0 commit comments

Comments
 (0)