mercredi 6 mai 2015

Test events were not received - Android Studio

I have no idea how to test and I was following a tutorial.I am trying to run:

package name.company.sunshine.app.data;

import android.test.AndroidTestCase;

public class TestPractice extends AndroidTestCase {
    /*
        This gets run before every test.
     */
    @Override
    protected void setUp() throws Exception {
        super.setUp();
    }

    public void testThatDemonstratesAssertions() throws Throwable {
        int a = 5;
        int b = 3;
        int c = 5;
        int d = 10;

        assertEquals("X should be equal", a, c);
        assertTrue("Y should be true", d > a);
        assertFalse("Z should be false", a == b);

        if (b > d) {
            fail("XX should never happen");
        }
    }

    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
    }
}

but I get somewhere in the bottom left corner, in the console Test events were not received. What am I doing wrong ? Should I run something else ?

Aucun commentaire:

Enregistrer un commentaire