-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format sample projects java code with gjf
- Loading branch information
Gautam Korlam
committed
May 17, 2018
1 parent
47ebc8e
commit 36c744f
Showing
54 changed files
with
1,475 additions
and
1,509 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
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
37 changes: 17 additions & 20 deletions
37
app/src/androidTest/java/com/uber/okbuck/example/test/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 |
---|---|---|
@@ -1,36 +1,33 @@ | ||
package com.uber.okbuck.example.test; | ||
|
||
import static android.support.test.espresso.Espresso.onView; | ||
import static android.support.test.espresso.assertion.ViewAssertions.matches; | ||
import static android.support.test.espresso.matcher.ViewMatchers.withId; | ||
import static android.support.test.espresso.matcher.ViewMatchers.withText; | ||
import static junit.framework.Assert.assertEquals; | ||
|
||
import android.support.test.rule.ActivityTestRule; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import com.uber.okbuck.example.MainActivity; | ||
import com.uber.okbuck.example.R; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static android.support.test.espresso.Espresso.onView; | ||
import static android.support.test.espresso.assertion.ViewAssertions.matches; | ||
import static android.support.test.espresso.matcher.ViewMatchers.withId; | ||
import static android.support.test.espresso.matcher.ViewMatchers.withText; | ||
import static junit.framework.Assert.assertEquals; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class MainActivityTest { | ||
|
||
@Rule | ||
public ActivityTestRule<MainActivity> rule = | ||
new ActivityTestRule(MainActivity.class, true, true); | ||
@Rule | ||
public ActivityTestRule<MainActivity> rule = new ActivityTestRule(MainActivity.class, true, true); | ||
|
||
@Test | ||
public void checkTextDisplayed() { | ||
onView(withId(R.id.mTextView2)).check(matches(withText("test in app"))); | ||
} | ||
@Test | ||
public void checkTextDisplayed() { | ||
onView(withId(R.id.mTextView2)).check(matches(withText("test in app"))); | ||
} | ||
|
||
@Test | ||
public void java8LambdaCompilesAndWorksInInstrumentationApk() { | ||
Runnable runnable = () -> assertEquals(3, 2 + 1); | ||
runnable.run(); | ||
} | ||
@Test | ||
public void java8LambdaCompilesAndWorksInInstrumentationApk() { | ||
Runnable runnable = () -> assertEquals(3, 2 + 1); | ||
runnable.run(); | ||
} | ||
} |
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.