Skip to content

Commit 6e8250b

Browse files
test case and data structures completed
1 parent 1c72a3b commit 6e8250b

29 files changed

+408
-40
lines changed

.idea/libraries/animated_vector_drawable_23_4_0.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/appcompat_v7_23_4_0.xml

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/cardview_v7_23_0_1.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/espresso_contrib_2_0.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/espresso_core_2_2_2.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/espresso_idling_resource_2_2_2.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/exposed_instrumentation_api_publish_0_5.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/hamcrest_core_1_3.xml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/hamcrest_integration_1_3.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/hamcrest_library_1_3.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/javawriter_2_1_1.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/javax_annotation_api_1_2.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/javax_inject_1.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/jsr305_2_0_1.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/junit_4_12.xml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/recyclerview_v7_23_0_1.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/rules_0_5.xml

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/runner_0_5.xml

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/support_annotations_23_4_0.xml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/support_v4_23_4_0.xml

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/support_vector_drawable_23_4_0.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ dependencies {
2525
testCompile 'junit:junit:4.12'
2626
compile 'com.android.support:appcompat-v7:23.+'
2727
compile 'com.android.support:recyclerview-v7:23.0.1'
28+
compile 'com.android.support:cardview-v7:23.0.1'
29+
2830
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2931
exclude group: 'com.android.support', module: 'support-annotations'
3032
})

app/src/androidTest/java/com/example/mani/classifyimg/MainActivityEspressoTest.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -75,25 +75,25 @@ public void loadRecycler()
7575
@Test
7676
public void loadXImages()
7777
{
78-
type("List 15 untagged images");
78+
type("List 4 untagged images");
7979

8080
onView(ViewMatchers.withId(R.id.recycler_view)).check(matches(isDisplayed()));
81-
onView(ViewMatchers.withId(R.id.recycler_view)).check(new RecyclerViewItemCountAssertion(15));
81+
onView(ViewMatchers.withId(R.id.recycler_view)).check(new RecyclerViewItemCountAssertion(4));
8282
}
8383

8484
@Test
8585
public void selectXImages()
8686
{
87-
type("List 15 untagged images");
87+
type("List 4 untagged images");
8888
type("select 1st 2nd 3rd images");
8989

9090
onView(ViewMatchers.withId(R.id.recycler_view)).check(matches(isDisplayed()));
91+
onView(withId(R.id.recycler_view)).perform(
92+
RecyclerViewActions.actionOnItemAtPosition(0, click()));
9193
onView(withId(R.id.recycler_view)).perform(
9294
RecyclerViewActions.actionOnItemAtPosition(1, click()));
9395
onView(withId(R.id.recycler_view)).perform(
9496
RecyclerViewActions.actionOnItemAtPosition(2, click()));
95-
onView(withId(R.id.recycler_view)).perform(
96-
RecyclerViewActions.actionOnItemAtPosition(3, click()));
9797

9898
onView(ViewMatchers.withId(R.id.recycler_view)).check(new RecyclerViewSelectedItemCountAssertion(3));
9999
}
@@ -109,7 +109,7 @@ private void type(String input) {
109109
public void classifyXImages()
110110
{
111111

112-
type("List 13 untagged images");
112+
type("List 4 untagged images");
113113
type("select 1st, 2nd and 3rd images");
114114
onView(ViewMatchers.withId(R.id.recycler_view)).check(matches(isDisplayed()));
115115

@@ -123,9 +123,9 @@ public void classifyXImages()
123123

124124
onView(ViewMatchers.withId(R.id.recycler_view)).check(new RecyclerViewSelectedItemCountAssertion(3));
125125

126-
type("classify as nature");
126+
type("classify images as nature");
127127
onView(ViewMatchers.withId(R.id.recycler_view)).check(new RecyclerViewSelectedItemCountAssertion(0));
128-
onView(ViewMatchers.withId(R.id.recycler_view)).check(new RecyclerViewItemCountAssertion(10));
128+
onView(ViewMatchers.withId(R.id.recycler_view)).check(new RecyclerViewItemCountAssertion(1));
129129

130130

131131
}

0 commit comments

Comments
 (0)