File tree Expand file tree Collapse file tree 3 files changed +33
-20
lines changed
app/src/test/java/agency/tango/databindingrxjava Expand file tree Collapse file tree 3 files changed +33
-20
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ package agency .tango .databindingrxjava ;
2
+
3
+ import org .junit .Test ;
4
+
5
+ import static junit .framework .Assert .assertFalse ;
6
+ import static junit .framework .Assert .assertTrue ;
7
+
8
+ public class MainViewModelTests {
9
+
10
+ @ Test
11
+ public void mainViewModel_firstName_lastName_helloButtonEnabledSetToTrue () throws Exception {
12
+ MainActivity .MainViewModel mainViewModel = new MainActivity .MainViewModel ();
13
+
14
+ assertFalse (mainViewModel .helloButtonEnabled .get ());
15
+
16
+ mainViewModel .firstName .set ("a" );
17
+ mainViewModel .lastName .set ("b" );
18
+
19
+ assertTrue (mainViewModel .helloButtonEnabled .get ());
20
+ }
21
+
22
+ @ Test
23
+ public void mainViewModel_firstName_lastNameEmpty_helloButtonEnabledSetToFalse () throws Exception {
24
+ MainActivity .MainViewModel mainViewModel = new MainActivity .MainViewModel ();
25
+
26
+ mainViewModel .firstName .set ("a" );
27
+ mainViewModel .lastName .set ("" );
28
+
29
+ assertFalse (mainViewModel .helloButtonEnabled .get ());
30
+
31
+ }
32
+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
jcenter()
6
6
}
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:2.2.0-rc1 '
8
+ classpath ' com.android.tools.build:gradle:2.2.0'
9
9
classpath ' me.tatarka:gradle-retrolambda:3.3.0-beta4'
10
10
// NOTE: Do not place your application dependencies here; they belong
11
11
// in the individual module build.gradle files
You can’t perform that action at this time.
0 commit comments