package main.habitivity;

import android.app.Activity;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;

import com.robotium.solo.Solo;

public class ActivityTests extends ActivityInstrumentationTestCase2<HabitivityMain>{

    private Solo solo;

    public ActivityTests() {
        super(main.habitivity.HabitivityMain.class);
    }

    public void setUp() throws Exception {
        solo = new Solo(getInstrumentation(), getActivity());
        Log.d("SETUP", "setUp()");
    }


    public void testStart() throws Exception {
        Activity activity = getActivity();
    }

    //add activity tests here

    @Override
    public void tearDown() throws Exception {
        solo.finishOpenedActivities();
    }
}

@@ -126,16 +126,48 @@
 til.Log;
+%0Aimport android.widget.EditText;
 %0A%0Aimport
@@ -260,30 +260,25 @@
 stCase2%3C
-HabitivityMain
+LoginUser
 %3E%7B%0A%0A    
@@ -360,22 +360,17 @@
 ity.
-HabitivityMain
+LoginUser
 .cla
@@ -568,32 +568,32 @@
 ows Exception %7B%0A
-
         Activity
@@ -622,24 +622,1070 @@
 y();%0A    %7D%0A%0A
+    public void testLogin() %7B%0A        solo.assertCurrentActivity(%22wrong activity%22, LoginUser.class);%0A        solo.enterText((EditText) solo.getView(R.id.userName), %22Test User%22);%0A%0A        solo.clickOnButton(%22OKAY%22);%0A%0A        assertTrue(solo.waitForText(%22Test User%22));%0A%0A        solo.clickOnActionBarHomeButton();%0A        solo.clickOnActionBarItem(1);%0A        solo.goBack();%0A%0A        solo.clickOnActionBarItem(2);%0A        solo.goBack();%0A%0A        solo.clickOnActionBarItem(3);%0A        solo.goBack();%0A        solo.goBack();%0A%0A        solo.clickOnActionBarHomeButton();%0A        solo.clickOnActionBarItem(0);%0A%0A        solo.enterText((EditText) solo.getView(R.id.habitInput), %22Test Habit%22);%0A        solo.enterText((EditText) solo.getView(R.id.addComment), %22For Testing Purposes Only%22);%0A        solo.clickOnButton(%22SUN%22);%0A        solo.clickOnButton(%22MON%22);%0A        solo.clickOnButton(%22ADD HABIT%22);%0A        solo.goBack();%0A%0A        assertTrue(solo.waitForText(%22Test User%22));%0A        solo.assertCurrentActivity(%22wrong activity%22, HabitivityMain.class);%0A    %7D%0A%0A
     //add ac

add activity testing