From c13e5f9f5b764e80e52d4e4166652c64ca4d34e6 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 23 Mar 2010 15:29:35 +0000 Subject: [PATCH] SPR-7009, SPR-6972: backed out unintentionally committed tests --- .../springframework/beans/Spr6972Tests.java | 35 -------- .../beans/Spr6972Tests-context.xml | 16 ---- ...InterceptorDoubleProxyingTests-context.xml | 56 ------------- ...sactionInterceptorDoubleProxyingTests.java | 82 ------------------- 4 files changed, 189 deletions(-) delete mode 100644 org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java delete mode 100644 org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml delete mode 100755 org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests-context.xml delete mode 100644 org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests.java diff --git a/org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java b/org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java deleted file mode 100644 index 6e1dfbbd4bd..00000000000 --- a/org.springframework.beans/src/test/java/org/springframework/beans/Spr6972Tests.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.springframework.beans; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.Map; - -import org.junit.Test; -import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.factory.xml.XmlBeanFactory; -import org.springframework.core.io.ClassPathResource; - -public class Spr6972Tests { - @Test - public void repro() { - BeanFactory bf = new XmlBeanFactory(new ClassPathResource("Spr6972Tests-context.xml", this.getClass())); - TestSpringBean bean = bf.getBean(TestSpringBean.class); - assertTrue(bean.bool); - assertNotNull(bean.map); - } -} - -class TestSpringBean { - boolean bool; - Map map; - - public TestSpringBean(boolean bool, Map map) { - this.bool = bool; - this.map = map; - } - - public TestSpringBean(Map map) { - this(true, map); - } -} diff --git a/org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml b/org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml deleted file mode 100644 index 6fef4988147..00000000000 --- a/org.springframework.beans/src/test/resources/org/springframework/beans/Spr6972Tests-context.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - entry1string1 - entry2string2 - entry3string3 - entry4string4 - - - - diff --git a/org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests-context.xml b/org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests-context.xml deleted file mode 100755 index 06254762fbd..00000000000 --- a/org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests-context.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.hibernate.dialect.HSQLDialect - create - false - - - - - - - - - - - - - - - - diff --git a/org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests.java b/org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests.java deleted file mode 100644 index 0a4892ca557..00000000000 --- a/org.springframework.integration-tests/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorDoubleProxyingTests.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2002-2010 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 org.springframework.transaction.interceptor; - - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Repository; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.transaction.IllegalTransactionStateException; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - - -/** - * Tests cornering SPR-7009. - * - * @author Chris Beams - */ -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration -public class TransactionInterceptorDoubleProxyingTests { - - @Autowired - TestRepository repository; - - @Test - public void test1() { - // method 1 is required, so no problem - assertThat(repository.method1(), equalTo("result1")); - } - - @Test(expected = IllegalTransactionStateException.class) - public void test2() { - // method 2 is mandatory, so expect exception - assertThat(repository.method2(), equalTo("result2")); - } - -} - - -interface TestRepository { - - public String method1(); - - public String method2(); - -} - -@Repository("testRepository") -class TestRepositoryImpl implements TestRepository { - - @Transactional - public String method1() { - return "result1"; - } - - @Transactional(propagation = Propagation.MANDATORY) - public String method2() { - return "result2"; - } - -}