Browse Source

[SPR-5889] Renaming TestNG tests from *Tests_ back to *Tests, but keeping @org.junit.Ignore to exclude them from the JUnit test run.

conversation
Sam Brannen 16 years ago
parent
commit
91c9f544b1
  1. 23
      org.springframework.test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java
  2. 7
      org.springframework.test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java

23
org.springframework.test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests_.java → org.springframework.test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2009 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.
@ -26,7 +26,6 @@ import static org.testng.Assert.assertTrue; @@ -26,7 +26,6 @@ import static org.testng.Assert.assertTrue;
import javax.annotation.Resource;
import javax.sql.DataSource;
import org.junit.Ignore;
import org.springframework.beans.Employee;
import org.springframework.beans.Pet;
import org.springframework.beans.factory.BeanNameAware;
@ -52,31 +51,21 @@ import org.testng.annotations.Test; @@ -52,31 +51,21 @@ import org.testng.annotations.Test;
* @author Sam Brannen
* @since 2.5
*/
@Ignore // renamed to Tests_ to avoid being picked up by junit. Spring Build support for TestNG is pending.
@org.junit.Ignore("TestNG tests should not be run by JUnit")
@ContextConfiguration
public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTransactionalTestNGSpringContextTests
public class ConcreteTransactionalTestNGSpringContextTests extends AbstractTransactionalTestNGSpringContextTests
implements BeanNameAware, InitializingBean {
// ------------------------------------------------------------------------|
// --- CONSTANTS ----------------------------------------------------------|
// ------------------------------------------------------------------------|
private static final String BOB = "bob";
private static final String JANE = "jane";
private static final String SUE = "sue";
private static final String YODA = "yoda";
// ------------------------------------------------------------------------|
// --- STATIC VARIABLES ---------------------------------------------------|
// ------------------------------------------------------------------------|
private static int numSetUpCalls = 0;
private static int numSetUpCallsInTransaction = 0;
private static int numTearDownCalls = 0;
private static int numTearDownCallsInTransaction = 0;
// ------------------------------------------------------------------------|
// --- INSTANCE VARIABLES -------------------------------------------------|
// ------------------------------------------------------------------------|
private boolean beanInitialized = false;
@ -97,8 +86,6 @@ public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTran @@ -97,8 +86,6 @@ public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTran
protected String bar;
// ------------------------------------------------------------------------|
// --- STATIC METHODS -----------------------------------------------------|
// ------------------------------------------------------------------------|
private static int clearPersonTable(SimpleJdbcTemplate simpleJdbcTemplate) {
@ -126,8 +113,6 @@ public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTran @@ -126,8 +113,6 @@ public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTran
return simpleJdbcTemplate.update("DELETE FROM person WHERE name=?", name);
}
// ------------------------------------------------------------------------|
// --- INSTANCE METHODS ---------------------------------------------------|
// ------------------------------------------------------------------------|
public void afterPropertiesSet() throws Exception {
@ -275,8 +260,6 @@ public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTran @@ -275,8 +260,6 @@ public class ConcreteTransactionalTestNGSpringContextTests_ extends AbstractTran
}
// ------------------------------------------------------------------------|
// --- TYPES --------------------------------------------------------------|
// ------------------------------------------------------------------------|
public static class DatabaseSetup {

7
org.springframework.test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests_.java → org.springframework.test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2009 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.
@ -21,7 +21,6 @@ import static org.testng.Assert.assertNotNull; @@ -21,7 +21,6 @@ import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNotSame;
import static org.testng.Assert.assertSame;
import org.junit.Ignore;
import org.springframework.context.ApplicationContext;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
@ -48,9 +47,9 @@ import org.testng.annotations.Test; @@ -48,9 +47,9 @@ import org.testng.annotations.Test;
* @author Sam Brannen
* @since 2.5
*/
@Ignore // renamed to Tests_ to avoid being picked up by junit. Spring Build support for TestNG is pending.
@org.junit.Ignore("TestNG tests should not be run by JUnit")
@ContextConfiguration
public class DirtiesContextTransactionalTestNGSpringContextTests_ extends AbstractTransactionalTestNGSpringContextTests {
public class DirtiesContextTransactionalTestNGSpringContextTests extends AbstractTransactionalTestNGSpringContextTests {
private ApplicationContext dirtiedApplicationContext;
Loading…
Cancel
Save