Skip to content

Instantly share code, notes, and snippets.

@pictos
Last active July 18, 2017 05:15
Show Gist options
  • Save pictos/d0a945bafec96b04f10a24a907b886a5 to your computer and use it in GitHub Desktop.
Save pictos/d0a945bafec96b04f10a24a907b886a5 to your computer and use it in GitHub Desktop.
Teste
package com.example.pedroj.bluettohsc;
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.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.pedroj.bluettohsc", appContext.getPackageName());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment