Prechádzať zdrojové kódy

Add Yiupang's test cases' templates and home btn on activity_login

Yiupang 9 rokov pred
rodič
commit
000e7f97cf

+ 1 - 0
app/src/main/java/com/example/yiupang/freefoodfinder/EventsScreen.java

@@ -6,6 +6,7 @@ import android.os.Parcelable;
 import android.support.annotation.Nullable;
 
 import android.support.v4.app.Fragment;
+import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;

+ 8 - 0
app/src/main/res/layout/activity_login.xml

@@ -34,6 +34,14 @@
         android:layout_alignParentBottom="true"
         android:layout_centerHorizontal="true" />
 
+    <Button
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:text="@string/home"
+        android:layout_marginBottom="60dp"
+        android:layout_alignParentBottom="true"
+        android:layout_centerHorizontal="true"  />
+
      <ImageView
         android:id="@+id/imageView"
         android:layout_width="wrap_content"

+ 1 - 0
app/src/main/res/layout/tool_bar.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/top_toolBar"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="#ff0000"

+ 2 - 0
app/src/main/res/values/strings.xml

@@ -15,4 +15,6 @@
     <string name="food_type">Food type: </string>
     <string name="description">Description: </string>
     <string name="host">Host </string>
+
+    <string name="home">Home</string>
 </resources>

+ 13 - 0
app/src/test/java/com/example/yiupang/freefoodfinder/TestHttpCall.java

@@ -0,0 +1,13 @@
+package com.example.yiupang.freefoodfinder;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+/**
+ * Created by yiupang on 6/1/2017.
+ *
+ */
+class TestHttpCall
+{
+
+}

+ 24 - 0
app/src/test/java/com/example/yiupang/freefoodfinder/TestHttpRequest.java

@@ -0,0 +1,24 @@
+package com.example.yiupang.freefoodfinder;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+/**
+ * Created by yiupang on 6/1/2017.
+ *
+ */
+class TestHttpRequest
+{
+    @Test
+    public void testParingDataString()
+    {
+
+    }
+
+    @Test
+    public void testDoInBackground()
+    {
+
+    }
+}

+ 16 - 0
app/src/test/java/com/example/yiupang/freefoodfinder/TestHttpSuite.java

@@ -0,0 +1,16 @@
+package com.example.yiupang.freefoodfinder;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Created by yiupang on 6/1/2017.
+ *
+ */
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({TestHttpCall.class, TestHttpRequest.class})
+public class TestHttpSuite
+{
+
+}