// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/testutils/MustNoSwallowTestExecutionListener.java
// public class MustNoSwallowTestExecutionListener extends TransactionDbUnitTestExecutionListener {
// 
// 	@Override
// 	public void afterTestMethod(TestContext testContext) throws Exception {
// 		Assert.assertTrue(testContext.getTestException() instanceof NotSwallowedException);
// 		try {
// 			super.afterTestMethod(testContext);
// 		} catch (Throwable ex) {
// 			Assert.fail("Throw exception");
// 		}
// 	}
// 
// }
// 
// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/testutils/MustNotSwallowSpringJUnit4ClassRunner.java
// public class MustNotSwallowSpringJUnit4ClassRunner extends SpringJUnit4ClassRunner {
// 
// 	public MustNotSwallowSpringJUnit4ClassRunner(Class<?> clazz) throws InitializationError {
// 		super(clazz);
// 	}
// 
// 	@Override
// 	public void run(RunNotifier notifier) {
// 		AdvisedSupport config = new AdvisedSupport();
// 		config.setTarget(notifier);
// 		config.addAdvice(new org.aopalliance.intercept.MethodInterceptor() {
// 			public Object invoke(MethodInvocation invocation) throws Throwable {
// 				if ("fireTestFailure".equals(invocation.getMethod().getName())) {
// 					Failure failure = (Failure) invocation.getArguments()[0];
// 					if (failure.getException() instanceof NotSwallowedException) {
// 						// We expect this
// 						return null;
// 					}
// 				}
// 				return invocation.proceed();
// 			}
// 		});
// 		DefaultAopProxyFactory aopProxyFactory = new DefaultAopProxyFactory();
// 		RunNotifier runNotifierProxy = (RunNotifier) aopProxyFactory.createAopProxy(config).getProxy();
// 		super.run(runNotifierProxy);
// 	}
// 
// }
// 
// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/testutils/NotSwallowedException.java
// public class NotSwallowedException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.transaction.annotation.Transactional;
import com.github.springtestdbunit.annotation.ExpectedDatabase;
import com.github.springtestdbunit.testutils.MustNoSwallowTestExecutionListener;
import com.github.springtestdbunit.testutils.MustNotSwallowSpringJUnit4ClassRunner;
import com.github.springtestdbunit.testutils.NotSwallowedException;
/*
 * Copyright 2002-2016 the original author or authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.springtestdbunit.expected;



@RunWith(MustNotSwallowSpringJUnit4ClassRunner.class)
@ContextConfiguration("/META-INF/dbunit-context.xml")
// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/testutils/MustNoSwallowTestExecutionListener.java
// public class MustNoSwallowTestExecutionListener extends TransactionDbUnitTestExecutionListener {
// 
// 	@Override
// 	public void afterTestMethod(TestContext testContext) throws Exception {
// 		Assert.assertTrue(testContext.getTestException() instanceof NotSwallowedException);
// 		try {
// 			super.afterTestMethod(testContext);
// 		} catch (Throwable ex) {
// 			Assert.fail("Throw exception");
// 		}
// 	}
// 
// }
// 
// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/testutils/MustNotSwallowSpringJUnit4ClassRunner.java
// public class MustNotSwallowSpringJUnit4ClassRunner extends SpringJUnit4ClassRunner {
// 
// 	public MustNotSwallowSpringJUnit4ClassRunner(Class<?> clazz) throws InitializationError {
// 		super(clazz);
// 	}
// 
// 	@Override
// 	public void run(RunNotifier notifier) {
// 		AdvisedSupport config = new AdvisedSupport();
// 		config.setTarget(notifier);
// 		config.addAdvice(new org.aopalliance.intercept.MethodInterceptor() {
// 			public Object invoke(MethodInvocation invocation) throws Throwable {
// 				if ("fireTestFailure".equals(invocation.getMethod().getName())) {
// 					Failure failure = (Failure) invocation.getArguments()[0];
// 					if (failure.getException() instanceof NotSwallowedException) {
// 						// We expect this
// 						return null;
// 					}
// 				}
// 				return invocation.proceed();
// 			}
// 		});
// 		DefaultAopProxyFactory aopProxyFactory = new DefaultAopProxyFactory();
// 		RunNotifier runNotifierProxy = (RunNotifier) aopProxyFactory.createAopProxy(config).getProxy();
// 		super.run(runNotifierProxy);
// 	}
// 
// }
// 
// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/testutils/NotSwallowedException.java
// public class NotSwallowedException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }


// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/expected/DoesNotSwallowExpectedFailureTest.java
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.transaction.annotation.Transactional;
import com.github.springtestdbunit.annotation.ExpectedDatabase;
import com.github.springtestdbunit.testutils.MustNoSwallowTestExecutionListener;
import com.github.springtestdbunit.testutils.MustNotSwallowSpringJUnit4ClassRunner;
import com.github.springtestdbunit.testutils.NotSwallowedException;

/*
 * Copyright 2002-2016 the original author or authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.springtestdbunit.expected;



@RunWith(MustNotSwallowSpringJUnit4ClassRunner.class)
@ContextConfiguration("/META-INF/dbunit-context.xml")
@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class, MustNoSwallowTestExecutionListener.class })