From 9010474bc169668950665b1c8fd54d68a38ef913 Mon Sep 17 00:00:00 2001 From: SUMUDU-SAHAN Date: Tue, 6 Aug 2019 10:08:44 +0530 Subject: [PATCH] First Commit --- .../ExampleInstrumentedTest.java | 26 +++++++++++++++++++ .../ssw/linkedinlibrary/ExampleUnitTest.java | 17 ++++++++++++ .../ExampleInstrumentedTest.java | 26 +++++++++++++++++++ .../ssw/linkedinmanager/ExampleUnitTest.java | 17 ++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 app/src/androidTest/java/com/ssw/linkedinlibrary/ExampleInstrumentedTest.java create mode 100644 app/src/test/java/com/ssw/linkedinlibrary/ExampleUnitTest.java create mode 100644 linkedinmanager/src/androidTest/java/com/ssw/linkedinmanager/ExampleInstrumentedTest.java create mode 100644 linkedinmanager/src/test/java/com/ssw/linkedinmanager/ExampleUnitTest.java diff --git a/app/src/androidTest/java/com/ssw/linkedinlibrary/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/ssw/linkedinlibrary/ExampleInstrumentedTest.java new file mode 100644 index 0000000..1895442 --- /dev/null +++ b/app/src/androidTest/java/com/ssw/linkedinlibrary/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.ssw.linkedinlibrary; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("com.ssw.linkedinlibrary", appContext.getPackageName()); + } +} diff --git a/app/src/test/java/com/ssw/linkedinlibrary/ExampleUnitTest.java b/app/src/test/java/com/ssw/linkedinlibrary/ExampleUnitTest.java new file mode 100644 index 0000000..fe0d022 --- /dev/null +++ b/app/src/test/java/com/ssw/linkedinlibrary/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.ssw.linkedinlibrary; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/linkedinmanager/src/androidTest/java/com/ssw/linkedinmanager/ExampleInstrumentedTest.java b/linkedinmanager/src/androidTest/java/com/ssw/linkedinmanager/ExampleInstrumentedTest.java new file mode 100644 index 0000000..9648623 --- /dev/null +++ b/linkedinmanager/src/androidTest/java/com/ssw/linkedinmanager/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.ssw.linkedinmanager; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("com.ssw.linkedinmanager.test", appContext.getPackageName()); + } +} diff --git a/linkedinmanager/src/test/java/com/ssw/linkedinmanager/ExampleUnitTest.java b/linkedinmanager/src/test/java/com/ssw/linkedinmanager/ExampleUnitTest.java new file mode 100644 index 0000000..eca5b30 --- /dev/null +++ b/linkedinmanager/src/test/java/com/ssw/linkedinmanager/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.ssw.linkedinmanager; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file