/*
 * Copyright 2015-2018 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v2.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v20.html
 */

package org.junit.vintage.engine.samples.junit4;

import static org.junit.Assert.fail;

import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runners.MethodSorters;

@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class PlainJUnit4TestCaseWithLifecycleMethods {

	public static final List<String> EVENTS = new ArrayList<>();

	@BeforeClass
	public static void beforeClass() {
		EVENTS.add("beforeClass");
	}

	@Before
	public void before() {
		EVENTS.add("before");
	}

	@Test
	public void failingTest() {
		EVENTS.add("failingTest");
		fail();
	}

	@Test
	@Ignore("skipped")
	public void skippedTest() {
	}

	@Test
	public void succeedingTest() {
		EVENTS.add("succeedingTest");
	}

	@After
	public void after() {
		EVENTS.add("after");
	}

	@AfterClass
	public static void afterClass() {
		EVENTS.add("afterClass");
	}
}

@@ -1121,16 +1121,96 @@
 est() %7B%0A
+%09%09EVENTS.add(%22this should never ever be executed because the test is skipped%22);%0A
 %09%7D%0A%0A%09@Te

Check that ignored Vintage test methods are not executed