-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from nus-mtp/android-streams-implementation
Android streams implementation
- Loading branch information
Showing
57 changed files
with
2,247 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
...nt/android/WorldScope/app/src/androidTest/java/com/litmus/worldscope/ApplicationTest.java
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
.../WorldScope/app/src/androidTest/java/com/litmus/worldscope/FacebookLoginActivityTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.litmus.worldscope; | ||
|
||
import android.app.Instrumentation; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.rule.ActivityTestRule; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import com.litmus.worldscope.model.WorldScopeUser; | ||
|
||
import junit.framework.TestCase; | ||
|
||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class FacebookLoginActivityTest extends TestCase{ | ||
|
||
private FacebookLoginActivity facebookLoginActivity; | ||
|
||
|
||
@Rule | ||
public ActivityTestRule<FacebookLoginActivity> activityRule = new ActivityTestRule<>( | ||
FacebookLoginActivity.class); | ||
|
||
@Before | ||
public void setUp() { | ||
facebookLoginActivity = activityRule.getActivity(); | ||
} | ||
|
||
@Test | ||
public void testTrue() { | ||
assertEquals(true, true); | ||
} | ||
|
||
@Test | ||
public void testRedirectToMainActivity() { | ||
String testUserName = "testUserName"; | ||
WorldScopeUser mockUser = new WorldScopeUser(); | ||
Instrumentation.ActivityMonitor am = InstrumentationRegistry.getInstrumentation().addMonitor(MainActivity.class.getName(), null, true); | ||
facebookLoginActivity.redirectToMainActivity(mockUser); | ||
assertEquals(1, am.getHits()); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
...t/android/WorldScope/app/src/androidTest/java/com/litmus/worldscope/MainActivityTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.litmus.worldscope; | ||
|
||
import android.app.Instrumentation; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.rule.ActivityTestRule; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import junit.framework.TestCase; | ||
|
||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class MainActivityTest extends TestCase{ | ||
|
||
private static final Boolean IS_LOGOUT_ATTEMPT = true; | ||
private MainActivity mainActivity; | ||
|
||
|
||
@Rule | ||
public ActivityTestRule<MainActivity> activityRule = new ActivityTestRule<>( | ||
MainActivity.class); | ||
|
||
@Before | ||
public void setUp() { | ||
mainActivity = activityRule.getActivity(); | ||
} | ||
|
||
@Test | ||
public void testTrue() { | ||
assertEquals(true, true); | ||
} | ||
|
||
@Test | ||
public void testRedirectToStreamActivity() { | ||
Instrumentation.ActivityMonitor am = InstrumentationRegistry.getInstrumentation() | ||
.addMonitor(StreamActivity.class.getName(), null, true); | ||
mainActivity.redirectToStreamActivity(); | ||
assertEquals(1, am.getHits()); | ||
} | ||
|
||
@Test | ||
public void testRedirectToViewActivity() { | ||
Instrumentation.ActivityMonitor am = InstrumentationRegistry.getInstrumentation() | ||
.addMonitor(ViewActivity.class.getName(), null, true); | ||
mainActivity.redirectToViewActivity(); | ||
assertEquals(1, am.getHits()); | ||
} | ||
|
||
@Test | ||
public void testRedirectToFacebookLoginActivity() { | ||
Instrumentation.ActivityMonitor am = InstrumentationRegistry.getInstrumentation() | ||
.addMonitor(FacebookLoginActivity.class.getName(), null, true); | ||
mainActivity.redirectToFacebookLoginActivity(IS_LOGOUT_ATTEMPT); | ||
assertEquals(1, am.getHits()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
5 changes: 5 additions & 0 deletions
5
client/android/WorldScope/app/src/main/assets/welcomeGifAssets/welcome.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<head> | ||
</head> | ||
<body style="background-color: #000000; margin:0px; padding: 0px; height: 100%; width: 100%;"> | ||
<img style="height: auto; width: 100%; max-height: 100%" alt="Welcome GIF" src="welcome.gif"> | ||
</body> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.