Skip to content

Commit

Permalink
update to unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eshza committed Nov 13, 2017
1 parent d583564 commit fe4dd6f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import java.util.Comparator;
import java.util.Date;

public class HabitEventHistoryTest extends ActivityInstrumentationTestCase2 {
public HabitEventHistoryTest(){
public class HabitEventHistoryTests extends ActivityInstrumentationTestCase2 {
public HabitEventHistoryTests(){
super(com.cmput301f17t11.cupofjava.MainActivity.class);
}

Expand All @@ -37,7 +37,7 @@ public void testDelete(){
assertFalse(eventHistory.hasHabitEvent(event));
}

public void testGetHabitEvent(){
public void testGetHabitEvent(){
//Habit habit = new Habit("adding habit", "for test",Calendar.getInstance());
HabitEvent event = new HabitEvent("comment1");
HabitEventHistory eventHistory = new HabitEventHistory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public void testLogin(){
solo.clickOnText("DELETE");

solo.sleep(2000);
//test timeline button
solo.assertCurrentActivity("parent activity", TodayViewActivity.class);
solo.clickOnView(solo.getView(R.id.action_timeline));
solo.assertCurrentActivity("child activity", HabitEventTimeLineActivity.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public class AllHabitViewActivity extends Activity {
private String userName;
private int userIndex;

public ListView getListView(){
return listView;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down

0 comments on commit fe4dd6f

Please sign in to comment.