@@ -8,15 +8,18 @@ import io.easyprefs.Prefs
8
8
import org.junit.Assert.assertEquals
9
9
import org.junit.Assert.assertTrue
10
10
import org.junit.Before
11
+ import org.junit.FixMethodOrder
11
12
import org.junit.Test
12
13
import org.junit.runner.RunWith
14
+ import org.junit.runners.MethodSorters
13
15
14
16
/* *
15
17
* Instrumented test, which will execute on an Android device.
16
18
*
17
19
* See [testing documentation](http://d.android.com/tools/testing).
18
20
*/
19
21
@RunWith(AndroidJUnit4 ::class )
22
+ @FixMethodOrder(MethodSorters .NAME_ASCENDING )
20
23
class PrefsContextFileTest {
21
24
22
25
private lateinit var context: Context
@@ -36,7 +39,7 @@ class PrefsContextFileTest {
36
39
}
37
40
38
41
@Test
39
- fun testCommitOp () {
42
+ fun test1_CommitOp () {
40
43
assertTrue(
41
44
Prefs .write(context, Const .PREF_SAMPLE_FILE_2 )
42
45
.content(Const .SAMPLE_STRING_KEY , p1)
@@ -51,7 +54,7 @@ class PrefsContextFileTest {
51
54
}
52
55
53
56
@Test
54
- fun testReadCommitOp () {
57
+ fun test2_ReadCommitOp () {
55
58
56
59
val o1 = Prefs .read(context, Const .PREF_SAMPLE_FILE_2 ).content(Const .SAMPLE_STRING_KEY , " " )
57
60
assertEquals(p1, o1)
@@ -76,7 +79,7 @@ class PrefsContextFileTest {
76
79
}
77
80
78
81
@Test
79
- fun testApplyOp () {
82
+ fun test3_ApplyOp () {
80
83
Prefs .write(context, Const .PREF_SAMPLE_FILE_2 )
81
84
.content(Const .SAMPLE_STRING_KEY_APPLY , p1)
82
85
.content(Const .SAMPLE_INT_KEY_APPLY , p2)
@@ -89,7 +92,7 @@ class PrefsContextFileTest {
89
92
}
90
93
91
94
@Test
92
- fun testReadApplyOp () {
95
+ fun test4_ReadApplyOp () {
93
96
94
97
val o1 = Prefs .read(context,
95
98
Const .PREF_SAMPLE_FILE_2
0 commit comments