Skip to content

Conversation

@gitup21
Copy link

@gitup21 gitup21 commented Jun 1, 2021

…nstrumentationRegistry.getTargetContext(); assertEquals("p32929.myadslibapp", appContext.getPackageName()); } }

package p32929.myadslibapp;

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("p32929.myadslibapp", appContext.getPackageName());
    

    }
    }

…ationRegistry.getTargetContext(); assertEquals("p32929.myadslibapp", appContext.getPackageName()); } }

package p32929.myadslibapp;

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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @test
    public void useAppContext() {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals("p32929.myadslibapp", appContext.getPackageName());
    }
}
@p32929
Copy link
Owner

p32929 commented Aug 22, 2021

Hello, Sorry for the late reply. I didn't even know this pull request existed until today. Github does have a terrible way of finding own repo issues...

Btw, what does this pull request do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants