Package org.junit.tests.running.classes

Source Code of org.junit.tests.running.classes.IgnoreClassTest$IgnoreMe

package org.junit.tests.running.classes;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;

public class IgnoreClassTest {
    @Ignore("For a good reason")
    public static class IgnoreMe {
        @Test
        public void iFail() {
            fail();
        }

        @Test
        public void iFailToo() {
            fail();
        }
    }

    @Test
    public void ignoreClass() {
        Result result = JUnitCore.runClasses(IgnoreMe.class);
        assertEquals(0, result.getFailureCount());
        assertEquals(1, result.getIgnoreCount());
    }
}
TOP

Related Classes of org.junit.tests.running.classes.IgnoreClassTest$IgnoreMe

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.