From 1c61108835e926dd72de55b4f4164ed8ec0b907f Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 9 May 2021 15:27:15 -0400 Subject: [PATCH 1/4] [tests] More code cleanup --- .../ibatis/sqlmap/DerbyParameterMapTest.java | 1 + .../sqlmap/ResultObjectFactoryImpl.java | 2 ++ .../java/com/ibatis/sqlmap/StatementTest.java | 3 ++- .../HundredsTypeHandlerCallback.java | 3 +++ .../extensions/PirateTypeHandlerCallback.java | 3 +++ src/test/java/testdomain/IItemImpl.java | 22 +++++++++++++++++++ src/test/java/testdomain/ISupplierImpl.java | 16 ++++++++++++++ .../java/testdomain/ISupplierKeyImpl.java | 2 ++ src/test/java/xmltester/MiniElement.java | 12 +++++----- 9 files changed, 57 insertions(+), 7 deletions(-) diff --git a/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java b/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java index f466f66c..aa0766c9 100644 --- a/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java @@ -26,6 +26,7 @@ public class DerbyParameterMapTest extends ParameterMapTest { // SETUP & TEARDOWN + @Override @BeforeEach public void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml", null); diff --git a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java index 62e097f0..e4da17ce 100644 --- a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java +++ b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java @@ -43,6 +43,7 @@ public ResultObjectFactoryImpl() { * (non-Javadoc) * @see com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactory#createInstance(java.lang.String, java.lang.Class) */ + @Override public Object createInstance(String statementId, Class clazz) throws InstantiationException, IllegalAccessException { Object obj = null; @@ -62,6 +63,7 @@ public Object createInstance(String statementId, Class clazz) throws Instantiati * (non-Javadoc) * @see com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactory#setProperty(java.lang.String, java.lang.String) */ + @Override public void setProperty(String name, String value) { Log log = LogFactory.getLog(this.getClass()); diff --git a/src/test/java/com/ibatis/sqlmap/StatementTest.java b/src/test/java/com/ibatis/sqlmap/StatementTest.java index 62fe6bbc..9d53b297 100644 --- a/src/test/java/com/ibatis/sqlmap/StatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/StatementTest.java @@ -876,7 +876,7 @@ public void testExecuteUpdateWithParameterClass() throws SQLException { public void testQueryDynamicSqlElement() throws SQLException { List list = sqlMap.queryForList("getDynamicOrderedEmailAddressesViaResultMap", "ACC_ID"); - assertEquals("clinton.begin@ibatis.com", (String) list.get(0)); + assertEquals("clinton.begin@ibatis.com", list.get(0)); list = sqlMap.queryForList("getDynamicOrderedEmailAddressesViaResultMap", "ACC_FIRST_NAME"); @@ -891,6 +891,7 @@ public class TestRowHandler implements RowHandler { private List list = new ArrayList(); + @Override public void handleRow(Object object) { index++; assertEquals(index, ((Account) object).getId()); diff --git a/src/test/java/com/ibatis/sqlmap/extensions/HundredsTypeHandlerCallback.java b/src/test/java/com/ibatis/sqlmap/extensions/HundredsTypeHandlerCallback.java index 6af4980f..37710214 100644 --- a/src/test/java/com/ibatis/sqlmap/extensions/HundredsTypeHandlerCallback.java +++ b/src/test/java/com/ibatis/sqlmap/extensions/HundredsTypeHandlerCallback.java @@ -24,6 +24,7 @@ public class HundredsTypeHandlerCallback implements TypeHandlerCallback { + @Override public Object getResult(ResultGetter getter) throws SQLException { int i = getter.getInt(); if (i == 100) { @@ -35,6 +36,7 @@ public Object getResult(ResultGetter getter) throws SQLException { } } + @Override public void setParameter(ParameterSetter setter, Object parameter) throws SQLException { boolean b = ((Boolean) parameter).booleanValue(); if (b) { @@ -44,6 +46,7 @@ public void setParameter(ParameterSetter setter, Object parameter) throws SQLExc } } + @Override public Object valueOf(String s) { if ("100".equalsIgnoreCase(s)) { return new Boolean(true); diff --git a/src/test/java/com/ibatis/sqlmap/extensions/PirateTypeHandlerCallback.java b/src/test/java/com/ibatis/sqlmap/extensions/PirateTypeHandlerCallback.java index df946c06..c999d33b 100644 --- a/src/test/java/com/ibatis/sqlmap/extensions/PirateTypeHandlerCallback.java +++ b/src/test/java/com/ibatis/sqlmap/extensions/PirateTypeHandlerCallback.java @@ -24,6 +24,7 @@ public class PirateTypeHandlerCallback implements TypeHandlerCallback { + @Override public Object getResult(ResultGetter getter) throws SQLException { String s = getter.getString(); if ("Aye".equalsIgnoreCase(s)) { @@ -35,6 +36,7 @@ public Object getResult(ResultGetter getter) throws SQLException { } } + @Override public void setParameter(ParameterSetter setter, Object parameter) throws SQLException { boolean b = ((Boolean) parameter).booleanValue(); if (b) { @@ -44,6 +46,7 @@ public void setParameter(ParameterSetter setter, Object parameter) throws SQLExc } } + @Override public Object valueOf(String s) { if ("Aye".equalsIgnoreCase(s)) { return new Boolean(true); diff --git a/src/test/java/testdomain/IItemImpl.java b/src/test/java/testdomain/IItemImpl.java index 44fd808c..678b5212 100644 --- a/src/test/java/testdomain/IItemImpl.java +++ b/src/test/java/testdomain/IItemImpl.java @@ -43,90 +43,112 @@ public IItemImpl() { super(); } + @Override public String getAttribute1() { return attribute1; } + @Override public void setAttribute1(String attribute1) { this.attribute1 = attribute1; } + @Override public String getAttribute2() { return attribute2; } + @Override public void setAttribute2(String attribute2) { this.attribute2 = attribute2; } + @Override public String getAttribute3() { return attribute3; } + @Override public void setAttribute3(String attribute3) { this.attribute3 = attribute3; } + @Override public String getAttribute4() { return attribute4; } + @Override public void setAttribute4(String attribute4) { this.attribute4 = attribute4; } + @Override public String getAttribute5() { return attribute5; } + @Override public void setAttribute5(String attribute5) { this.attribute5 = attribute5; } + @Override public String getItemId() { return itemId; } + @Override public void setItemId(String itemId) { this.itemId = itemId; } + @Override public BigDecimal getListPrice() { return listPrice; } + @Override public void setListPrice(BigDecimal listPrice) { this.listPrice = listPrice; } + @Override public String getProductId() { return productId; } + @Override public void setProductId(String productId) { this.productId = productId; } + @Override public String getStatus() { return status; } + @Override public void setStatus(String status) { this.status = status; } + @Override public ISupplier getSupplier() { return supplier; } + @Override public void setSupplier(ISupplier supplier) { this.supplier = supplier; } + @Override public BigDecimal getUnitCost() { return unitCost; } + @Override public void setUnitCost(BigDecimal unitCost) { this.unitCost = unitCost; } diff --git a/src/test/java/testdomain/ISupplierImpl.java b/src/test/java/testdomain/ISupplierImpl.java index 03729a6e..42c75b6f 100644 --- a/src/test/java/testdomain/ISupplierImpl.java +++ b/src/test/java/testdomain/ISupplierImpl.java @@ -38,66 +38,82 @@ public ISupplierImpl() { super(); } + @Override public String getAddressLine1() { return addressLine1; } + @Override public void setAddressLine1(String addressLine1) { this.addressLine1 = addressLine1; } + @Override public String getAddressLine2() { return addressLine2; } + @Override public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; } + @Override public String getCity() { return city; } + @Override public void setCity(String city) { this.city = city; } + @Override public String getName() { return name; } + @Override public void setName(String name) { this.name = name; } + @Override public String getPhone() { return phone; } + @Override public void setPhone(String phone) { this.phone = phone; } + @Override public String getState() { return state; } + @Override public void setState(String state) { this.state = state; } + @Override public String getStatus() { return status; } + @Override public void setStatus(String status) { this.status = status; } + @Override public String getZip() { return zip; } + @Override public void setZip(String zip) { this.zip = zip; } diff --git a/src/test/java/testdomain/ISupplierKeyImpl.java b/src/test/java/testdomain/ISupplierKeyImpl.java index 2fdbd580..9dfa3421 100644 --- a/src/test/java/testdomain/ISupplierKeyImpl.java +++ b/src/test/java/testdomain/ISupplierKeyImpl.java @@ -32,10 +32,12 @@ public ISupplierKeyImpl() { super(); } + @Override public Integer getSupplierId() { return supplierId; } + @Override public void setSupplierId(Integer supplierId) { this.supplierId = supplierId; } diff --git a/src/test/java/xmltester/MiniElement.java b/src/test/java/xmltester/MiniElement.java index 83f4d44a..f80d104b 100644 --- a/src/test/java/xmltester/MiniElement.java +++ b/src/test/java/xmltester/MiniElement.java @@ -68,15 +68,15 @@ public void addAttribute(MiniAttribute attribute) { } public MiniAttribute getAttribute(int i) { - return (MiniAttribute) attributeList.get(i); + return attributeList.get(i); } public MiniAttribute getAttribute(String name) { - return (MiniAttribute) attributeMap.get(name); + return attributeMap.get(name); } public MiniAttribute removeAttribute(int i) { - return (MiniAttribute) attributeList.remove(i); + return attributeList.remove(i); } public int getAttributeCount() { @@ -90,15 +90,15 @@ public void addElement(MiniElement element) { } public MiniElement getElement(int i) { - return (MiniElement) elementList.get(i); + return elementList.get(i); } public MiniElement getElement(String name) { - return (MiniElement) elementMap.get(name); + return elementMap.get(name); } public MiniElement removeElement(int i) { - return (MiniElement) elementList.remove(i); + return elementList.remove(i); } public int getElementCount() { From a35c060959ce42a5c020c775cc0c514323b544ad Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 9 May 2021 15:31:49 -0400 Subject: [PATCH 2/4] [tests] Use junit 5 style for classes/methods --- .../com/ibatis/common/beans/BadBeanTest.java | 14 +-- .../common/beans/ComplexBeanProbeTest.java | 4 +- .../common/beans/JavaBeanProbeTest.java | 12 +-- .../common/beans/PropertyAccessPlanTest.java | 4 +- .../common/resources/ResourcesTest.java | 36 ++++---- .../common/util/PaginatedArrayListTest.java | 10 +- .../ibatis/common/xml/NodeletUtilsTest.java | 8 +- .../com/ibatis/sqlmap/BaseSqlMapTest.java | 4 +- .../java/com/ibatis/sqlmap/BatchTest.java | 10 +- .../com/ibatis/sqlmap/CacheStatementTest.java | 32 +++---- .../com/ibatis/sqlmap/ComplexTypeTest.java | 6 +- .../ibatis/sqlmap/DerbyParameterMapTest.java | 4 +- .../ibatis/sqlmap/DirectFieldMappingTest.java | 8 +- .../com/ibatis/sqlmap/DiscriminatorTest.java | 10 +- .../com/ibatis/sqlmap/DomStatementTest.java | 12 +-- .../com/ibatis/sqlmap/DynamicPrependTest.java | 32 +++---- .../java/com/ibatis/sqlmap/DynamicTest.java | 52 +++++------ .../java/com/ibatis/sqlmap/IterateTest.java | 32 +++---- .../com/ibatis/sqlmap/MultiResultSetTest.java | 10 +- .../com/ibatis/sqlmap/NestedIterateTest.java | 66 ++++++------- .../com/ibatis/sqlmap/ParameterMapTest.java | 18 ++-- .../sqlmap/PrivateMethodAccessTest.java | 6 +- .../sqlmap/RepeatingGroupMappingTest.java | 12 +-- .../java/com/ibatis/sqlmap/ResultMapTest.java | 38 ++++---- .../sqlmap/ResultObjectFactoryTest.java | 6 +- .../java/com/ibatis/sqlmap/StatementTest.java | 92 +++++++++---------- .../com/ibatis/sqlmap/TransactionTest.java | 20 ++-- .../com/ibatis/sqlmap/XmlStatementTest.java | 12 +-- .../SqlMapClasspathEntityResolverTest.java | 20 ++-- .../sqlmap/engine/cache/CacheKeyTest.java | 4 +- .../cache/fifo/FifoCacheControllerTest.java | 2 +- .../cache/lru/LruCacheControllerTest.java | 10 +- .../memory/MemoryCacheControllerTest.java | 4 +- .../InlineParameterMapParserTest.java | 4 +- .../loader/EnhancedLazyResultLoaderTest.java | 6 +- .../java/threads/RemapResultsThreadTest.java | 6 +- 36 files changed, 313 insertions(+), 313 deletions(-) diff --git a/src/test/java/com/ibatis/common/beans/BadBeanTest.java b/src/test/java/com/ibatis/common/beans/BadBeanTest.java index 57201441..21a70f08 100644 --- a/src/test/java/com/ibatis/common/beans/BadBeanTest.java +++ b/src/test/java/com/ibatis/common/beans/BadBeanTest.java @@ -26,7 +26,7 @@ import badbeans.*; -public class BadBeanTest { +class BadBeanTest { private static final String PROPNAME = "value"; private static final Object STRING_VALUE = "1"; @@ -36,7 +36,7 @@ public class BadBeanTest { private static final Object[] INT_PARAMS = new Object[] { INT_VALUE }; @Test - public void testShouldSuccessfullyGetAndSetValueOnGoodBean() throws Exception { + void testShouldSuccessfullyGetAndSetValueOnGoodBean() throws Exception { GoodBean bean = new GoodBean(); ClassInfo info = ClassInfo.getInstance(GoodBean.class); info.getSetter(PROPNAME).invoke(bean, STRING_PARAMS); @@ -46,7 +46,7 @@ public void testShouldSuccessfullyGetAndSetValueOnGoodBean() throws Exception { } @Test - public void testShouldSuccessfullyGetAndSetValueOnBeanWithDifferentTypeGetterSetter() throws Exception { + void testShouldSuccessfullyGetAndSetValueOnBeanWithDifferentTypeGetterSetter() throws Exception { BeanWithDifferentTypeGetterSetter bean = new BeanWithDifferentTypeGetterSetter(); ClassInfo info = ClassInfo.getInstance(BeanWithDifferentTypeGetterSetter.class); info.getSetter(PROPNAME).invoke(bean, INT_PARAMS); @@ -56,7 +56,7 @@ public void testShouldSuccessfullyGetAndSetValueOnBeanWithDifferentTypeGetterSet } @Test - public void testShouldSuccessfullyGetAndSetValueOnBeanWithOverloadedSetter() throws Exception { + void testShouldSuccessfullyGetAndSetValueOnBeanWithOverloadedSetter() throws Exception { BeanWithOverloadedSetter bean = new BeanWithOverloadedSetter(); ClassInfo info = ClassInfo.getInstance(BeanWithOverloadedSetter.class); info.getSetter(PROPNAME).invoke(bean, STRING_PARAMS); @@ -66,7 +66,7 @@ public void testShouldSuccessfullyGetAndSetValueOnBeanWithOverloadedSetter() thr } @Test - public void testShouldFailInitializingClassInfoForBeanWithNoGetterOverloadedSetter() { + void testShouldFailInitializingClassInfoForBeanWithNoGetterOverloadedSetter() { try { try { ClassInfo.getInstance(BeanWithNoGetterOverloadedSetters.class); @@ -81,7 +81,7 @@ public void testShouldFailInitializingClassInfoForBeanWithNoGetterOverloadedSett } @Test - public void testShouldFailInitializingClassInfoForBeanWithDifferentTypeOverloadedSetter() { + void testShouldFailInitializingClassInfoForBeanWithDifferentTypeOverloadedSetter() { try { try { ClassInfo.getInstance(BeanWithDifferentTypeOverloadedSetter.class); @@ -96,7 +96,7 @@ public void testShouldFailInitializingClassInfoForBeanWithDifferentTypeOverloade } @Test - public void testUnwrapThrowable() { + void testUnwrapThrowable() { SQLException cause = new SQLException("test"); UndeclaredThrowableException e = new UndeclaredThrowableException(cause); assertEquals(cause, ClassInfo.unwrapThrowable(e)); diff --git a/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java b/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java index aa10c276..6965a456 100644 --- a/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java +++ b/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java @@ -21,10 +21,10 @@ import org.junit.jupiter.api.Test; -public class ComplexBeanProbeTest { +class ComplexBeanProbeTest { @Test - public void testSetObject() { + void testSetObject() { SimpleClass mySimpleClass = new SimpleClass(); Probe probe = ProbeFactory.getProbe(mySimpleClass); probe.setObject(mySimpleClass, "myInt", Integer.valueOf(1)); diff --git a/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java b/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java index 5540a083..3a14ee49 100644 --- a/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java +++ b/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java @@ -21,10 +21,10 @@ import org.junit.jupiter.api.Test; -public class JavaBeanProbeTest { +class JavaBeanProbeTest { @Test - public void testGetPropertyTypeForSetterObjectString() { + void testGetPropertyTypeForSetterObjectString() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.getPropertyTypeForSetter(b, "testBean").equals(TestBean.class)); @@ -32,7 +32,7 @@ public void testGetPropertyTypeForSetterObjectString() { } @Test - public void testGetPropertyTypeForGetterObjectString() { + void testGetPropertyTypeForGetterObjectString() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.getPropertyTypeForGetter(b, "testBean").equals(TestBean.class)); @@ -40,7 +40,7 @@ public void testGetPropertyTypeForGetterObjectString() { } @Test - public void testHasWritableProperty() { + void testHasWritableProperty() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.hasWritableProperty(b, "testBean")); @@ -48,7 +48,7 @@ public void testHasWritableProperty() { } @Test - public void testHasReadableProperty() { + void testHasReadableProperty() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.hasReadableProperty(b, "testBean")); @@ -56,7 +56,7 @@ public void testHasReadableProperty() { } @Test - public void testSetAndGetObject() { + void testSetAndGetObject() { TestBean b = getBean(); Probe p = getProbe(b); float f[] = new float[3]; diff --git a/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java b/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java index a26714ac..282a8c89 100644 --- a/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java +++ b/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java @@ -26,7 +26,7 @@ import testdomain.Order; -public class PropertyAccessPlanTest { +class PropertyAccessPlanTest { private static final String[] properties = { "id", "id", "account.firstName", "account.lastName", "account.emailAddress", "cardType", "cardNumber", "cardExpiry", "favouriteLineItem.itemCode", @@ -36,7 +36,7 @@ public class PropertyAccessPlanTest { "clinton@ibatis.com", "VISA", "1234567890", "05/06", "M100", Integer.valueOf(3), new BigDecimal(150) }; @Test - public void testSetAndGetProperties() { + void testSetAndGetProperties() { AccessPlan plan = AccessPlanFactory.getAccessPlan(Order.class, properties); diff --git a/src/test/java/com/ibatis/common/resources/ResourcesTest.java b/src/test/java/com/ibatis/common/resources/ResourcesTest.java index 2afddd91..ee0ba8ae 100644 --- a/src/test/java/com/ibatis/common/resources/ResourcesTest.java +++ b/src/test/java/com/ibatis/common/resources/ResourcesTest.java @@ -39,11 +39,11 @@ * To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and * Comments */ -public class ResourcesTest { +class ResourcesTest { private boolean isUsingPrivateClassloader = false; @Test - public void testSetDefaultClassLoader() { + void testSetDefaultClassLoader() { ClassLoader classLoader = new TestCL(this.getClass().getClassLoader()); ClassLoader tmp = Resources.getDefaultClassLoader(); Resources.setDefaultClassLoader(classLoader); @@ -56,7 +56,7 @@ public void testSetDefaultClassLoader() { * Class to test for URL getResourceURL(String) */ @Test - public void testGetResourceURLString() { + void testGetResourceURLString() { String resourceName; URL url; @@ -85,7 +85,7 @@ public void testGetResourceURLString() { * Class to test for URL getResourceURL(ClassLoader, String) */ @Test - public void testGetResourceURLClassLoaderString() { + void testGetResourceURLClassLoaderString() { String resourceName; URL url; ClassLoader classLoader; @@ -122,7 +122,7 @@ public void testGetResourceURLClassLoaderString() { * Class to test for InputStream getResourceAsStream(String) */ @Test - public void testGetResourceAsStreamString() { + void testGetResourceAsStreamString() { InputStream inputStream; String resourceName; @@ -150,7 +150,7 @@ public void testGetResourceAsStreamString() { * Class to test for InputStream getResourceAsStream(ClassLoader, String) */ @Test - public void testGetResourceAsStreamClassLoaderString() { + void testGetResourceAsStreamClassLoaderString() { InputStream inputStream; String resourceName; ClassLoader classLoader; @@ -186,7 +186,7 @@ public void testGetResourceAsStreamClassLoaderString() { * Class to test for Properties getResourceAsProperties(String) */ @Test - public void testGetResourceAsPropertiesString() { + void testGetResourceAsPropertiesString() { String resourceName; String testProp = "name"; String testPropValue = "value"; @@ -220,7 +220,7 @@ public void testGetResourceAsPropertiesString() { * Class to test for Properties getResourceAsProperties(ClassLoader, String) */ @Test - public void testGetResourceAsPropertiesClassLoaderString() { + void testGetResourceAsPropertiesClassLoaderString() { String resourceName; String testProp = "name"; String testPropValue = "value"; @@ -261,58 +261,58 @@ public void testGetResourceAsPropertiesClassLoaderString() { * Class to test for Reader getResourceAsReader(String) */ @Test - public void testGetResourceAsReaderString() { + void testGetResourceAsReaderString() { } /* * Class to test for Reader getResourceAsReader(ClassLoader, String) */ @Test - public void testGetResourceAsReaderClassLoaderString() { + void testGetResourceAsReaderClassLoaderString() { } /* * Class to test for File getResourceAsFile(String) */ @Test - public void testGetResourceAsFileString() { + void testGetResourceAsFileString() { } /* * Class to test for File getResourceAsFile(ClassLoader, String) */ @Test - public void testGetResourceAsFileClassLoaderString() { + void testGetResourceAsFileClassLoaderString() { } @Test - public void testGetUrlAsStream() { + void testGetUrlAsStream() { } @Test - public void testGetUrlAsReader() { + void testGetUrlAsReader() { } @Test - public void testGetUrlAsProperties() { + void testGetUrlAsProperties() { } @Test - public void testClassForName() { + void testClassForName() { } /* * Class to test for Object instantiate(String) */ @Test - public void testInstantiateString() { + void testInstantiateString() { } /* * Class to test for Object instantiate(Class) */ @Test - public void testInstantiateClass() { + void testInstantiateClass() { } /* diff --git a/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java b/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java index 2a23be94..c43aa8af 100644 --- a/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java +++ b/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java @@ -22,14 +22,14 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class PaginatedArrayListTest { +class PaginatedArrayListTest { private PaginatedArrayList smallPageList; private PaginatedArrayList oddPageList; private PaginatedArrayList evenPageList; @BeforeEach - public void setUp() { + void setUp() { smallPageList = new PaginatedArrayList(5); smallPageList.add(Integer.valueOf(0)); smallPageList.add(Integer.valueOf(1)); @@ -75,7 +75,7 @@ public void setUp() { } @Test - public void testOddPaginatedIterator() { + void testOddPaginatedIterator() { assertEquals(true, oddPageList.isFirstPage()); assertEquals(false, oddPageList.isPreviousPageAvailable()); @@ -145,7 +145,7 @@ public void testOddPaginatedIterator() { } @Test - public void testEvenPaginatedIterator() { + void testEvenPaginatedIterator() { assertEquals(true, evenPageList.isFirstPage()); assertEquals(false, evenPageList.isPreviousPageAvailable()); @@ -205,7 +205,7 @@ public void testEvenPaginatedIterator() { } @Test - public void testSmallPaginatedIterator() { + void testSmallPaginatedIterator() { assertEquals(true, smallPageList.isFirstPage()); assertEquals(true, smallPageList.isLastPage()); diff --git a/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java b/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java index 6789c67d..eeab27ff 100644 --- a/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java +++ b/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java @@ -22,13 +22,13 @@ import org.junit.jupiter.api.Test; -public class NodeletUtilsTest { +class NodeletUtilsTest { /** * Test for getting of a boolean argument. */ @Test - public void testGetBooleanAttribute() { + void testGetBooleanAttribute() { Properties props = new Properties(); props.setProperty("boolean1", "true"); @@ -49,7 +49,7 @@ public void testGetBooleanAttribute() { * Test for getting of a integer argument. */ @Test - public void testGetIntAttribute() { + void testGetIntAttribute() { Properties props = new Properties(); props.setProperty("int1", "0"); @@ -79,7 +79,7 @@ public void testGetIntAttribute() { * Test for getting of a boolean argument. */ @Test - public void testParsePropertyTokens() { + void testParsePropertyTokens() { Properties props = new Properties(); props.setProperty("key1", "0"); diff --git a/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java b/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java index ae59786a..0a15ed23 100644 --- a/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java @@ -36,7 +36,7 @@ import testdomain.Order; import testdomain.PrivateAccount; -public class BaseSqlMapTest { +class BaseSqlMapTest { protected static SqlMapClient sqlMap; @@ -170,7 +170,7 @@ protected void assertOrder1(Map order) { } @Test - public void testDummy() { + void testDummy() { // just to avoid warnings when running all tests. } diff --git a/src/test/java/com/ibatis/sqlmap/BatchTest.java b/src/test/java/com/ibatis/sqlmap/BatchTest.java index a5724e27..af217ff7 100644 --- a/src/test/java/com/ibatis/sqlmap/BatchTest.java +++ b/src/test/java/com/ibatis/sqlmap/BatchTest.java @@ -35,16 +35,16 @@ * @author Jeff Butler * */ -public class BatchTest extends BaseSqlMapTest { +class BatchTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @Test - public void testExecutebatchDetailed() { + void testExecutebatchDetailed() { List accountList1 = new ArrayList(); Account account = new Account(); account.setId(10); @@ -161,7 +161,7 @@ public void testExecutebatchDetailed() { } @Test - public void testExecutebatchDetailedWithError() { + void testExecutebatchDetailedWithError() { List accountList1 = new ArrayList(); Account account = new Account(); account.setId(10); @@ -297,7 +297,7 @@ public void testExecutebatchDetailedWithError() { } @Test - public void testExecutebatch() { + void testExecutebatch() { List accountList1 = new ArrayList(); Account account = new Account(); account.setId(10); diff --git a/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java b/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java index a61cd193..dd2ba5b1 100644 --- a/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java @@ -33,18 +33,18 @@ import testdomain.Account; -public class CacheStatementTest extends BaseSqlMapTest { +class CacheStatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @Test - public void testMappedStatementQueryWithCache() throws SQLException { + void testMappedStatementQueryWithCache() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); @@ -68,7 +68,7 @@ public void testMappedStatementQueryWithCache() throws SQLException { } @Test - public void testMappedStatementQueryWithCache2() throws SQLException { + void testMappedStatementQueryWithCache2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); @@ -93,7 +93,7 @@ public void testMappedStatementQueryWithCache2() throws SQLException { } @Test - public void testFlushDataCache() throws SQLException { + void testFlushDataCache() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -106,7 +106,7 @@ public void testFlushDataCache() throws SQLException { } @Test - public void testFlushDataCache2() throws SQLException { + void testFlushDataCache2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); int firstId = System.identityHashCode(list); @@ -120,7 +120,7 @@ public void testFlushDataCache2() throws SQLException { } @Test - public void testFlushDataCacheOnExecute() throws SQLException { + void testFlushDataCacheOnExecute() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -133,7 +133,7 @@ public void testFlushDataCacheOnExecute() throws SQLException { } @Test - public void testFlushDataCacheOnExecute2() throws SQLException { + void testFlushDataCacheOnExecute2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); int firstId = System.identityHashCode(list); @@ -147,7 +147,7 @@ public void testFlushDataCacheOnExecute2() throws SQLException { } @Test - public void testFlushDataCacheOnExecuteInBatch() throws SQLException { + void testFlushDataCacheOnExecuteInBatch() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -162,7 +162,7 @@ public void testFlushDataCacheOnExecuteInBatch() throws SQLException { } @Test - public void testFlushDataCacheOnExecuteInBatch2() throws SQLException { + void testFlushDataCacheOnExecuteInBatch2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); int firstId = System.identityHashCode(list); @@ -178,7 +178,7 @@ public void testFlushDataCacheOnExecuteInBatch2() throws SQLException { } @Test - public void testFlushDataCacheOnExecuteInBatchWithTx() throws SQLException { + void testFlushDataCacheOnExecuteInBatchWithTx() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -199,7 +199,7 @@ public void testFlushDataCacheOnExecuteInBatchWithTx() throws SQLException { } @Test - public void testMappedStatementQueryWithThreadedCache() throws SQLException { + void testMappedStatementQueryWithThreadedCache() throws SQLException { Map results = new HashMap(); @@ -226,7 +226,7 @@ public void testMappedStatementQueryWithThreadedCache() throws SQLException { } @Test - public void testMappedStatementQueryWithThreadedReadWriteCache() throws SQLException { + void testMappedStatementQueryWithThreadedReadWriteCache() throws SQLException { Map results = new HashMap(); @@ -253,7 +253,7 @@ public void testMappedStatementQueryWithThreadedReadWriteCache() throws SQLExcep } @Test - public void testCacheKeyWithSameHashcode() { + void testCacheKeyWithSameHashcode() { CacheKey key1 = new CacheKey(); CacheKey key2 = new CacheKey(); @@ -265,7 +265,7 @@ public void testCacheKeyWithSameHashcode() { } @Test - public void testCacheKeyWithTwoParamsSameHashcode() { + void testCacheKeyWithTwoParamsSameHashcode() { CacheKey key1 = new CacheKey(); CacheKey key2 = new CacheKey(); @@ -291,7 +291,7 @@ public TestCacheThread(SqlMapClient sqlMap, Map results, String } @Override - public void run() { + void run() { try { SqlMapSession session = sqlMap.openSession(); List list = session.queryForList(statementName, null); diff --git a/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java b/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java index 0a488d51..93785f7d 100644 --- a/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java +++ b/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java @@ -25,12 +25,12 @@ import testdomain.ComplexBean; -public class ComplexTypeTest extends BaseSqlMapTest { +class ComplexTypeTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -38,7 +38,7 @@ public void setUp() throws Exception { } @Test - public void testMapBeanMap() throws Exception { + void testMapBeanMap() throws Exception { Map map = new HashMap<>(); ComplexBean bean = new ComplexBean(); bean.setMap(new HashMap()); diff --git a/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java b/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java index aa0766c9..4068e8a7 100644 --- a/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java @@ -22,13 +22,13 @@ /** * TestCase for validating PreparedStatement.setNull calls for Derby. See IBATIS-536 for more information. */ -public class DerbyParameterMapTest extends ParameterMapTest { +class DerbyParameterMapTest extends ParameterMapTest { // SETUP & TEARDOWN @Override @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } diff --git a/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java b/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java index 6cd6f6c1..6ee4e510 100644 --- a/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java +++ b/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java @@ -23,16 +23,16 @@ import testdomain.FieldAccount; import testdomain.PrivateAccount; -public class DirectFieldMappingTest extends BaseSqlMapTest { +class DirectFieldMappingTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @Test - public void testInsertAndSelectDirectToFields() throws SQLException { + void testInsertAndSelectDirectToFields() throws SQLException { FieldAccount account = newFieldAccount6(); sqlMap.insert("insertAccountFromFields", account); @@ -44,7 +44,7 @@ public void testInsertAndSelectDirectToFields() throws SQLException { } @Test - public void testGetAccountWithPrivateConstructor() throws SQLException { + void testGetAccountWithPrivateConstructor() throws SQLException { FieldAccount account = newFieldAccount6(); sqlMap.insert("insertAccountFromFields", account); diff --git a/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java b/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java index 445a888f..50b4eed5 100644 --- a/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java +++ b/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java @@ -28,16 +28,16 @@ import testdomain.Magazine; import testdomain.PersonDocument; -public class DiscriminatorTest extends BaseSqlMapTest { +class DiscriminatorTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/docs-init.sql"); } @Test - public void testDiscriminator() throws Exception { + void testDiscriminator() throws Exception { List list = sqlMap.queryForList("getDocuments", null); assertEquals(6, list.size()); @@ -63,7 +63,7 @@ public void testDiscriminator() throws Exception { } @Test - public void testDiscriminatorInNestedResultMap() throws Exception { + void testDiscriminatorInNestedResultMap() throws Exception { List list = sqlMap.queryForList("getPersonDocuments"); assertEquals(3, list.size()); @@ -74,7 +74,7 @@ public void testDiscriminatorInNestedResultMap() throws Exception { } @Test - public void testDiscriminatorWithNestedResultMap() throws Exception { + void testDiscriminatorWithNestedResultMap() throws Exception { List list = sqlMap.queryForList("getDocumentsWithAttributes"); assertEquals(6, list.size()); diff --git a/src/test/java/com/ibatis/sqlmap/DomStatementTest.java b/src/test/java/com/ibatis/sqlmap/DomStatementTest.java index eacee08a..e9175b84 100644 --- a/src/test/java/com/ibatis/sqlmap/DomStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/DomStatementTest.java @@ -30,12 +30,12 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Document; -public class DomStatementTest extends BaseSqlMapTest { +class DomStatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -43,7 +43,7 @@ public void setUp() throws Exception { } @Test - public void testExecuteQueryForDom() throws SQLException { + void testExecuteQueryForDom() throws SQLException { Document account = (Document) sqlMap.queryForObject("getAccountDom", newParameter("1")); assertNotNull(account); @@ -56,7 +56,7 @@ public void testExecuteQueryForDom() throws SQLException { } @Test - public void testExecuteQueryForDomSpecialChars() throws SQLException { + void testExecuteQueryForDomSpecialChars() throws SQLException { Document account = (Document) sqlMap.queryForObject("getAccountDom", newParameter("5")); assertNotNull(account); @@ -67,7 +67,7 @@ public void testExecuteQueryForDomSpecialChars() throws SQLException { } @Test - public void testExecuteQueryForDomExternalMaps() throws SQLException { + void testExecuteQueryForDomExternalMaps() throws SQLException { Document account = (Document) sqlMap.queryForObject("getAccountDomExternalMaps", newParameter("1")); assertNotNull(account); @@ -84,7 +84,7 @@ public void testExecuteQueryForDomExternalMaps() throws SQLException { } @Test - public void testExecuteQueryForOrderDom() throws SQLException { + void testExecuteQueryForOrderDom() throws SQLException { Document order = (Document) sqlMap.queryForObject("getOrderDom", newParameter("1")); assertNotNull(order); diff --git a/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java b/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java index b64297b4..ee9749c2 100644 --- a/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java +++ b/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java @@ -28,10 +28,10 @@ import testdomain.Account; import testdomain.MyBean; -public class DynamicPrependTest extends BaseSqlMapTest { +class DynamicPrependTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -39,7 +39,7 @@ public void setUp() throws Exception { // Iterate with prepend @Test - public void testIterateWithPrepend1() throws SQLException { + void testIterateWithPrepend1() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateWithPrepend1", params); assertAccount1((Account) list.get(0)); @@ -47,7 +47,7 @@ public void testIterateWithPrepend1() throws SQLException { } @Test - public void testIterateWithPrepend2() throws SQLException { + void testIterateWithPrepend2() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateWithPrepend2", params); assertAccount1((Account) list.get(0)); @@ -55,7 +55,7 @@ public void testIterateWithPrepend2() throws SQLException { } @Test - public void testIterateWithPrepend2b() throws SQLException { + void testIterateWithPrepend2b() throws SQLException { Account account1, account2, account3; account1 = new Account(); @@ -74,7 +74,7 @@ public void testIterateWithPrepend2b() throws SQLException { } @Test - public void testIterateWithPrepend2c() throws SQLException { + void testIterateWithPrepend2c() throws SQLException { Account account1, account2, account3; account1 = new Account(); @@ -100,7 +100,7 @@ public void testIterateWithPrepend2c() throws SQLException { } @Test - public void testIterateWithPrepend2d() throws SQLException { + void testIterateWithPrepend2d() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); @@ -116,7 +116,7 @@ public void testIterateWithPrepend2d() throws SQLException { } @Test - public void testIterateWithPrepend2e() throws SQLException { + void testIterateWithPrepend2e() throws SQLException { Object[] params = new Object[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }; @@ -132,7 +132,7 @@ public void testIterateWithPrepend2e() throws SQLException { } @Test - public void testIterateWithPrepend2f() throws SQLException { + void testIterateWithPrepend2f() throws SQLException { int[] params = new int[] { 1, 2, 3 }; @@ -148,7 +148,7 @@ public void testIterateWithPrepend2f() throws SQLException { } @Test - public void testIterateWithPrepend3() throws SQLException { + void testIterateWithPrepend3() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateWithPrepend3", params); assertAccount1((Account) list.get(0)); @@ -156,7 +156,7 @@ public void testIterateWithPrepend3() throws SQLException { } @Test - public void testDynamicWithPrepend1() throws SQLException { + void testDynamicWithPrepend1() throws SQLException { Account account = new Account(); account.setId(1); account = (Account) sqlMap.queryForObject("dynamicWithPrepend", account); @@ -164,7 +164,7 @@ public void testDynamicWithPrepend1() throws SQLException { } @Test - public void testDynamicWithPrepend2() throws SQLException { + void testDynamicWithPrepend2() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); @@ -173,7 +173,7 @@ public void testDynamicWithPrepend2() throws SQLException { } @Test - public void testDynamicWithPrepend3() throws SQLException { + void testDynamicWithPrepend3() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); @@ -183,14 +183,14 @@ public void testDynamicWithPrepend3() throws SQLException { } @Test - public void testIterateWithPrepend4() throws SQLException { + void testIterateWithPrepend4() throws SQLException { List list = sqlMap.queryForList("dynamicWithPrepend", null); assertAccount1((Account) list.get(0)); assertEquals(5, list.size()); } @Test - public void testIterateWithTwoPrepends() throws SQLException { + void testIterateWithTwoPrepends() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); @@ -203,7 +203,7 @@ public void testIterateWithTwoPrepends() throws SQLException { } @Test - public void testComplexDynamic() throws SQLException { + void testComplexDynamic() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); diff --git a/src/test/java/com/ibatis/sqlmap/DynamicTest.java b/src/test/java/com/ibatis/sqlmap/DynamicTest.java index 4acd2d71..1d0133cc 100644 --- a/src/test/java/com/ibatis/sqlmap/DynamicTest.java +++ b/src/test/java/com/ibatis/sqlmap/DynamicTest.java @@ -27,10 +27,10 @@ import testdomain.Account; -public class DynamicTest extends BaseSqlMapTest { +class DynamicTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -38,14 +38,14 @@ public void setUp() throws Exception { // PARAMETER PRESENT @Test - public void testIsParameterPresentTrue() throws SQLException { + void testIsParameterPresentTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsParameterPresent", Integer.valueOf(1)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsParameterPresentFalse() throws SQLException { + void testIsParameterPresentFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsParameterPresent", null); assertEquals(5, list.size()); } @@ -53,14 +53,14 @@ public void testIsParameterPresentFalse() throws SQLException { // EMPTY @Test - public void testIsNotEmptyTrue() throws SQLException { + void testIsNotEmptyTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotEmpty", "Clinton"); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsNotEmptyFalse() throws SQLException { + void testIsNotEmptyFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotEmpty", ""); assertEquals(5, list.size()); } @@ -68,14 +68,14 @@ public void testIsNotEmptyFalse() throws SQLException { // EQUAL @Test - public void testIsEqualTrue() throws SQLException { + void testIsEqualTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsEqual", "Clinton"); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsEqualFalse() throws SQLException { + void testIsEqualFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsEqual", "BLAH!"); assertEquals(5, list.size()); } @@ -83,14 +83,14 @@ public void testIsEqualFalse() throws SQLException { // GREATER @Test - public void testIsGreaterTrue() throws SQLException { + void testIsGreaterTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreater", Integer.valueOf(5)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsGreaterFalse() throws SQLException { + void testIsGreaterFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreater", Integer.valueOf(1)); assertEquals(5, list.size()); } @@ -98,14 +98,14 @@ public void testIsGreaterFalse() throws SQLException { // GREATER EQUAL @Test - public void testIsGreaterEqualTrue() throws SQLException { + void testIsGreaterEqualTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreaterEqual", Integer.valueOf(3)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsGreaterEqualFalse() throws SQLException { + void testIsGreaterEqualFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreaterEqual", Integer.valueOf(1)); assertEquals(5, list.size()); } @@ -113,14 +113,14 @@ public void testIsGreaterEqualFalse() throws SQLException { // LESS @Test - public void testIsLessTrue() throws SQLException { + void testIsLessTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsLess", Integer.valueOf(1)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsLessFalse() throws SQLException { + void testIsLessFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsLess", Integer.valueOf(5)); assertEquals(5, list.size()); } @@ -128,14 +128,14 @@ public void testIsLessFalse() throws SQLException { // LESS EQUAL @Test - public void testIsLessEqualTrue() throws SQLException { + void testIsLessEqualTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsLessEqual", Integer.valueOf(3)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsLessEqualFalse() throws SQLException { + void testIsLessEqualFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsLessEqual", Integer.valueOf(5)); assertEquals(5, list.size()); } @@ -143,14 +143,14 @@ public void testIsLessEqualFalse() throws SQLException { // NULL @Test - public void testIsNotNullTrue() throws SQLException { + void testIsNotNullTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotNull", ""); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testIsNotNullFalse() throws SQLException { + void testIsNotNullFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotNull", null); assertEquals(5, list.size()); } @@ -158,14 +158,14 @@ public void testIsNotNullFalse() throws SQLException { // PROPERTY AVAILABLE @Test - public void testIsPropertyAvailableTrue() throws SQLException { + void testIsPropertyAvailableTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsPropertyAvailable", "1"); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - public void testEmptyParameterObject() throws SQLException { + void testEmptyParameterObject() throws SQLException { Account account = new Account(); account.setId(-1); List list = sqlMap.queryForList("dynamicQueryByExample", account); @@ -174,7 +174,7 @@ public void testEmptyParameterObject() throws SQLException { } @Test - public void testComplexDynamicQuery() throws SQLException { + void testComplexDynamicQuery() throws SQLException { Account account = new Account(); account.setId(2); account.setFirstName("Jim"); @@ -186,7 +186,7 @@ public void testComplexDynamicQuery() throws SQLException { } @Test - public void testComplexDynamicQueryLiteral() throws SQLException { + void testComplexDynamicQueryLiteral() throws SQLException { Account account = new Account(); account.setId(2); account.setFirstName("Jim"); @@ -203,7 +203,7 @@ public void testComplexDynamicQueryLiteral() throws SQLException { // -- iterative $substitutions[]$. // // @Test - // public void testCompleteStatementSubst() throws SQLException { + // void testCompleteStatementSubst() throws SQLException { // String statement = "select" + // " ACC_ID as id," + // " ACC_FIRST_NAME as firstName," + @@ -225,7 +225,7 @@ public void testComplexDynamicQueryLiteral() throws SQLException { // Query By Example w/Prepend @Test - public void testQueryByExample() throws SQLException { + void testQueryByExample() throws SQLException { Account account; account = new Account(); @@ -259,7 +259,7 @@ public void testQueryByExample() throws SQLException { } @Test - public void testRemappableResults() throws SQLException { + void testRemappableResults() throws SQLException { Account account; account = new Account(); @@ -277,7 +277,7 @@ public void testRemappableResults() throws SQLException { } @Test - public void testIsPropertyAvailable() throws Exception { + void testIsPropertyAvailable() throws Exception { Map account = new HashMap(); account.put("id", Integer.valueOf(1)); diff --git a/src/test/java/com/ibatis/sqlmap/IterateTest.java b/src/test/java/com/ibatis/sqlmap/IterateTest.java index 582a8073..a20229a2 100644 --- a/src/test/java/com/ibatis/sqlmap/IterateTest.java +++ b/src/test/java/com/ibatis/sqlmap/IterateTest.java @@ -25,10 +25,10 @@ import testdomain.Account; -public class IterateTest extends BaseSqlMapTest { +class IterateTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -36,7 +36,7 @@ public void setUp() throws Exception { // Iterate @Test - public void testIterate() throws SQLException { + void testIterate() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterate", params); assertAccount1((Account) list.get(0)); @@ -46,7 +46,7 @@ public void testIterate() throws SQLException { // Iterate @Test - public void testIterateInConditional() throws SQLException { + void testIterateInConditional() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateInConditional", params); assertEquals(2, list.size()); @@ -56,7 +56,7 @@ public void testIterateInConditional() throws SQLException { } @Test - public void testIterateLiteral() throws SQLException { + void testIterateLiteral() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateLiteral", params); assertAccount1((Account) list.get(0)); @@ -64,7 +64,7 @@ public void testIterateLiteral() throws SQLException { } @Test - public void testMultiIterate() throws SQLException { + void testMultiIterate() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("multiDynamicIterate", params); assertAccount1((Account) list.get(0)); @@ -72,7 +72,7 @@ public void testMultiIterate() throws SQLException { } @Test - public void testMultiIterateLiteral() throws SQLException { + void testMultiIterateLiteral() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("multiDynamicIterateLiteral", params); assertAccount1((Account) list.get(0)); @@ -82,7 +82,7 @@ public void testMultiIterateLiteral() throws SQLException { // ARRAY @Test - public void testArrayPropertyIterate() throws SQLException { + void testArrayPropertyIterate() throws SQLException { Account account = new Account(); account.setIds(new int[] { 1, 2, 3 }); List list = sqlMap.queryForList("dynamicQueryByExample", account); @@ -91,7 +91,7 @@ public void testArrayPropertyIterate() throws SQLException { } @Test - public void testArrayPropertyIterate2() throws SQLException { + void testArrayPropertyIterate2() throws SQLException { Account account = new Account(); account.setAge(4); account.setIds(new int[] { 1, 2, 3 }); @@ -101,7 +101,7 @@ public void testArrayPropertyIterate2() throws SQLException { } @Test - public void testArrayPropertyIterate2Literal() throws SQLException { + void testArrayPropertyIterate2Literal() throws SQLException { Account account = new Account(); account.setAge(4); account.setIds(new int[] { 1, 2, 3 }); @@ -113,7 +113,7 @@ public void testArrayPropertyIterate2Literal() throws SQLException { // LIST IN MAP @Test - public void testListInMap() throws SQLException { + void testListInMap() throws SQLException { List paramList = new ArrayList(); paramList.add(Integer.valueOf(1)); paramList.add(Integer.valueOf(2)); @@ -128,7 +128,7 @@ public void testListInMap() throws SQLException { } @Test - public void testListDirect() throws SQLException { + void testListDirect() throws SQLException { List paramList = new ArrayList(); paramList.add(Integer.valueOf(1)); paramList.add(Integer.valueOf(2)); @@ -140,7 +140,7 @@ public void testListDirect() throws SQLException { } @Test - public void testIterateNestedListProperty() throws SQLException { + void testIterateNestedListProperty() throws SQLException { Account account = new Account(); account.setAccountList(new ArrayList()); account.getAccountList().add(new Account(1)); @@ -153,7 +153,7 @@ public void testIterateNestedListProperty() throws SQLException { } @Test - public void testIterateNestedListPropertyB() throws SQLException { + void testIterateNestedListPropertyB() throws SQLException { Account account = new Account(); account.setId(99); account.setAccountList(new ArrayList()); @@ -167,7 +167,7 @@ public void testIterateNestedListPropertyB() throws SQLException { } @Test - public void testIterateNestedMapListProperty() throws SQLException { + void testIterateNestedMapListProperty() throws SQLException { Map> account = new HashMap>(); List accountList = new ArrayList(); account.put("accountList", accountList); @@ -181,7 +181,7 @@ public void testIterateNestedMapListProperty() throws SQLException { } @Test - public void xtestArrayPropertyIterate2() throws SQLException { + void xtestArrayPropertyIterate2() throws SQLException { Account account = new Account(); account.setIds(new int[] { 1, 2, 3 }); List list = sqlMap.queryForList("dynamicQueryByExample2", account); diff --git a/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java b/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java index eca19a9d..51997751 100644 --- a/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java +++ b/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java @@ -30,12 +30,12 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class MultiResultSetTest extends BaseSqlMapTest { +class MultiResultSetTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml", Resources.getResourceAsProperties("com/ibatis/sqlmap/maps/DerbySqlMapConfig.properties")); initScript("scripts/account-init.sql"); @@ -44,7 +44,7 @@ public void setUp() throws Exception { } @Test - public void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultMaps() throws Exception { + void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultMaps() throws Exception { Map persons = new HashMap(); persons.put("1", Integer.valueOf(1)); persons.put("2", Integer.valueOf(2)); @@ -57,7 +57,7 @@ public void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultMaps() throw } @Test - public void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultClasses() throws Exception { + void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultClasses() throws Exception { Map persons = new HashMap(); persons.put("1", Integer.valueOf(1)); persons.put("2", Integer.valueOf(2)); @@ -70,7 +70,7 @@ public void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultClasses() th } @Test - public void testCallableStatementShouldReturnTwoResultSets() throws Exception { + void testCallableStatementShouldReturnTwoResultSets() throws Exception { sqlMap.startTransaction(); Connection conn = sqlMap.getCurrentConnection(); CallableStatement cs = conn.prepareCall("{call MRESULTSET(?,?,?,?)}"); diff --git a/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java b/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java index bd227a45..977e53b4 100644 --- a/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java +++ b/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java @@ -28,10 +28,10 @@ import testdomain.*; -public class NestedIterateTest extends BaseSqlMapTest { +class NestedIterateTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/person-init.sql"); initScript("scripts/jpetstore-hsqldb-schema.sql"); @@ -44,7 +44,7 @@ public void setUp() throws Exception { * This method works as expected */ @Test - public void testShouldReturn9Rows() { + void testShouldReturn9Rows() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -76,7 +76,7 @@ public void testShouldReturn9Rows() { * This test shoud return 1 row: id 4 */ @Test - public void test02() { + void test02() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -100,7 +100,7 @@ public void test02() { * This test should return 8 rows: ids 1-3, 5-9 */ @Test - public void test03() { + void test03() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(4)); // put first to make the test fail po.addId(Integer.valueOf(1)); @@ -131,7 +131,7 @@ public void test03() { * This test should return 5 rows: ids 5-9 */ @Test - public void test04() { + void test04() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -159,7 +159,7 @@ public void test04() { * This test should return 6 rows: ids 4-9 */ @Test - public void test05() { + void test05() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -188,7 +188,7 @@ public void test05() { * This test should return 3 rows: ids 1-3 */ @Test - public void test06() { + void test06() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -215,7 +215,7 @@ public void test06() { * This test should return 4 rows: ids 1-4 */ @Test - public void test07() { + void test07() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -243,7 +243,7 @@ public void test07() { * This method should return four rows: ids 1, 2, 7, 8 */ @Test - public void test08() { + void test08() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addFirstName("Jeff"); po.addFirstName("Matt"); @@ -268,7 +268,7 @@ public void test08() { * This method works when Christian's IBATIS-281 patches are applied */ @Test - public void test09() { + void test09() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -292,7 +292,7 @@ public void test09() { } @Test - public void test09a() { + void test09a() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -319,7 +319,7 @@ public void test09a() { * This test shoud return 1 row: id 4 */ @Test - public void test10() { + void test10() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -343,7 +343,7 @@ public void test10() { * This test should return 8 rows: ids 1-3, 5-9 */ @Test - public void test11() { + void test11() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(4)); // put first to make the test fail po.addId(Integer.valueOf(1)); @@ -374,7 +374,7 @@ public void test11() { * This test should return 5 rows: ids 5-9 */ @Test - public void test12() { + void test12() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -402,7 +402,7 @@ public void test12() { * This test should return 6 rows: ids 4-9 */ @Test - public void test13() { + void test13() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -431,7 +431,7 @@ public void test13() { * This test should return 3 rows: ids 1-3 */ @Test - public void test14() { + void test14() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -458,7 +458,7 @@ public void test14() { * This test should return 4 rows: ids 1-4 */ @Test - public void test15() { + void test15() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -488,7 +488,7 @@ public void test15() { * This method works when Christian's IBATIS-281 patches are applied */ @Test - public void test16() { + void test16() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -521,7 +521,7 @@ public void test16() { * This method works when Christian's IBATIS-281 patches are applied */ @Test - public void test17() { + void test17() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -554,7 +554,7 @@ public void test17() { * This method tests inside in */ @Test - public void test18() { + void test18() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -583,7 +583,7 @@ public void test18() { * This method tests inside an */ @Test - public void test19() { + void test19() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -612,7 +612,7 @@ public void test19() { * This method tests inside an */ @Test - public void test20() { + void test20() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -643,7 +643,7 @@ public void test20() { * */ @Test - public void test21() { + void test21() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -678,7 +678,7 @@ public void test21() { * */ @Test - public void test22() { + void test22() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -703,7 +703,7 @@ public void test22() { * */ @Test - public void test23() { + void test23() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -728,7 +728,7 @@ public void test23() { * */ @Test - public void test24() { + void test24() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -753,7 +753,7 @@ public void test24() { * */ @Test - public void test25() { + void test25() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -779,7 +779,7 @@ public void test25() { * This tests nesting when objects are maps and not a list nested in a list */ @Test - public void test26() { + void test26() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); @@ -811,7 +811,7 @@ public void test26() { * This tests nesting when objects are maps and not a list nested in a list same as test26 except deeper */ @Test - public void test27() { + void test27() { Map>> firstMap = new HashMap>>(); @@ -852,7 +852,7 @@ public void test27() { * This tests nesting when objects are maps and not a list nested in a list */ @Test - public void test28() { + void test28() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); @@ -885,7 +885,7 @@ public void test28() { * This tests nesting when objects are maps and not a list nested in a list same as test26 except deeper */ @Test - public void test29() { + void test29() { SimpleNestedParameterObject firstParameterObject = new SimpleNestedParameterObject(); @@ -927,7 +927,7 @@ public void test29() { * */ @Test - public void test30() { + void test30() { try { diff --git a/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java b/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java index 9bdfcce9..334cae26 100644 --- a/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java @@ -26,12 +26,12 @@ import testdomain.Account; -public class ParameterMapTest extends BaseSqlMapTest { +class ParameterMapTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -39,7 +39,7 @@ public void setUp() throws Exception { // PARAMETER MAP FEATURE TESTS @Test - public void testNullValueReplacementMap() throws SQLException { + void testNullValueReplacementMap() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaParameterMap", account); @@ -50,7 +50,7 @@ public void testNullValueReplacementMap() throws SQLException { } @Test - public void testNullValueReplacementInline() throws SQLException { + void testNullValueReplacementInline() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaInlineParameters", account); @@ -61,7 +61,7 @@ public void testNullValueReplacementInline() throws SQLException { } @Test - public void testNullValueReplacementInlineWithDynamic() throws SQLException { + void testNullValueReplacementInlineWithDynamic() throws SQLException { Account account = newAccount6(); account.setId(0); @@ -88,7 +88,7 @@ protected void assertMessageIsNullValueNotAllowed(String message) { } @Test - public void testSpecifiedType() throws SQLException { + void testSpecifiedType() throws SQLException { Account account = newAccount6(); account.setEmailAddress(null); @@ -100,7 +100,7 @@ public void testSpecifiedType() throws SQLException { } @Test - public void testUnknownParameterClass() throws SQLException { + void testUnknownParameterClass() throws SQLException { Account account = newAccount6(); account.setEmailAddress(null); @@ -112,7 +112,7 @@ public void testUnknownParameterClass() throws SQLException { } @Test - public void testNullParameter() throws SQLException { + void testNullParameter() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountNullParameter", null); @@ -120,7 +120,7 @@ public void testNullParameter() throws SQLException { } @Test - public void testNullParameter2() throws SQLException { + void testNullParameter2() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountNullParameter"); diff --git a/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java b/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java index e53c1d1b..0d4aa733 100644 --- a/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java +++ b/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java @@ -23,16 +23,16 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class PrivateMethodAccessTest extends BaseSqlMapTest { +class PrivateMethodAccessTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/docs-init.sql"); } @Test - public void testShouldSetPrivateProperties() throws Exception { + void testShouldSetPrivateProperties() throws Exception { List list = sqlMap.queryForList("getPrivateBooks"); assertNotNull(list); assertEquals(2, list.size()); diff --git a/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java b/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java index 9f8cf03b..6ec03ad7 100644 --- a/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java +++ b/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java @@ -25,29 +25,29 @@ import testdomain.*; -public class RepeatingGroupMappingTest extends BaseSqlMapTest { +class RepeatingGroupMappingTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/jpetstore-hsqldb-schema.sql"); initScript("scripts/jpetstore-hsqldb-dataload.sql"); } @Test - public void testGroupBy() throws Exception { + void testGroupBy() throws Exception { List list = sqlMap.queryForList("getAllCategories", null); assertEquals(5, list.size()); } @Test - public void testGroupByExtended() throws Exception { + void testGroupByExtended() throws Exception { List list = sqlMap.queryForList("getAllCategoriesExtended", null); assertEquals(5, list.size()); } @Test - public void testNestedProperties() throws Exception { + void testNestedProperties() throws Exception { List list = sqlMap.queryForList("getFish", null); assertEquals(1, list.size()); @@ -77,7 +77,7 @@ public void testNestedProperties() throws Exception { * none should be thrown. */ @Test - public void testGroupByJIRA250() throws Exception { + void testGroupByJIRA250() throws Exception { List list = sqlMap.queryForList("getAllProductCategoriesJIRA250", null); Category cat = (Category) list.get(0); assertEquals(0, cat.getProductList().size()); diff --git a/src/test/java/com/ibatis/sqlmap/ResultMapTest.java b/src/test/java/com/ibatis/sqlmap/ResultMapTest.java index 08aba701..e6a1852b 100644 --- a/src/test/java/com/ibatis/sqlmap/ResultMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/ResultMapTest.java @@ -31,12 +31,12 @@ import testdomain.Account; import testdomain.Order; -public class ResultMapTest extends BaseSqlMapTest { +class ResultMapTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -46,44 +46,44 @@ public void setUp() throws Exception { // RESULT MAP FEATURE TESTS @Test - public void testColumnsByName() throws SQLException { + void testColumnsByName() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderLiteByColumnName", Integer.valueOf(1)); assertOrder1(order); } @Test - public void testExtendedResultMap() throws SQLException { + void testExtendedResultMap() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderLiteByColumnName", Integer.valueOf(1)); assertOrder1(order); } @Test - public void testColumnsByIndex() throws SQLException { + void testColumnsByIndex() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderLiteByColumnIndex", Integer.valueOf(1)); assertOrder1(order); } @Test - public void testNullValueReplacement() throws SQLException { + void testNullValueReplacement() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(5)); assertEquals("no_email@provided.com", account.getEmailAddress()); } @Test - public void testTypeSpecified() throws SQLException { + void testTypeSpecified() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithTypes", Integer.valueOf(1)); assertOrder1(order); } @Test - public void testComplexObjectMapping() throws SQLException { + void testComplexObjectMapping() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithAccount", Integer.valueOf(1)); assertOrder1(order); assertAccount1(order.getAccount()); } @Test - public void testCollectionMappingAndExtends() throws SQLException { + void testCollectionMappingAndExtends() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithLineItemsCollection", Integer.valueOf(1)); assertOrder1(order); @@ -92,7 +92,7 @@ public void testCollectionMappingAndExtends() throws SQLException { } @Test - public void testListMapping() throws SQLException { + void testListMapping() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithLineItems", Integer.valueOf(1)); assertOrder1(order); @@ -101,7 +101,7 @@ public void testListMapping() throws SQLException { } @Test - public void testGetAllLineItemProps() throws SQLException { + void testGetAllLineItemProps() throws SQLException { List list = sqlMap.queryForList("getAllLineItemProps", Integer.valueOf(1)); assertNotNull(list); @@ -109,7 +109,7 @@ public void testGetAllLineItemProps() throws SQLException { } @Test - public void testGetSomeLineItemProps() throws SQLException { + void testGetSomeLineItemProps() throws SQLException { try { List list = sqlMap.queryForList("getSomeLineItemProps", Integer.valueOf(1)); @@ -120,7 +120,7 @@ public void testGetSomeLineItemProps() throws SQLException { } @Test - public void testArrayMapping() throws SQLException { + void testArrayMapping() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithLineItemArray", Integer.valueOf(1)); assertOrder1(order); @@ -129,19 +129,19 @@ public void testArrayMapping() throws SQLException { } @Test - public void testHashMapMapping() throws SQLException { + void testHashMapMapping() throws SQLException { Map order = (Map) sqlMap.queryForObject("getOrderAsMap", Integer.valueOf(1)); assertOrder1(order); } @Test - public void testNestedObjects() throws SQLException { + void testNestedObjects() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderJoinedFavourite", Integer.valueOf(1)); assertOrder1(order); } @Test - public void testSimpleTypeMapping() throws SQLException { + void testSimpleTypeMapping() throws SQLException { List list = sqlMap.queryForList("getAllCreditCardNumbersFromOrders", null); assertEquals(5, list.size()); @@ -149,7 +149,7 @@ public void testSimpleTypeMapping() throws SQLException { } @Test - public void testCompositeKeyMapping() throws SQLException { + void testCompositeKeyMapping() throws SQLException { Order order1 = (Order) sqlMap.queryForObject("getOrderWithFavouriteLineItem", Integer.valueOf(1)); Order order2 = (Order) sqlMap.queryForObject("getOrderWithFavouriteLineItem", Integer.valueOf(2)); @@ -167,7 +167,7 @@ public void testCompositeKeyMapping() throws SQLException { } @Test - public void testDynCompositeKeyMapping() throws SQLException { + void testDynCompositeKeyMapping() throws SQLException { Order order1 = (Order) sqlMap.queryForObject("getOrderWithDynFavouriteLineItem", Integer.valueOf(1)); @@ -179,7 +179,7 @@ public void testDynCompositeKeyMapping() throws SQLException { } @Test - public void testGetDoubleNestedResult() throws SQLException { + void testGetDoubleNestedResult() throws SQLException { Account account = (Account) sqlMap.queryForObject("getNestedAccountViaColumnName", Integer.valueOf(1)); assertAccount1(account); } diff --git a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java index 519186da..b3fad414 100644 --- a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java +++ b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java @@ -24,10 +24,10 @@ import testdomain.IItem; -public class ResultObjectFactoryTest extends BaseSqlMapTest { +class ResultObjectFactoryTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig_rof.xml", null); initScript("scripts/jpetstore-hsqldb-schema.sql"); initScript("scripts/jpetstore-hsqldb-dataload.sql"); @@ -38,7 +38,7 @@ public void setUp() throws Exception { * */ @Test - public void testShouldDemonstrateThatTheObjectFactoryIsWorking() throws Exception { + void testShouldDemonstrateThatTheObjectFactoryIsWorking() throws Exception { List results = sqlMap.queryForList("getAllItemsROF"); assertEquals(28, results.size()); assertEquals(Integer.valueOf(1), ((IItem) results.get(2)).getSupplier().getSupplierId()); diff --git a/src/test/java/com/ibatis/sqlmap/StatementTest.java b/src/test/java/com/ibatis/sqlmap/StatementTest.java index 9d53b297..0604cc4e 100644 --- a/src/test/java/com/ibatis/sqlmap/StatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/StatementTest.java @@ -45,12 +45,12 @@ import testdomain.Order; import testdomain.SuperAccount; -public class StatementTest extends BaseSqlMapTest { +class StatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -60,13 +60,13 @@ public void setUp() throws Exception { // OBJECT QUERY TESTS @Test - public void testExecuteQueryForObjectViaColumnName() throws SQLException { + void testExecuteQueryForObjectViaColumnName() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1)); assertAccount1(account); } @Test - public void testUserConnection() throws SQLException { + void testUserConnection() throws SQLException { DataSource ds = sqlMap.getDataSource(); Connection conn = ds.getConnection(); ((SqlMapClientImpl) sqlMap).getDelegate().getTxManager().getConfig().setDataSource(null); @@ -78,7 +78,7 @@ public void testUserConnection() throws SQLException { } @Test - public void testSessionUserConnection() throws SQLException { + void testSessionUserConnection() throws SQLException { DataSource ds = sqlMap.getDataSource(); Connection conn = ds.getConnection(); ((SqlMapClientImpl) sqlMap).getDelegate().getTxManager().getConfig().setDataSource(null); @@ -91,7 +91,7 @@ public void testSessionUserConnection() throws SQLException { } @Test - public void testSessionUserConnectionFailures() throws SQLException { + void testSessionUserConnectionFailures() throws SQLException { DataSource ds = sqlMap.getDataSource(); Connection conn = ds.getConnection(); ((SqlMapClientImpl) sqlMap).getDelegate().getTxManager().getConfig().setDataSource(null); @@ -128,56 +128,56 @@ public void testSessionUserConnectionFailures() throws SQLException { } @Test - public void testExecuteQueryForObjectViaColumnIndex() throws SQLException { + void testExecuteQueryForObjectViaColumnIndex() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnIndex", Integer.valueOf(1)); assertAccount1(account); } @Test - public void testExecuteQueryForObjectViaResultClass() throws SQLException { + void testExecuteQueryForObjectViaResultClass() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaResultClass", Integer.valueOf(1)); assertAccount1(account); } @Test - public void testExecuteQueryForObjectViaResultClassIgnoreCaseTypeAliasCase() throws SQLException { + void testExecuteQueryForObjectViaResultClassIgnoreCaseTypeAliasCase() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaResultClassIgnoreCaseTypeAlias", Integer.valueOf(1)); assertAccount1(account); } @Test - public void testExecuteQueryForObjectViaResultClassPlusOne() throws SQLException { + void testExecuteQueryForObjectViaResultClassPlusOne() throws SQLException { List list = sqlMap.queryForList("getAccountViaResultClassPlusOne", Integer.valueOf(1)); assertList(list); } @Test - public void testExecuteQueryForObjectAsHashMap() throws SQLException { + void testExecuteQueryForObjectAsHashMap() throws SQLException { Map account = (HashMap) sqlMap.queryForObject("getAccountAsHashMap", Integer.valueOf(1)); assertAccount1(account); } @Test - public void testExecuteQueryForObjectAsHashMapResultClass() throws SQLException { + void testExecuteQueryForObjectAsHashMapResultClass() throws SQLException { Map account = (HashMap) sqlMap.queryForObject("getAccountAsHashMapResultClass", Integer.valueOf(1)); assertAccount1(account); } @Test - public void testExecuteQueryForObjectWithSimpleResultClass() throws SQLException { + void testExecuteQueryForObjectWithSimpleResultClass() throws SQLException { String email = (String) sqlMap.queryForObject("getEmailAddressViaResultClass", Integer.valueOf(1)); assertEquals("clinton.begin@ibatis.com", email); } @Test - public void testExecuteQueryForObjectWithSimpleResultMap() throws SQLException { + void testExecuteQueryForObjectWithSimpleResultMap() throws SQLException { String email = (String) sqlMap.queryForObject("getEmailAddressViaResultMap", Integer.valueOf(1)); assertEquals("clinton.begin@ibatis.com", email); } @Test - public void testExecuteQueryForObjectWithResultObject() throws SQLException { + void testExecuteQueryForObjectWithResultObject() throws SQLException { Account account = new Account(); Account testAccount = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1), account); assertAccount1(account); @@ -185,7 +185,7 @@ public void testExecuteQueryForObjectWithResultObject() throws SQLException { } @Test - public void testGetSubclass() throws SQLException { + void testGetSubclass() throws SQLException { SuperAccount account = new SuperAccount(); account.setId(1); account = (SuperAccount) sqlMap.queryForObject("getSuperAccount", account); @@ -195,7 +195,7 @@ public void testGetSubclass() throws SQLException { // LIST QUERY TESTS @Test - public void testExecuteQueryForListWithResultMap() throws SQLException { + void testExecuteQueryForListWithResultMap() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultMap", null); assertAccount1((Account) list.get(0)); @@ -209,7 +209,7 @@ public void testExecuteQueryForListWithResultMap() throws SQLException { } @Test - public void testExecuteQueryWithCustomTypeHandler() throws SQLException { + void testExecuteQueryWithCustomTypeHandler() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaCustomTypeHandler", null); assertAccount1((Account) list.get(0)); @@ -237,7 +237,7 @@ public void testExecuteQueryWithCustomTypeHandler() throws SQLException { * for bug 976614 - bug squashed 07-14-04 By Brandon Goodin */ /* - * @Test public void testBrokenExecuteQueryForListWithResultMap() throws SQLException { List list = + * @Test void testBrokenExecuteQueryForListWithResultMap() throws SQLException { List list = * sqlMap.queryForList("getBrokenAllAccountsViaResultMap", null); assertAccount1((Account) list.get(0)); * assertEquals(5, list.size()); assertEquals(1, ((Account) list.get(0)).getId()); assertEquals(2, ((Account) * list.get(1)).getId()); assertEquals(3, ((Account) list.get(2)).getId()); assertEquals(4, ((Account) @@ -245,7 +245,7 @@ public void testExecuteQueryWithCustomTypeHandler() throws SQLException { */ @Test - public void testExecuteQueryForPaginatedList() throws SQLException { + void testExecuteQueryForPaginatedList() throws SQLException { // Get List of all 5 PaginatedList list = sqlMap.queryForPaginatedList("getAllAccountsViaResultMap", null, 2); @@ -398,7 +398,7 @@ public void testExecuteQueryForPaginatedList() throws SQLException { } @Test - public void testExecuteQueryForPaginatedList2() throws SQLException { + void testExecuteQueryForPaginatedList2() throws SQLException { // tests methods that don't require a parameter object // Get List of all 5 @@ -552,7 +552,7 @@ public void testExecuteQueryForPaginatedList2() throws SQLException { } @Test - public void testExecuteQueryForListWithResultMapWithDynamicElement() throws SQLException { + void testExecuteQueryForListWithResultMapWithDynamicElement() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultMapWithDynamicElement", "LIKE"); @@ -569,7 +569,7 @@ public void testExecuteQueryForListWithResultMapWithDynamicElement() throws SQLE } @Test - public void testExecuteQueryForListResultClass() throws SQLException { + void testExecuteQueryForListResultClass() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultClass", null); assertAccount1((Account) list.get(0)); @@ -582,7 +582,7 @@ public void testExecuteQueryForListResultClass() throws SQLException { } @Test - public void testExecuteQueryForListWithHashMapResultMap() throws SQLException { + void testExecuteQueryForListWithHashMapResultMap() throws SQLException { List list = sqlMap.queryForList("getAllAccountsAsHashMapViaResultMap", null); assertAccount1((Map) list.get(0)); @@ -595,7 +595,7 @@ public void testExecuteQueryForListWithHashMapResultMap() throws SQLException { } @Test - public void testExecuteQueryForListWithHashMapResultClass() throws SQLException { + void testExecuteQueryForListWithHashMapResultClass() throws SQLException { List list = sqlMap.queryForList("getAllAccountsAsHashMapViaResultClass", null); assertAccount1((Map) list.get(0)); @@ -608,7 +608,7 @@ public void testExecuteQueryForListWithHashMapResultClass() throws SQLException } @Test - public void testExecuteQueryForListWithSimpleResultClass() throws SQLException { + void testExecuteQueryForListWithSimpleResultClass() throws SQLException { List list = sqlMap.queryForList("getAllEmailAddressesViaResultClass", null); assertEquals("clinton.begin@ibatis.com", list.get(0)); @@ -616,7 +616,7 @@ public void testExecuteQueryForListWithSimpleResultClass() throws SQLException { } @Test - public void testExecuteQueryForListWithSimpleResultMap() throws SQLException { + void testExecuteQueryForListWithSimpleResultMap() throws SQLException { List list = sqlMap.queryForList("getAllEmailAddressesViaResultMap", null); assertEquals("clinton.begin@ibatis.com", list.get(0)); @@ -624,7 +624,7 @@ public void testExecuteQueryForListWithSimpleResultMap() throws SQLException { } @Test - public void testExecuteQueryForListWithSkipAndMax() throws SQLException { + void testExecuteQueryForListWithSkipAndMax() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultMap", null, 2, 2); assertEquals(2, list.size()); @@ -633,7 +633,7 @@ public void testExecuteQueryForListWithSkipAndMax() throws SQLException { } @Test - public void testExecuteQueryForListWithRowHandler() throws SQLException { + void testExecuteQueryForListWithRowHandler() throws SQLException { TestRowHandler handler = new TestRowHandler(); sqlMap.queryWithRowHandler("getAllAccountsViaResultMap", null, handler); List list = handler.getList(); @@ -649,7 +649,7 @@ public void testExecuteQueryForListWithRowHandler() throws SQLException { } @Test - public void testExecuteQueryForListWithRowHandler2() throws SQLException { + void testExecuteQueryForListWithRowHandler2() throws SQLException { // tests method that does not require a parameter object TestRowHandler handler = new TestRowHandler(); sqlMap.queryWithRowHandler("getAllAccountsViaResultMap", handler); @@ -666,7 +666,7 @@ public void testExecuteQueryForListWithRowHandler2() throws SQLException { } @Test - public void testLegacyExecuteQueryForListWithRowHandler() throws SQLException { + void testLegacyExecuteQueryForListWithRowHandler() throws SQLException { TestRowHandler handler = new TestRowHandler(); sqlMap.queryWithRowHandler("getAllAccountsViaResultMap", null, handler); assertEquals(5, handler.getIndex()); @@ -681,7 +681,7 @@ public void testLegacyExecuteQueryForListWithRowHandler() throws SQLException { // MAP TESTS @Test - public void testExecuteQueryForMap() throws SQLException { + void testExecuteQueryForMap() throws SQLException { Map map = sqlMap.queryForMap("getAllAccountsViaResultClass", null, "lastName"); assertAccount1((Account) map.get("Begin")); @@ -694,7 +694,7 @@ public void testExecuteQueryForMap() throws SQLException { } @Test - public void testExecuteQueryForMapWithValueProperty() throws SQLException { + void testExecuteQueryForMapWithValueProperty() throws SQLException { Map map = sqlMap.queryForMap("getAllAccountsViaResultClass", null, "lastName", "firstName"); assertEquals(5, map.size()); @@ -708,7 +708,7 @@ public void testExecuteQueryForMapWithValueProperty() throws SQLException { // UPDATE TESTS @Test - public void testInsertGeneratedKey() throws SQLException { + void testInsertGeneratedKey() throws SQLException { LineItem item = new LineItem(); item.setId(10); @@ -731,7 +731,7 @@ public void testInsertGeneratedKey() throws SQLException { } @Test - public void testInsertGeneratedKeyFailure() throws SQLException { + void testInsertGeneratedKeyFailure() throws SQLException { LineItem item = new LineItem(); item.setId(0); @@ -754,7 +754,7 @@ public void testInsertGeneratedKeyFailure() throws SQLException { } @Test - public void testInsertPreKey() throws SQLException { + void testInsertPreKey() throws SQLException { LineItem item = new LineItem(); item.setId(10); @@ -778,7 +778,7 @@ public void testInsertPreKey() throws SQLException { } @Test - public void testInsertNoKey() throws SQLException { + void testInsertNoKey() throws SQLException { LineItem item = new LineItem(); item.setId(100); @@ -802,7 +802,7 @@ public void testInsertNoKey() throws SQLException { } @Test - public void testExecuteUpdateWithParameterMap() throws SQLException { + void testExecuteUpdateWithParameterMap() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1)); account.setId(6); @@ -820,7 +820,7 @@ public void testExecuteUpdateWithParameterMap() throws SQLException { } @Test - public void testExecuteUpdateWithInlineParameters() throws SQLException { + void testExecuteUpdateWithInlineParameters() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1)); account.setEmailAddress("new.clinton@ibatis.com"); @@ -838,7 +838,7 @@ public void testExecuteUpdateWithInlineParameters() throws SQLException { } @Test - public void testExecuteUpdateWithParameterClass() throws SQLException { + void testExecuteUpdateWithParameterClass() throws SQLException { Account account = new Account(); account.setId(5); @@ -861,7 +861,7 @@ public void testExecuteUpdateWithParameterClass() throws SQLException { * For bug 959140 */ // @Test - // public void testExecuteUpdateWithDuplicateParams() throws SQLException { + // void testExecuteUpdateWithDuplicateParams() throws SQLException { // // sqlMap.update("deleteAccountByDuplicateInteger", new Integer (5)); // @@ -873,7 +873,7 @@ public void testExecuteUpdateWithParameterClass() throws SQLException { // DYNAMIC SQL @Test - public void testQueryDynamicSqlElement() throws SQLException { + void testQueryDynamicSqlElement() throws SQLException { List list = sqlMap.queryForList("getDynamicOrderedEmailAddressesViaResultMap", "ACC_ID"); assertEquals("clinton.begin@ibatis.com", list.get(0)); @@ -886,19 +886,19 @@ public void testQueryDynamicSqlElement() throws SQLException { // INNER CLASSES - public class TestRowHandler implements RowHandler { + class TestRowHandler implements RowHandler { private int index = 0; private List list = new ArrayList(); @Override - public void handleRow(Object object) { + void handleRow(Object object) { index++; assertEquals(index, ((Account) object).getId()); list.add(object); } - public void handleRow(Object valueObject, List list) { + void handleRow(Object valueObject, List list) { index++; assertEquals(index, ((Account) valueObject).getId()); list.add(valueObject); @@ -915,7 +915,7 @@ public List getList() { } @Test - public void testNestedResultMaps() throws SQLException { + void testNestedResultMaps() throws SQLException { List list = sqlMap.queryForList("getAllOrdersWithNestedResultMaps"); assertEquals(10, list.size()); diff --git a/src/test/java/com/ibatis/sqlmap/TransactionTest.java b/src/test/java/com/ibatis/sqlmap/TransactionTest.java index 1b670de2..9703cdbb 100644 --- a/src/test/java/com/ibatis/sqlmap/TransactionTest.java +++ b/src/test/java/com/ibatis/sqlmap/TransactionTest.java @@ -25,10 +25,10 @@ import testdomain.Account; -public class TransactionTest extends BaseSqlMapTest { +class TransactionTest extends BaseSqlMapTest { @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -36,7 +36,7 @@ public void setUp() throws Exception { // TRANSACTION TESTS @Test - public void testStartCommitTransaction() throws SQLException { + void testStartCommitTransaction() throws SQLException { Account account = newAccount6(); try { @@ -54,7 +54,7 @@ public void testStartCommitTransaction() throws SQLException { } @Test - public void testTransactionAlreadyStarted() throws SQLException { + void testTransactionAlreadyStarted() throws SQLException { Account account = newAccount6(); boolean exceptionThrownAsExpected = false; @@ -80,7 +80,7 @@ public void testTransactionAlreadyStarted() throws SQLException { } @Test - public void testNoTransactionStarted() throws SQLException { + void testNoTransactionStarted() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaParameterMap", account); @@ -99,7 +99,7 @@ public void testNoTransactionStarted() throws SQLException { } @Test - public void testTransactionFailed() throws SQLException { + void testTransactionFailed() throws SQLException { Account account = newAccount6(); boolean exceptionThrownAsExpected = false; @@ -118,7 +118,7 @@ public void testTransactionFailed() throws SQLException { } @Test - public void testTransactionFailed2() throws SQLException { + void testTransactionFailed2() throws SQLException { // testes method that does not require a parameter object Account account = newAccount6(); @@ -138,7 +138,7 @@ public void testTransactionFailed2() throws SQLException { } @Test - public void testStartRollbackTransaction() throws SQLException { + void testStartRollbackTransaction() throws SQLException { Account account = newAccount6(); try { @@ -157,7 +157,7 @@ public void testStartRollbackTransaction() throws SQLException { // AUTOCOMMIT TESTS @Test - public void testAutoCommitUpdate() throws SQLException { + void testAutoCommitUpdate() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaParameterMap", account); account = (Account) sqlMap.queryForObject("getAccountNullableEmail", Integer.valueOf(6)); @@ -165,7 +165,7 @@ public void testAutoCommitUpdate() throws SQLException { } @Test - public void testAutoCommitQuery() throws SQLException { + void testAutoCommitQuery() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountNullableEmail", Integer.valueOf(1)); assertAccount1(account); } diff --git a/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java b/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java index 34dc9fb5..55e22d48 100644 --- a/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java @@ -26,12 +26,12 @@ import xmltester.*; import xmltester.MiniParser; -public class XmlStatementTest extends BaseSqlMapTest { +class XmlStatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - public void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -39,7 +39,7 @@ public void setUp() throws Exception { } @Test - public void testExecuteQueryForXml() throws SQLException { + void testExecuteQueryForXml() throws SQLException { String account = (String) sqlMap.queryForObject("getAccountXml", "1"); assertNotNull(account); MiniDom dom = new MiniParser(account).getDom(); @@ -50,7 +50,7 @@ public void testExecuteQueryForXml() throws SQLException { } @Test - public void testExecuteQueryForXmlExternalMaps() throws SQLException { + void testExecuteQueryForXmlExternalMaps() throws SQLException { String account = (String) sqlMap.queryForObject("getAccountXmlExternalMaps", "1"); assertNotNull(account); MiniDom dom = new MiniParser(account).getDom(); @@ -65,7 +65,7 @@ public void testExecuteQueryForXmlExternalMaps() throws SQLException { } @Test - public void testExecuteQueryForOrderXml() throws SQLException { + void testExecuteQueryForOrderXml() throws SQLException { String order = (String) sqlMap.queryForObject("getOrderXml", "1"); assertNotNull(order); MiniDom dom = new MiniParser(order).getDom(); @@ -74,7 +74,7 @@ public void testExecuteQueryForOrderXml() throws SQLException { } @Test - public void testExecuteQueryForXmlSpecialChars() throws SQLException { + void testExecuteQueryForXmlSpecialChars() throws SQLException { String account = (String) sqlMap.queryForObject("getAccountXml", "5"); assertNotNull(account); MiniDom dom = new MiniParser(account).getDom(); diff --git a/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java b/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java index 7566eaef..1e667a0c 100644 --- a/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java +++ b/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java @@ -21,30 +21,30 @@ import org.xml.sax.InputSource; import org.xml.sax.SAXException; -public class SqlMapClasspathEntityResolverTest { +class SqlMapClasspathEntityResolverTest { // ibatis.com @Test - public void testComConfigSystemId() { + void testComConfigSystemId() { String id = "http://www.ibatis.com/dtd/sql-map-config-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - public void testComConfigPublicId() { + void testComConfigPublicId() { String id = "-//iBATIS.com//DTD SQL Map Config 2.0//EN"; assertPublicIdCanBeResolved(id); } @Test - public void testComMapSystemId() { + void testComMapSystemId() { String id = "http://www.ibatis.com/dtd/sql-map-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - public void testComMapPublicId() { + void testComMapPublicId() { String id = "-//iBATIS.com//DTD SQL Map 2.0//EN"; assertPublicIdCanBeResolved(id); } @@ -52,31 +52,31 @@ public void testComMapPublicId() { // ibatis.apache.org @Test - public void testOrgConfigSystemId() { + void testOrgConfigSystemId() { String id = "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - public void testOrgConfigPublicId() { + void testOrgConfigPublicId() { String id = "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"; assertPublicIdCanBeResolved(id); } @Test - public void testOrgMapSystemId() { + void testOrgMapSystemId() { String id = "http://ibatis.apache.org/dtd/sql-map-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - public void testOrgMapPublicId() { + void testOrgMapPublicId() { String id = "-//ibatis.apache.org//DTD SQL Map 2.0//EN"; assertPublicIdCanBeResolved(id); } @Test - public void testOddCase() { + void testOddCase() { String id = "-//iBATIS.apache.org//DTD SQL Map 2.0//EN"; assertPublicIdCanBeResolved(id); } diff --git a/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java b/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java index 4f590d46..a6caabfc 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java @@ -30,10 +30,10 @@ * 08 / 29 / 2006 * */ -public class CacheKeyTest { +class CacheKeyTest { @Test - public void testUpdate() { + void testUpdate() { CacheKey key3 = new CacheKey(); CacheKey key4 = new CacheKey(); diff --git a/src/test/java/com/ibatis/sqlmap/engine/cache/fifo/FifoCacheControllerTest.java b/src/test/java/com/ibatis/sqlmap/engine/cache/fifo/FifoCacheControllerTest.java index 3a8b9e1e..d8641b21 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/cache/fifo/FifoCacheControllerTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/cache/fifo/FifoCacheControllerTest.java @@ -18,7 +18,7 @@ import com.ibatis.sqlmap.engine.cache.CacheController; import com.ibatis.sqlmap.engine.cache.lru.LruCacheControllerTest; -public class FifoCacheControllerTest extends LruCacheControllerTest { +class FifoCacheControllerTest extends LruCacheControllerTest { @Override protected CacheController getController() { diff --git a/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java b/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java index f4238d8f..2ee3a17a 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java @@ -24,14 +24,14 @@ import org.junit.jupiter.api.Test; -public class LruCacheControllerTest { +class LruCacheControllerTest { protected CacheController getController() { return new LruCacheController(); } @Test - public void testSizeOne() { + void testSizeOne() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; @@ -49,7 +49,7 @@ public void testSizeOne() { } @Test - public void testGetAndPutObject() { + void testGetAndPutObject() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; @@ -65,7 +65,7 @@ public void testGetAndPutObject() { } @Test - public void testRemoveObject() { + void testRemoveObject() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; @@ -80,7 +80,7 @@ public void testRemoveObject() { } @Test - public void testFlush() { + void testFlush() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; diff --git a/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java b/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java index 96ee6cb2..b11145b0 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; -public class MemoryCacheControllerTest extends LruCacheControllerTest { +class MemoryCacheControllerTest extends LruCacheControllerTest { @Override protected CacheController getController() { @@ -29,7 +29,7 @@ protected CacheController getController() { @Override @Test - public void testSizeOne() { + void testSizeOne() { // This is not relevant for this model } } diff --git a/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java b/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java index fa34d15c..7d32246d 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java @@ -23,10 +23,10 @@ import org.junit.jupiter.api.Test; -public class InlineParameterMapParserTest { +class InlineParameterMapParserTest { @Test - public void testParseInlineParameterMapTypeHandlerFactoryString() { + void testParseInlineParameterMapTypeHandlerFactoryString() { InlineParameterMapParser parser = new InlineParameterMapParser(); SqlText parseInlineParameterMap = parser.parseInlineParameterMap(new TypeHandlerFactory(), "insert into foo (myColumn) values (1)"); diff --git a/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java b/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java index cee8f30e..4d49e245 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; -public class EnhancedLazyResultLoaderTest { +class EnhancedLazyResultLoaderTest { /** * Test if a method in a proxied object can access a default method of another class in the same package with default @@ -36,7 +36,7 @@ public class EnhancedLazyResultLoaderTest { * Depending of the implementation of the Cglib-proxy the access will throw an IllegalAccessException. */ @Test - public void testProxyMethodAccess() throws SQLException { + void testProxyMethodAccess() throws SQLException { SqlMapClientImpl client = setupMockSqlMapClientImpl(); EnhancedLazyResultLoader loader = new EnhancedLazyResultLoader(client, "bean2", null, Bean2.class); @@ -50,7 +50,7 @@ public void testProxyMethodAccess() throws SQLException { * Test if a proxy for a null nevertheless dispatch to a default object. */ @Test - public void testNullProxy() throws SQLException { + void testNullProxy() throws SQLException { SqlMapClientImpl client = setupMockSqlMapClientImpl(); EnhancedLazyResultLoader loader = new EnhancedLazyResultLoader(client, "bean3", null, TestBean3.class); diff --git a/src/test/java/threads/RemapResultsThreadTest.java b/src/test/java/threads/RemapResultsThreadTest.java index c34d6e62..5345304a 100644 --- a/src/test/java/threads/RemapResultsThreadTest.java +++ b/src/test/java/threads/RemapResultsThreadTest.java @@ -26,15 +26,15 @@ import org.junit.jupiter.api.Test; -public class RemapResultsThreadTest { +class RemapResultsThreadTest { @Test - public void testWithRemap() throws Exception { + void testWithRemap() throws Exception { runTest("WithRemap"); } @Test - public void testWithoutRemap() throws Exception { + void testWithoutRemap() throws Exception { runTest("WithoutRemap"); } From 8b80c6ad41b0b9035ddbde8cc6386d80e1e21efb Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 9 May 2021 15:38:32 -0400 Subject: [PATCH 3/4] [tests] Formatting / move some tests back to legacy style due to usage --- .../com/ibatis/common/beans/BadBeanTest.java | 12 +-- .../common/beans/ComplexBeanProbeTest.java | 2 +- .../common/beans/JavaBeanProbeTest.java | 10 +-- .../common/beans/PropertyAccessPlanTest.java | 2 +- .../common/resources/ResourcesTest.java | 34 +++---- .../common/util/PaginatedArrayListTest.java | 8 +- .../ibatis/common/xml/NodeletUtilsTest.java | 6 +- .../com/ibatis/sqlmap/BaseSqlMapTest.java | 4 +- .../java/com/ibatis/sqlmap/BatchTest.java | 8 +- .../com/ibatis/sqlmap/CacheStatementTest.java | 30 +++---- .../com/ibatis/sqlmap/ComplexTypeTest.java | 4 +- .../ibatis/sqlmap/DerbyParameterMapTest.java | 2 +- .../ibatis/sqlmap/DirectFieldMappingTest.java | 6 +- .../com/ibatis/sqlmap/DiscriminatorTest.java | 8 +- .../com/ibatis/sqlmap/DomStatementTest.java | 10 +-- .../com/ibatis/sqlmap/DynamicPrependTest.java | 30 +++---- .../java/com/ibatis/sqlmap/DynamicTest.java | 50 +++++------ .../java/com/ibatis/sqlmap/IterateTest.java | 30 +++---- .../com/ibatis/sqlmap/MultiResultSetTest.java | 8 +- .../com/ibatis/sqlmap/NestedIterateTest.java | 64 +++++++------- .../com/ibatis/sqlmap/ParameterMapTest.java | 16 ++-- .../sqlmap/PrivateMethodAccessTest.java | 4 +- .../sqlmap/RepeatingGroupMappingTest.java | 10 +-- .../java/com/ibatis/sqlmap/ResultMapTest.java | 36 ++++---- .../sqlmap/ResultObjectFactoryTest.java | 4 +- .../java/com/ibatis/sqlmap/StatementTest.java | 88 +++++++++---------- .../com/ibatis/sqlmap/TransactionTest.java | 18 ++-- .../com/ibatis/sqlmap/XmlStatementTest.java | 10 +-- .../SqlMapClasspathEntityResolverTest.java | 18 ++-- .../sqlmap/engine/cache/CacheKeyTest.java | 2 +- .../cache/lru/LruCacheControllerTest.java | 10 +-- .../memory/MemoryCacheControllerTest.java | 2 +- .../InlineParameterMapParserTest.java | 2 +- .../loader/EnhancedLazyResultLoaderTest.java | 4 +- .../java/threads/RemapResultsThreadTest.java | 4 +- 35 files changed, 278 insertions(+), 278 deletions(-) diff --git a/src/test/java/com/ibatis/common/beans/BadBeanTest.java b/src/test/java/com/ibatis/common/beans/BadBeanTest.java index 21a70f08..6f295c6b 100644 --- a/src/test/java/com/ibatis/common/beans/BadBeanTest.java +++ b/src/test/java/com/ibatis/common/beans/BadBeanTest.java @@ -36,7 +36,7 @@ class BadBeanTest { private static final Object[] INT_PARAMS = new Object[] { INT_VALUE }; @Test - void testShouldSuccessfullyGetAndSetValueOnGoodBean() throws Exception { + void testShouldSuccessfullyGetAndSetValueOnGoodBean() throws Exception { GoodBean bean = new GoodBean(); ClassInfo info = ClassInfo.getInstance(GoodBean.class); info.getSetter(PROPNAME).invoke(bean, STRING_PARAMS); @@ -46,7 +46,7 @@ void testShouldSuccessfullyGetAndSetValueOnGoodBean() throws Exception { } @Test - void testShouldSuccessfullyGetAndSetValueOnBeanWithDifferentTypeGetterSetter() throws Exception { + void testShouldSuccessfullyGetAndSetValueOnBeanWithDifferentTypeGetterSetter() throws Exception { BeanWithDifferentTypeGetterSetter bean = new BeanWithDifferentTypeGetterSetter(); ClassInfo info = ClassInfo.getInstance(BeanWithDifferentTypeGetterSetter.class); info.getSetter(PROPNAME).invoke(bean, INT_PARAMS); @@ -56,7 +56,7 @@ void testShouldSuccessfullyGetAndSetValueOnBeanWithDifferentTypeGetterSetter() } @Test - void testShouldSuccessfullyGetAndSetValueOnBeanWithOverloadedSetter() throws Exception { + void testShouldSuccessfullyGetAndSetValueOnBeanWithOverloadedSetter() throws Exception { BeanWithOverloadedSetter bean = new BeanWithOverloadedSetter(); ClassInfo info = ClassInfo.getInstance(BeanWithOverloadedSetter.class); info.getSetter(PROPNAME).invoke(bean, STRING_PARAMS); @@ -66,7 +66,7 @@ void testShouldSuccessfullyGetAndSetValueOnBeanWithOverloadedSetter() throws Ex } @Test - void testShouldFailInitializingClassInfoForBeanWithNoGetterOverloadedSetter() { + void testShouldFailInitializingClassInfoForBeanWithNoGetterOverloadedSetter() { try { try { ClassInfo.getInstance(BeanWithNoGetterOverloadedSetters.class); @@ -81,7 +81,7 @@ void testShouldFailInitializingClassInfoForBeanWithNoGetterOverloadedSetter() { } @Test - void testShouldFailInitializingClassInfoForBeanWithDifferentTypeOverloadedSetter() { + void testShouldFailInitializingClassInfoForBeanWithDifferentTypeOverloadedSetter() { try { try { ClassInfo.getInstance(BeanWithDifferentTypeOverloadedSetter.class); @@ -96,7 +96,7 @@ void testShouldFailInitializingClassInfoForBeanWithDifferentTypeOverloadedSette } @Test - void testUnwrapThrowable() { + void testUnwrapThrowable() { SQLException cause = new SQLException("test"); UndeclaredThrowableException e = new UndeclaredThrowableException(cause); assertEquals(cause, ClassInfo.unwrapThrowable(e)); diff --git a/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java b/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java index 6965a456..3f8321cc 100644 --- a/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java +++ b/src/test/java/com/ibatis/common/beans/ComplexBeanProbeTest.java @@ -24,7 +24,7 @@ class ComplexBeanProbeTest { @Test - void testSetObject() { + void testSetObject() { SimpleClass mySimpleClass = new SimpleClass(); Probe probe = ProbeFactory.getProbe(mySimpleClass); probe.setObject(mySimpleClass, "myInt", Integer.valueOf(1)); diff --git a/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java b/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java index 3a14ee49..210299b2 100644 --- a/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java +++ b/src/test/java/com/ibatis/common/beans/JavaBeanProbeTest.java @@ -24,7 +24,7 @@ class JavaBeanProbeTest { @Test - void testGetPropertyTypeForSetterObjectString() { + void testGetPropertyTypeForSetterObjectString() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.getPropertyTypeForSetter(b, "testBean").equals(TestBean.class)); @@ -32,7 +32,7 @@ void testGetPropertyTypeForSetterObjectString() { } @Test - void testGetPropertyTypeForGetterObjectString() { + void testGetPropertyTypeForGetterObjectString() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.getPropertyTypeForGetter(b, "testBean").equals(TestBean.class)); @@ -40,7 +40,7 @@ void testGetPropertyTypeForGetterObjectString() { } @Test - void testHasWritableProperty() { + void testHasWritableProperty() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.hasWritableProperty(b, "testBean")); @@ -48,7 +48,7 @@ void testHasWritableProperty() { } @Test - void testHasReadableProperty() { + void testHasReadableProperty() { TestBean b = getBean(); Probe p = getProbe(b); assertTrue(p.hasReadableProperty(b, "testBean")); @@ -56,7 +56,7 @@ void testHasReadableProperty() { } @Test - void testSetAndGetObject() { + void testSetAndGetObject() { TestBean b = getBean(); Probe p = getProbe(b); float f[] = new float[3]; diff --git a/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java b/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java index 282a8c89..cbbc7d56 100644 --- a/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java +++ b/src/test/java/com/ibatis/common/beans/PropertyAccessPlanTest.java @@ -36,7 +36,7 @@ class PropertyAccessPlanTest { "clinton@ibatis.com", "VISA", "1234567890", "05/06", "M100", Integer.valueOf(3), new BigDecimal(150) }; @Test - void testSetAndGetProperties() { + void testSetAndGetProperties() { AccessPlan plan = AccessPlanFactory.getAccessPlan(Order.class, properties); diff --git a/src/test/java/com/ibatis/common/resources/ResourcesTest.java b/src/test/java/com/ibatis/common/resources/ResourcesTest.java index ee0ba8ae..f5ded632 100644 --- a/src/test/java/com/ibatis/common/resources/ResourcesTest.java +++ b/src/test/java/com/ibatis/common/resources/ResourcesTest.java @@ -43,7 +43,7 @@ class ResourcesTest { private boolean isUsingPrivateClassloader = false; @Test - void testSetDefaultClassLoader() { + void testSetDefaultClassLoader() { ClassLoader classLoader = new TestCL(this.getClass().getClassLoader()); ClassLoader tmp = Resources.getDefaultClassLoader(); Resources.setDefaultClassLoader(classLoader); @@ -56,7 +56,7 @@ void testSetDefaultClassLoader() { * Class to test for URL getResourceURL(String) */ @Test - void testGetResourceURLString() { + void testGetResourceURLString() { String resourceName; URL url; @@ -85,7 +85,7 @@ void testGetResourceURLString() { * Class to test for URL getResourceURL(ClassLoader, String) */ @Test - void testGetResourceURLClassLoaderString() { + void testGetResourceURLClassLoaderString() { String resourceName; URL url; ClassLoader classLoader; @@ -122,7 +122,7 @@ void testGetResourceURLClassLoaderString() { * Class to test for InputStream getResourceAsStream(String) */ @Test - void testGetResourceAsStreamString() { + void testGetResourceAsStreamString() { InputStream inputStream; String resourceName; @@ -150,7 +150,7 @@ void testGetResourceAsStreamString() { * Class to test for InputStream getResourceAsStream(ClassLoader, String) */ @Test - void testGetResourceAsStreamClassLoaderString() { + void testGetResourceAsStreamClassLoaderString() { InputStream inputStream; String resourceName; ClassLoader classLoader; @@ -186,7 +186,7 @@ void testGetResourceAsStreamClassLoaderString() { * Class to test for Properties getResourceAsProperties(String) */ @Test - void testGetResourceAsPropertiesString() { + void testGetResourceAsPropertiesString() { String resourceName; String testProp = "name"; String testPropValue = "value"; @@ -220,7 +220,7 @@ void testGetResourceAsPropertiesString() { * Class to test for Properties getResourceAsProperties(ClassLoader, String) */ @Test - void testGetResourceAsPropertiesClassLoaderString() { + void testGetResourceAsPropertiesClassLoaderString() { String resourceName; String testProp = "name"; String testPropValue = "value"; @@ -261,58 +261,58 @@ void testGetResourceAsPropertiesClassLoaderString() { * Class to test for Reader getResourceAsReader(String) */ @Test - void testGetResourceAsReaderString() { + void testGetResourceAsReaderString() { } /* * Class to test for Reader getResourceAsReader(ClassLoader, String) */ @Test - void testGetResourceAsReaderClassLoaderString() { + void testGetResourceAsReaderClassLoaderString() { } /* * Class to test for File getResourceAsFile(String) */ @Test - void testGetResourceAsFileString() { + void testGetResourceAsFileString() { } /* * Class to test for File getResourceAsFile(ClassLoader, String) */ @Test - void testGetResourceAsFileClassLoaderString() { + void testGetResourceAsFileClassLoaderString() { } @Test - void testGetUrlAsStream() { + void testGetUrlAsStream() { } @Test - void testGetUrlAsReader() { + void testGetUrlAsReader() { } @Test - void testGetUrlAsProperties() { + void testGetUrlAsProperties() { } @Test - void testClassForName() { + void testClassForName() { } /* * Class to test for Object instantiate(String) */ @Test - void testInstantiateString() { + void testInstantiateString() { } /* * Class to test for Object instantiate(Class) */ @Test - void testInstantiateClass() { + void testInstantiateClass() { } /* diff --git a/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java b/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java index c43aa8af..135fb4b2 100644 --- a/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java +++ b/src/test/java/com/ibatis/common/util/PaginatedArrayListTest.java @@ -29,7 +29,7 @@ class PaginatedArrayListTest { private PaginatedArrayList evenPageList; @BeforeEach - void setUp() { + void setUp() { smallPageList = new PaginatedArrayList(5); smallPageList.add(Integer.valueOf(0)); smallPageList.add(Integer.valueOf(1)); @@ -75,7 +75,7 @@ void setUp() { } @Test - void testOddPaginatedIterator() { + void testOddPaginatedIterator() { assertEquals(true, oddPageList.isFirstPage()); assertEquals(false, oddPageList.isPreviousPageAvailable()); @@ -145,7 +145,7 @@ void testOddPaginatedIterator() { } @Test - void testEvenPaginatedIterator() { + void testEvenPaginatedIterator() { assertEquals(true, evenPageList.isFirstPage()); assertEquals(false, evenPageList.isPreviousPageAvailable()); @@ -205,7 +205,7 @@ void testEvenPaginatedIterator() { } @Test - void testSmallPaginatedIterator() { + void testSmallPaginatedIterator() { assertEquals(true, smallPageList.isFirstPage()); assertEquals(true, smallPageList.isLastPage()); diff --git a/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java b/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java index eeab27ff..00f3f215 100644 --- a/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java +++ b/src/test/java/com/ibatis/common/xml/NodeletUtilsTest.java @@ -28,7 +28,7 @@ class NodeletUtilsTest { * Test for getting of a boolean argument. */ @Test - void testGetBooleanAttribute() { + void testGetBooleanAttribute() { Properties props = new Properties(); props.setProperty("boolean1", "true"); @@ -49,7 +49,7 @@ void testGetBooleanAttribute() { * Test for getting of a integer argument. */ @Test - void testGetIntAttribute() { + void testGetIntAttribute() { Properties props = new Properties(); props.setProperty("int1", "0"); @@ -79,7 +79,7 @@ void testGetIntAttribute() { * Test for getting of a boolean argument. */ @Test - void testParsePropertyTokens() { + void testParsePropertyTokens() { Properties props = new Properties(); props.setProperty("key1", "0"); diff --git a/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java b/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java index 0a15ed23..b6b0e360 100644 --- a/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java @@ -36,7 +36,7 @@ import testdomain.Order; import testdomain.PrivateAccount; -class BaseSqlMapTest { +public class BaseSqlMapTest { protected static SqlMapClient sqlMap; @@ -170,7 +170,7 @@ protected void assertOrder1(Map order) { } @Test - void testDummy() { + void testDummy() { // just to avoid warnings when running all tests. } diff --git a/src/test/java/com/ibatis/sqlmap/BatchTest.java b/src/test/java/com/ibatis/sqlmap/BatchTest.java index af217ff7..0d06e783 100644 --- a/src/test/java/com/ibatis/sqlmap/BatchTest.java +++ b/src/test/java/com/ibatis/sqlmap/BatchTest.java @@ -38,13 +38,13 @@ class BatchTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @Test - void testExecutebatchDetailed() { + void testExecutebatchDetailed() { List accountList1 = new ArrayList(); Account account = new Account(); account.setId(10); @@ -161,7 +161,7 @@ void testExecutebatchDetailed() { } @Test - void testExecutebatchDetailedWithError() { + void testExecutebatchDetailedWithError() { List accountList1 = new ArrayList(); Account account = new Account(); account.setId(10); @@ -297,7 +297,7 @@ void testExecutebatchDetailedWithError() { } @Test - void testExecutebatch() { + void testExecutebatch() { List accountList1 = new ArrayList(); Account account = new Account(); account.setId(10); diff --git a/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java b/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java index dd2ba5b1..11da76d1 100644 --- a/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java @@ -38,13 +38,13 @@ class CacheStatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @Test - void testMappedStatementQueryWithCache() throws SQLException { + void testMappedStatementQueryWithCache() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); @@ -68,7 +68,7 @@ void testMappedStatementQueryWithCache() throws SQLException { } @Test - void testMappedStatementQueryWithCache2() throws SQLException { + void testMappedStatementQueryWithCache2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); @@ -93,7 +93,7 @@ void testMappedStatementQueryWithCache2() throws SQLException { } @Test - void testFlushDataCache() throws SQLException { + void testFlushDataCache() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -106,7 +106,7 @@ void testFlushDataCache() throws SQLException { } @Test - void testFlushDataCache2() throws SQLException { + void testFlushDataCache2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); int firstId = System.identityHashCode(list); @@ -120,7 +120,7 @@ void testFlushDataCache2() throws SQLException { } @Test - void testFlushDataCacheOnExecute() throws SQLException { + void testFlushDataCacheOnExecute() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -133,7 +133,7 @@ void testFlushDataCacheOnExecute() throws SQLException { } @Test - void testFlushDataCacheOnExecute2() throws SQLException { + void testFlushDataCacheOnExecute2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); int firstId = System.identityHashCode(list); @@ -147,7 +147,7 @@ void testFlushDataCacheOnExecute2() throws SQLException { } @Test - void testFlushDataCacheOnExecuteInBatch() throws SQLException { + void testFlushDataCacheOnExecuteInBatch() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -162,7 +162,7 @@ void testFlushDataCacheOnExecuteInBatch() throws SQLException { } @Test - void testFlushDataCacheOnExecuteInBatch2() throws SQLException { + void testFlushDataCacheOnExecuteInBatch2() throws SQLException { // tests the new methods that don't require a parameter object List list = sqlMap.queryForList("getCachedAccountsViaResultMap"); int firstId = System.identityHashCode(list); @@ -178,7 +178,7 @@ void testFlushDataCacheOnExecuteInBatch2() throws SQLException { } @Test - void testFlushDataCacheOnExecuteInBatchWithTx() throws SQLException { + void testFlushDataCacheOnExecuteInBatchWithTx() throws SQLException { List list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); int firstId = System.identityHashCode(list); list = sqlMap.queryForList("getCachedAccountsViaResultMap", null); @@ -199,7 +199,7 @@ void testFlushDataCacheOnExecuteInBatchWithTx() throws SQLException { } @Test - void testMappedStatementQueryWithThreadedCache() throws SQLException { + void testMappedStatementQueryWithThreadedCache() throws SQLException { Map results = new HashMap(); @@ -226,7 +226,7 @@ void testMappedStatementQueryWithThreadedCache() throws SQLException { } @Test - void testMappedStatementQueryWithThreadedReadWriteCache() throws SQLException { + void testMappedStatementQueryWithThreadedReadWriteCache() throws SQLException { Map results = new HashMap(); @@ -253,7 +253,7 @@ void testMappedStatementQueryWithThreadedReadWriteCache() throws SQLException { } @Test - void testCacheKeyWithSameHashcode() { + void testCacheKeyWithSameHashcode() { CacheKey key1 = new CacheKey(); CacheKey key2 = new CacheKey(); @@ -265,7 +265,7 @@ void testCacheKeyWithSameHashcode() { } @Test - void testCacheKeyWithTwoParamsSameHashcode() { + void testCacheKeyWithTwoParamsSameHashcode() { CacheKey key1 = new CacheKey(); CacheKey key2 = new CacheKey(); @@ -291,7 +291,7 @@ public TestCacheThread(SqlMapClient sqlMap, Map results, String } @Override - void run() { + public void run() { try { SqlMapSession session = sqlMap.openSession(); List list = session.queryForList(statementName, null); diff --git a/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java b/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java index 93785f7d..73e156e5 100644 --- a/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java +++ b/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java @@ -30,7 +30,7 @@ class ComplexTypeTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -38,7 +38,7 @@ void setUp() throws Exception { } @Test - void testMapBeanMap() throws Exception { + void testMapBeanMap() throws Exception { Map map = new HashMap<>(); ComplexBean bean = new ComplexBean(); bean.setMap(new HashMap()); diff --git a/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java b/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java index 4068e8a7..b82b01bc 100644 --- a/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/DerbyParameterMapTest.java @@ -28,7 +28,7 @@ class DerbyParameterMapTest extends ParameterMapTest { @Override @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } diff --git a/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java b/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java index 6ee4e510..46b91a28 100644 --- a/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java +++ b/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java @@ -26,13 +26,13 @@ class DirectFieldMappingTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @Test - void testInsertAndSelectDirectToFields() throws SQLException { + void testInsertAndSelectDirectToFields() throws SQLException { FieldAccount account = newFieldAccount6(); sqlMap.insert("insertAccountFromFields", account); @@ -44,7 +44,7 @@ void testInsertAndSelectDirectToFields() throws SQLException { } @Test - void testGetAccountWithPrivateConstructor() throws SQLException { + void testGetAccountWithPrivateConstructor() throws SQLException { FieldAccount account = newFieldAccount6(); sqlMap.insert("insertAccountFromFields", account); diff --git a/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java b/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java index 50b4eed5..e64d6e5e 100644 --- a/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java +++ b/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java @@ -31,13 +31,13 @@ class DiscriminatorTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/docs-init.sql"); } @Test - void testDiscriminator() throws Exception { + void testDiscriminator() throws Exception { List list = sqlMap.queryForList("getDocuments", null); assertEquals(6, list.size()); @@ -63,7 +63,7 @@ void testDiscriminator() throws Exception { } @Test - void testDiscriminatorInNestedResultMap() throws Exception { + void testDiscriminatorInNestedResultMap() throws Exception { List list = sqlMap.queryForList("getPersonDocuments"); assertEquals(3, list.size()); @@ -74,7 +74,7 @@ void testDiscriminatorInNestedResultMap() throws Exception { } @Test - void testDiscriminatorWithNestedResultMap() throws Exception { + void testDiscriminatorWithNestedResultMap() throws Exception { List list = sqlMap.queryForList("getDocumentsWithAttributes"); assertEquals(6, list.size()); diff --git a/src/test/java/com/ibatis/sqlmap/DomStatementTest.java b/src/test/java/com/ibatis/sqlmap/DomStatementTest.java index e9175b84..946e945a 100644 --- a/src/test/java/com/ibatis/sqlmap/DomStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/DomStatementTest.java @@ -35,7 +35,7 @@ class DomStatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -43,7 +43,7 @@ void setUp() throws Exception { } @Test - void testExecuteQueryForDom() throws SQLException { + void testExecuteQueryForDom() throws SQLException { Document account = (Document) sqlMap.queryForObject("getAccountDom", newParameter("1")); assertNotNull(account); @@ -56,7 +56,7 @@ void testExecuteQueryForDom() throws SQLException { } @Test - void testExecuteQueryForDomSpecialChars() throws SQLException { + void testExecuteQueryForDomSpecialChars() throws SQLException { Document account = (Document) sqlMap.queryForObject("getAccountDom", newParameter("5")); assertNotNull(account); @@ -67,7 +67,7 @@ void testExecuteQueryForDomSpecialChars() throws SQLException { } @Test - void testExecuteQueryForDomExternalMaps() throws SQLException { + void testExecuteQueryForDomExternalMaps() throws SQLException { Document account = (Document) sqlMap.queryForObject("getAccountDomExternalMaps", newParameter("1")); assertNotNull(account); @@ -84,7 +84,7 @@ void testExecuteQueryForDomExternalMaps() throws SQLException { } @Test - void testExecuteQueryForOrderDom() throws SQLException { + void testExecuteQueryForOrderDom() throws SQLException { Document order = (Document) sqlMap.queryForObject("getOrderDom", newParameter("1")); assertNotNull(order); diff --git a/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java b/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java index ee9749c2..5615dfa7 100644 --- a/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java +++ b/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java @@ -31,7 +31,7 @@ class DynamicPrependTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -39,7 +39,7 @@ void setUp() throws Exception { // Iterate with prepend @Test - void testIterateWithPrepend1() throws SQLException { + void testIterateWithPrepend1() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateWithPrepend1", params); assertAccount1((Account) list.get(0)); @@ -47,7 +47,7 @@ void testIterateWithPrepend1() throws SQLException { } @Test - void testIterateWithPrepend2() throws SQLException { + void testIterateWithPrepend2() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateWithPrepend2", params); assertAccount1((Account) list.get(0)); @@ -55,7 +55,7 @@ void testIterateWithPrepend2() throws SQLException { } @Test - void testIterateWithPrepend2b() throws SQLException { + void testIterateWithPrepend2b() throws SQLException { Account account1, account2, account3; account1 = new Account(); @@ -74,7 +74,7 @@ void testIterateWithPrepend2b() throws SQLException { } @Test - void testIterateWithPrepend2c() throws SQLException { + void testIterateWithPrepend2c() throws SQLException { Account account1, account2, account3; account1 = new Account(); @@ -100,7 +100,7 @@ void testIterateWithPrepend2c() throws SQLException { } @Test - void testIterateWithPrepend2d() throws SQLException { + void testIterateWithPrepend2d() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); @@ -116,7 +116,7 @@ void testIterateWithPrepend2d() throws SQLException { } @Test - void testIterateWithPrepend2e() throws SQLException { + void testIterateWithPrepend2e() throws SQLException { Object[] params = new Object[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }; @@ -132,7 +132,7 @@ void testIterateWithPrepend2e() throws SQLException { } @Test - void testIterateWithPrepend2f() throws SQLException { + void testIterateWithPrepend2f() throws SQLException { int[] params = new int[] { 1, 2, 3 }; @@ -148,7 +148,7 @@ void testIterateWithPrepend2f() throws SQLException { } @Test - void testIterateWithPrepend3() throws SQLException { + void testIterateWithPrepend3() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateWithPrepend3", params); assertAccount1((Account) list.get(0)); @@ -156,7 +156,7 @@ void testIterateWithPrepend3() throws SQLException { } @Test - void testDynamicWithPrepend1() throws SQLException { + void testDynamicWithPrepend1() throws SQLException { Account account = new Account(); account.setId(1); account = (Account) sqlMap.queryForObject("dynamicWithPrepend", account); @@ -164,7 +164,7 @@ void testDynamicWithPrepend1() throws SQLException { } @Test - void testDynamicWithPrepend2() throws SQLException { + void testDynamicWithPrepend2() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); @@ -173,7 +173,7 @@ void testDynamicWithPrepend2() throws SQLException { } @Test - void testDynamicWithPrepend3() throws SQLException { + void testDynamicWithPrepend3() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); @@ -183,14 +183,14 @@ void testDynamicWithPrepend3() throws SQLException { } @Test - void testIterateWithPrepend4() throws SQLException { + void testIterateWithPrepend4() throws SQLException { List list = sqlMap.queryForList("dynamicWithPrepend", null); assertAccount1((Account) list.get(0)); assertEquals(5, list.size()); } @Test - void testIterateWithTwoPrepends() throws SQLException { + void testIterateWithTwoPrepends() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); @@ -203,7 +203,7 @@ void testIterateWithTwoPrepends() throws SQLException { } @Test - void testComplexDynamic() throws SQLException { + void testComplexDynamic() throws SQLException { Account account = new Account(); account.setId(1); account.setFirstName("Clinton"); diff --git a/src/test/java/com/ibatis/sqlmap/DynamicTest.java b/src/test/java/com/ibatis/sqlmap/DynamicTest.java index 1d0133cc..0f331e8b 100644 --- a/src/test/java/com/ibatis/sqlmap/DynamicTest.java +++ b/src/test/java/com/ibatis/sqlmap/DynamicTest.java @@ -30,7 +30,7 @@ class DynamicTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -38,14 +38,14 @@ void setUp() throws Exception { // PARAMETER PRESENT @Test - void testIsParameterPresentTrue() throws SQLException { + void testIsParameterPresentTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsParameterPresent", Integer.valueOf(1)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsParameterPresentFalse() throws SQLException { + void testIsParameterPresentFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsParameterPresent", null); assertEquals(5, list.size()); } @@ -53,14 +53,14 @@ void testIsParameterPresentFalse() throws SQLException { // EMPTY @Test - void testIsNotEmptyTrue() throws SQLException { + void testIsNotEmptyTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotEmpty", "Clinton"); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsNotEmptyFalse() throws SQLException { + void testIsNotEmptyFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotEmpty", ""); assertEquals(5, list.size()); } @@ -68,14 +68,14 @@ void testIsNotEmptyFalse() throws SQLException { // EQUAL @Test - void testIsEqualTrue() throws SQLException { + void testIsEqualTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsEqual", "Clinton"); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsEqualFalse() throws SQLException { + void testIsEqualFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsEqual", "BLAH!"); assertEquals(5, list.size()); } @@ -83,14 +83,14 @@ void testIsEqualFalse() throws SQLException { // GREATER @Test - void testIsGreaterTrue() throws SQLException { + void testIsGreaterTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreater", Integer.valueOf(5)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsGreaterFalse() throws SQLException { + void testIsGreaterFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreater", Integer.valueOf(1)); assertEquals(5, list.size()); } @@ -98,14 +98,14 @@ void testIsGreaterFalse() throws SQLException { // GREATER EQUAL @Test - void testIsGreaterEqualTrue() throws SQLException { + void testIsGreaterEqualTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreaterEqual", Integer.valueOf(3)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsGreaterEqualFalse() throws SQLException { + void testIsGreaterEqualFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsGreaterEqual", Integer.valueOf(1)); assertEquals(5, list.size()); } @@ -113,14 +113,14 @@ void testIsGreaterEqualFalse() throws SQLException { // LESS @Test - void testIsLessTrue() throws SQLException { + void testIsLessTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsLess", Integer.valueOf(1)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsLessFalse() throws SQLException { + void testIsLessFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsLess", Integer.valueOf(5)); assertEquals(5, list.size()); } @@ -128,14 +128,14 @@ void testIsLessFalse() throws SQLException { // LESS EQUAL @Test - void testIsLessEqualTrue() throws SQLException { + void testIsLessEqualTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsLessEqual", Integer.valueOf(3)); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsLessEqualFalse() throws SQLException { + void testIsLessEqualFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsLessEqual", Integer.valueOf(5)); assertEquals(5, list.size()); } @@ -143,14 +143,14 @@ void testIsLessEqualFalse() throws SQLException { // NULL @Test - void testIsNotNullTrue() throws SQLException { + void testIsNotNullTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotNull", ""); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testIsNotNullFalse() throws SQLException { + void testIsNotNullFalse() throws SQLException { List list = sqlMap.queryForList("dynamicIsNotNull", null); assertEquals(5, list.size()); } @@ -158,14 +158,14 @@ void testIsNotNullFalse() throws SQLException { // PROPERTY AVAILABLE @Test - void testIsPropertyAvailableTrue() throws SQLException { + void testIsPropertyAvailableTrue() throws SQLException { List list = sqlMap.queryForList("dynamicIsPropertyAvailable", "1"); assertAccount1((Account) list.get(0)); assertEquals(1, list.size()); } @Test - void testEmptyParameterObject() throws SQLException { + void testEmptyParameterObject() throws SQLException { Account account = new Account(); account.setId(-1); List list = sqlMap.queryForList("dynamicQueryByExample", account); @@ -174,7 +174,7 @@ void testEmptyParameterObject() throws SQLException { } @Test - void testComplexDynamicQuery() throws SQLException { + void testComplexDynamicQuery() throws SQLException { Account account = new Account(); account.setId(2); account.setFirstName("Jim"); @@ -186,7 +186,7 @@ void testComplexDynamicQuery() throws SQLException { } @Test - void testComplexDynamicQueryLiteral() throws SQLException { + void testComplexDynamicQueryLiteral() throws SQLException { Account account = new Account(); account.setId(2); account.setFirstName("Jim"); @@ -203,7 +203,7 @@ void testComplexDynamicQueryLiteral() throws SQLException { // -- iterative $substitutions[]$. // // @Test - // void testCompleteStatementSubst() throws SQLException { + // void testCompleteStatementSubst() throws SQLException { // String statement = "select" + // " ACC_ID as id," + // " ACC_FIRST_NAME as firstName," + @@ -225,7 +225,7 @@ void testComplexDynamicQueryLiteral() throws SQLException { // Query By Example w/Prepend @Test - void testQueryByExample() throws SQLException { + void testQueryByExample() throws SQLException { Account account; account = new Account(); @@ -259,7 +259,7 @@ void testQueryByExample() throws SQLException { } @Test - void testRemappableResults() throws SQLException { + void testRemappableResults() throws SQLException { Account account; account = new Account(); @@ -277,7 +277,7 @@ void testRemappableResults() throws SQLException { } @Test - void testIsPropertyAvailable() throws Exception { + void testIsPropertyAvailable() throws Exception { Map account = new HashMap(); account.put("id", Integer.valueOf(1)); diff --git a/src/test/java/com/ibatis/sqlmap/IterateTest.java b/src/test/java/com/ibatis/sqlmap/IterateTest.java index a20229a2..90671824 100644 --- a/src/test/java/com/ibatis/sqlmap/IterateTest.java +++ b/src/test/java/com/ibatis/sqlmap/IterateTest.java @@ -28,7 +28,7 @@ class IterateTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -36,7 +36,7 @@ void setUp() throws Exception { // Iterate @Test - void testIterate() throws SQLException { + void testIterate() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterate", params); assertAccount1((Account) list.get(0)); @@ -46,7 +46,7 @@ void testIterate() throws SQLException { // Iterate @Test - void testIterateInConditional() throws SQLException { + void testIterateInConditional() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateInConditional", params); assertEquals(2, list.size()); @@ -56,7 +56,7 @@ void testIterateInConditional() throws SQLException { } @Test - void testIterateLiteral() throws SQLException { + void testIterateLiteral() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("dynamicIterateLiteral", params); assertAccount1((Account) list.get(0)); @@ -64,7 +64,7 @@ void testIterateLiteral() throws SQLException { } @Test - void testMultiIterate() throws SQLException { + void testMultiIterate() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("multiDynamicIterate", params); assertAccount1((Account) list.get(0)); @@ -72,7 +72,7 @@ void testMultiIterate() throws SQLException { } @Test - void testMultiIterateLiteral() throws SQLException { + void testMultiIterateLiteral() throws SQLException { List params = Arrays.asList(new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }); List list = sqlMap.queryForList("multiDynamicIterateLiteral", params); assertAccount1((Account) list.get(0)); @@ -82,7 +82,7 @@ void testMultiIterateLiteral() throws SQLException { // ARRAY @Test - void testArrayPropertyIterate() throws SQLException { + void testArrayPropertyIterate() throws SQLException { Account account = new Account(); account.setIds(new int[] { 1, 2, 3 }); List list = sqlMap.queryForList("dynamicQueryByExample", account); @@ -91,7 +91,7 @@ void testArrayPropertyIterate() throws SQLException { } @Test - void testArrayPropertyIterate2() throws SQLException { + void testArrayPropertyIterate2() throws SQLException { Account account = new Account(); account.setAge(4); account.setIds(new int[] { 1, 2, 3 }); @@ -101,7 +101,7 @@ void testArrayPropertyIterate2() throws SQLException { } @Test - void testArrayPropertyIterate2Literal() throws SQLException { + void testArrayPropertyIterate2Literal() throws SQLException { Account account = new Account(); account.setAge(4); account.setIds(new int[] { 1, 2, 3 }); @@ -113,7 +113,7 @@ void testArrayPropertyIterate2Literal() throws SQLException { // LIST IN MAP @Test - void testListInMap() throws SQLException { + void testListInMap() throws SQLException { List paramList = new ArrayList(); paramList.add(Integer.valueOf(1)); paramList.add(Integer.valueOf(2)); @@ -128,7 +128,7 @@ void testListInMap() throws SQLException { } @Test - void testListDirect() throws SQLException { + void testListDirect() throws SQLException { List paramList = new ArrayList(); paramList.add(Integer.valueOf(1)); paramList.add(Integer.valueOf(2)); @@ -140,7 +140,7 @@ void testListDirect() throws SQLException { } @Test - void testIterateNestedListProperty() throws SQLException { + void testIterateNestedListProperty() throws SQLException { Account account = new Account(); account.setAccountList(new ArrayList()); account.getAccountList().add(new Account(1)); @@ -153,7 +153,7 @@ void testIterateNestedListProperty() throws SQLException { } @Test - void testIterateNestedListPropertyB() throws SQLException { + void testIterateNestedListPropertyB() throws SQLException { Account account = new Account(); account.setId(99); account.setAccountList(new ArrayList()); @@ -167,7 +167,7 @@ void testIterateNestedListPropertyB() throws SQLException { } @Test - void testIterateNestedMapListProperty() throws SQLException { + void testIterateNestedMapListProperty() throws SQLException { Map> account = new HashMap>(); List accountList = new ArrayList(); account.put("accountList", accountList); @@ -181,7 +181,7 @@ void testIterateNestedMapListProperty() throws SQLException { } @Test - void xtestArrayPropertyIterate2() throws SQLException { + void xtestArrayPropertyIterate2() throws SQLException { Account account = new Account(); account.setIds(new int[] { 1, 2, 3 }); List list = sqlMap.queryForList("dynamicQueryByExample2", account); diff --git a/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java b/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java index 51997751..8a1fa04b 100644 --- a/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java +++ b/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java @@ -35,7 +35,7 @@ class MultiResultSetTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml", Resources.getResourceAsProperties("com/ibatis/sqlmap/maps/DerbySqlMapConfig.properties")); initScript("scripts/account-init.sql"); @@ -44,7 +44,7 @@ void setUp() throws Exception { } @Test - void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultMaps() throws Exception { + void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultMaps() throws Exception { Map persons = new HashMap(); persons.put("1", Integer.valueOf(1)); persons.put("2", Integer.valueOf(2)); @@ -57,7 +57,7 @@ void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultMaps() throws Exce } @Test - void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultClasses() throws Exception { + void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultClasses() throws Exception { Map persons = new HashMap(); persons.put("1", Integer.valueOf(1)); persons.put("2", Integer.valueOf(2)); @@ -70,7 +70,7 @@ void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultClasses() throws E } @Test - void testCallableStatementShouldReturnTwoResultSets() throws Exception { + void testCallableStatementShouldReturnTwoResultSets() throws Exception { sqlMap.startTransaction(); Connection conn = sqlMap.getCurrentConnection(); CallableStatement cs = conn.prepareCall("{call MRESULTSET(?,?,?,?)}"); diff --git a/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java b/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java index 977e53b4..79541890 100644 --- a/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java +++ b/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java @@ -31,7 +31,7 @@ class NestedIterateTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/person-init.sql"); initScript("scripts/jpetstore-hsqldb-schema.sql"); @@ -44,7 +44,7 @@ void setUp() throws Exception { * This method works as expected */ @Test - void testShouldReturn9Rows() { + void testShouldReturn9Rows() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -76,7 +76,7 @@ void testShouldReturn9Rows() { * This test shoud return 1 row: id 4 */ @Test - void test02() { + void test02() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -100,7 +100,7 @@ void test02() { * This test should return 8 rows: ids 1-3, 5-9 */ @Test - void test03() { + void test03() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(4)); // put first to make the test fail po.addId(Integer.valueOf(1)); @@ -131,7 +131,7 @@ void test03() { * This test should return 5 rows: ids 5-9 */ @Test - void test04() { + void test04() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -159,7 +159,7 @@ void test04() { * This test should return 6 rows: ids 4-9 */ @Test - void test05() { + void test05() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -188,7 +188,7 @@ void test05() { * This test should return 3 rows: ids 1-3 */ @Test - void test06() { + void test06() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -215,7 +215,7 @@ void test06() { * This test should return 4 rows: ids 1-4 */ @Test - void test07() { + void test07() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -243,7 +243,7 @@ void test07() { * This method should return four rows: ids 1, 2, 7, 8 */ @Test - void test08() { + void test08() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addFirstName("Jeff"); po.addFirstName("Matt"); @@ -268,7 +268,7 @@ void test08() { * This method works when Christian's IBATIS-281 patches are applied */ @Test - void test09() { + void test09() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -292,7 +292,7 @@ void test09() { } @Test - void test09a() { + void test09a() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -319,7 +319,7 @@ void test09a() { * This test shoud return 1 row: id 4 */ @Test - void test10() { + void test10() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -343,7 +343,7 @@ void test10() { * This test should return 8 rows: ids 1-3, 5-9 */ @Test - void test11() { + void test11() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(4)); // put first to make the test fail po.addId(Integer.valueOf(1)); @@ -374,7 +374,7 @@ void test11() { * This test should return 5 rows: ids 5-9 */ @Test - void test12() { + void test12() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -402,7 +402,7 @@ void test12() { * This test should return 6 rows: ids 4-9 */ @Test - void test13() { + void test13() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -431,7 +431,7 @@ void test13() { * This test should return 3 rows: ids 1-3 */ @Test - void test14() { + void test14() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -458,7 +458,7 @@ void test14() { * This test should return 4 rows: ids 1-4 */ @Test - void test15() { + void test15() { NestedIterateParameterObject po = new NestedIterateParameterObject(); // go backwards to make the test fail po.addId(Integer.valueOf(9)); @@ -488,7 +488,7 @@ void test15() { * This method works when Christian's IBATIS-281 patches are applied */ @Test - void test16() { + void test16() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -521,7 +521,7 @@ void test16() { * This method works when Christian's IBATIS-281 patches are applied */ @Test - void test17() { + void test17() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -554,7 +554,7 @@ void test17() { * This method tests inside in */ @Test - void test18() { + void test18() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -583,7 +583,7 @@ void test18() { * This method tests inside an */ @Test - void test19() { + void test19() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -612,7 +612,7 @@ void test19() { * This method tests inside an */ @Test - void test20() { + void test20() { NestedIterateParameterObject po = new NestedIterateParameterObject(); NestedIterateParameterObject.AndCondition andCondition = new NestedIterateParameterObject.AndCondition(); @@ -643,7 +643,7 @@ void test20() { * */ @Test - void test21() { + void test21() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -678,7 +678,7 @@ void test21() { * */ @Test - void test22() { + void test22() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -703,7 +703,7 @@ void test22() { * */ @Test - void test23() { + void test23() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -728,7 +728,7 @@ void test23() { * */ @Test - void test24() { + void test24() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -753,7 +753,7 @@ void test24() { * */ @Test - void test25() { + void test25() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); po.addId(Integer.valueOf(2)); @@ -779,7 +779,7 @@ void test25() { * This tests nesting when objects are maps and not a list nested in a list */ @Test - void test26() { + void test26() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); @@ -811,7 +811,7 @@ void test26() { * This tests nesting when objects are maps and not a list nested in a list same as test26 except deeper */ @Test - void test27() { + void test27() { Map>> firstMap = new HashMap>>(); @@ -852,7 +852,7 @@ void test27() { * This tests nesting when objects are maps and not a list nested in a list */ @Test - void test28() { + void test28() { NestedIterateParameterObject po = new NestedIterateParameterObject(); po.addId(Integer.valueOf(1)); @@ -885,7 +885,7 @@ void test28() { * This tests nesting when objects are maps and not a list nested in a list same as test26 except deeper */ @Test - void test29() { + void test29() { SimpleNestedParameterObject firstParameterObject = new SimpleNestedParameterObject(); @@ -927,7 +927,7 @@ void test29() { * */ @Test - void test30() { + void test30() { try { diff --git a/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java b/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java index 334cae26..0365ad0b 100644 --- a/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java @@ -31,7 +31,7 @@ class ParameterMapTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -39,7 +39,7 @@ void setUp() throws Exception { // PARAMETER MAP FEATURE TESTS @Test - void testNullValueReplacementMap() throws SQLException { + void testNullValueReplacementMap() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaParameterMap", account); @@ -50,7 +50,7 @@ void testNullValueReplacementMap() throws SQLException { } @Test - void testNullValueReplacementInline() throws SQLException { + void testNullValueReplacementInline() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaInlineParameters", account); @@ -61,7 +61,7 @@ void testNullValueReplacementInline() throws SQLException { } @Test - void testNullValueReplacementInlineWithDynamic() throws SQLException { + void testNullValueReplacementInlineWithDynamic() throws SQLException { Account account = newAccount6(); account.setId(0); @@ -88,7 +88,7 @@ protected void assertMessageIsNullValueNotAllowed(String message) { } @Test - void testSpecifiedType() throws SQLException { + void testSpecifiedType() throws SQLException { Account account = newAccount6(); account.setEmailAddress(null); @@ -100,7 +100,7 @@ void testSpecifiedType() throws SQLException { } @Test - void testUnknownParameterClass() throws SQLException { + void testUnknownParameterClass() throws SQLException { Account account = newAccount6(); account.setEmailAddress(null); @@ -112,7 +112,7 @@ void testUnknownParameterClass() throws SQLException { } @Test - void testNullParameter() throws SQLException { + void testNullParameter() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountNullParameter", null); @@ -120,7 +120,7 @@ void testNullParameter() throws SQLException { } @Test - void testNullParameter2() throws SQLException { + void testNullParameter2() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountNullParameter"); diff --git a/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java b/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java index 0d4aa733..2798d55e 100644 --- a/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java +++ b/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java @@ -26,13 +26,13 @@ class PrivateMethodAccessTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/docs-init.sql"); } @Test - void testShouldSetPrivateProperties() throws Exception { + void testShouldSetPrivateProperties() throws Exception { List list = sqlMap.queryForList("getPrivateBooks"); assertNotNull(list); assertEquals(2, list.size()); diff --git a/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java b/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java index 6ec03ad7..4a7be011 100644 --- a/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java +++ b/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java @@ -28,26 +28,26 @@ class RepeatingGroupMappingTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/jpetstore-hsqldb-schema.sql"); initScript("scripts/jpetstore-hsqldb-dataload.sql"); } @Test - void testGroupBy() throws Exception { + void testGroupBy() throws Exception { List list = sqlMap.queryForList("getAllCategories", null); assertEquals(5, list.size()); } @Test - void testGroupByExtended() throws Exception { + void testGroupByExtended() throws Exception { List list = sqlMap.queryForList("getAllCategoriesExtended", null); assertEquals(5, list.size()); } @Test - void testNestedProperties() throws Exception { + void testNestedProperties() throws Exception { List list = sqlMap.queryForList("getFish", null); assertEquals(1, list.size()); @@ -77,7 +77,7 @@ void testNestedProperties() throws Exception { * none should be thrown. */ @Test - void testGroupByJIRA250() throws Exception { + void testGroupByJIRA250() throws Exception { List list = sqlMap.queryForList("getAllProductCategoriesJIRA250", null); Category cat = (Category) list.get(0); assertEquals(0, cat.getProductList().size()); diff --git a/src/test/java/com/ibatis/sqlmap/ResultMapTest.java b/src/test/java/com/ibatis/sqlmap/ResultMapTest.java index e6a1852b..11cfb97e 100644 --- a/src/test/java/com/ibatis/sqlmap/ResultMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/ResultMapTest.java @@ -36,7 +36,7 @@ class ResultMapTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -46,44 +46,44 @@ void setUp() throws Exception { // RESULT MAP FEATURE TESTS @Test - void testColumnsByName() throws SQLException { + void testColumnsByName() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderLiteByColumnName", Integer.valueOf(1)); assertOrder1(order); } @Test - void testExtendedResultMap() throws SQLException { + void testExtendedResultMap() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderLiteByColumnName", Integer.valueOf(1)); assertOrder1(order); } @Test - void testColumnsByIndex() throws SQLException { + void testColumnsByIndex() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderLiteByColumnIndex", Integer.valueOf(1)); assertOrder1(order); } @Test - void testNullValueReplacement() throws SQLException { + void testNullValueReplacement() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(5)); assertEquals("no_email@provided.com", account.getEmailAddress()); } @Test - void testTypeSpecified() throws SQLException { + void testTypeSpecified() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithTypes", Integer.valueOf(1)); assertOrder1(order); } @Test - void testComplexObjectMapping() throws SQLException { + void testComplexObjectMapping() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithAccount", Integer.valueOf(1)); assertOrder1(order); assertAccount1(order.getAccount()); } @Test - void testCollectionMappingAndExtends() throws SQLException { + void testCollectionMappingAndExtends() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithLineItemsCollection", Integer.valueOf(1)); assertOrder1(order); @@ -92,7 +92,7 @@ void testCollectionMappingAndExtends() throws SQLException { } @Test - void testListMapping() throws SQLException { + void testListMapping() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithLineItems", Integer.valueOf(1)); assertOrder1(order); @@ -101,7 +101,7 @@ void testListMapping() throws SQLException { } @Test - void testGetAllLineItemProps() throws SQLException { + void testGetAllLineItemProps() throws SQLException { List list = sqlMap.queryForList("getAllLineItemProps", Integer.valueOf(1)); assertNotNull(list); @@ -109,7 +109,7 @@ void testGetAllLineItemProps() throws SQLException { } @Test - void testGetSomeLineItemProps() throws SQLException { + void testGetSomeLineItemProps() throws SQLException { try { List list = sqlMap.queryForList("getSomeLineItemProps", Integer.valueOf(1)); @@ -120,7 +120,7 @@ void testGetSomeLineItemProps() throws SQLException { } @Test - void testArrayMapping() throws SQLException { + void testArrayMapping() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderWithLineItemArray", Integer.valueOf(1)); assertOrder1(order); @@ -129,19 +129,19 @@ void testArrayMapping() throws SQLException { } @Test - void testHashMapMapping() throws SQLException { + void testHashMapMapping() throws SQLException { Map order = (Map) sqlMap.queryForObject("getOrderAsMap", Integer.valueOf(1)); assertOrder1(order); } @Test - void testNestedObjects() throws SQLException { + void testNestedObjects() throws SQLException { Order order = (Order) sqlMap.queryForObject("getOrderJoinedFavourite", Integer.valueOf(1)); assertOrder1(order); } @Test - void testSimpleTypeMapping() throws SQLException { + void testSimpleTypeMapping() throws SQLException { List list = sqlMap.queryForList("getAllCreditCardNumbersFromOrders", null); assertEquals(5, list.size()); @@ -149,7 +149,7 @@ void testSimpleTypeMapping() throws SQLException { } @Test - void testCompositeKeyMapping() throws SQLException { + void testCompositeKeyMapping() throws SQLException { Order order1 = (Order) sqlMap.queryForObject("getOrderWithFavouriteLineItem", Integer.valueOf(1)); Order order2 = (Order) sqlMap.queryForObject("getOrderWithFavouriteLineItem", Integer.valueOf(2)); @@ -167,7 +167,7 @@ void testCompositeKeyMapping() throws SQLException { } @Test - void testDynCompositeKeyMapping() throws SQLException { + void testDynCompositeKeyMapping() throws SQLException { Order order1 = (Order) sqlMap.queryForObject("getOrderWithDynFavouriteLineItem", Integer.valueOf(1)); @@ -179,7 +179,7 @@ void testDynCompositeKeyMapping() throws SQLException { } @Test - void testGetDoubleNestedResult() throws SQLException { + void testGetDoubleNestedResult() throws SQLException { Account account = (Account) sqlMap.queryForObject("getNestedAccountViaColumnName", Integer.valueOf(1)); assertAccount1(account); } diff --git a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java index b3fad414..ba84d395 100644 --- a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java +++ b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java @@ -27,7 +27,7 @@ class ResultObjectFactoryTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig_rof.xml", null); initScript("scripts/jpetstore-hsqldb-schema.sql"); initScript("scripts/jpetstore-hsqldb-dataload.sql"); @@ -38,7 +38,7 @@ void setUp() throws Exception { * */ @Test - void testShouldDemonstrateThatTheObjectFactoryIsWorking() throws Exception { + void testShouldDemonstrateThatTheObjectFactoryIsWorking() throws Exception { List results = sqlMap.queryForList("getAllItemsROF"); assertEquals(28, results.size()); assertEquals(Integer.valueOf(1), ((IItem) results.get(2)).getSupplier().getSupplierId()); diff --git a/src/test/java/com/ibatis/sqlmap/StatementTest.java b/src/test/java/com/ibatis/sqlmap/StatementTest.java index 0604cc4e..dc8ebbb1 100644 --- a/src/test/java/com/ibatis/sqlmap/StatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/StatementTest.java @@ -50,7 +50,7 @@ class StatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -60,13 +60,13 @@ void setUp() throws Exception { // OBJECT QUERY TESTS @Test - void testExecuteQueryForObjectViaColumnName() throws SQLException { + void testExecuteQueryForObjectViaColumnName() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1)); assertAccount1(account); } @Test - void testUserConnection() throws SQLException { + void testUserConnection() throws SQLException { DataSource ds = sqlMap.getDataSource(); Connection conn = ds.getConnection(); ((SqlMapClientImpl) sqlMap).getDelegate().getTxManager().getConfig().setDataSource(null); @@ -78,7 +78,7 @@ void testUserConnection() throws SQLException { } @Test - void testSessionUserConnection() throws SQLException { + void testSessionUserConnection() throws SQLException { DataSource ds = sqlMap.getDataSource(); Connection conn = ds.getConnection(); ((SqlMapClientImpl) sqlMap).getDelegate().getTxManager().getConfig().setDataSource(null); @@ -91,7 +91,7 @@ void testSessionUserConnection() throws SQLException { } @Test - void testSessionUserConnectionFailures() throws SQLException { + void testSessionUserConnectionFailures() throws SQLException { DataSource ds = sqlMap.getDataSource(); Connection conn = ds.getConnection(); ((SqlMapClientImpl) sqlMap).getDelegate().getTxManager().getConfig().setDataSource(null); @@ -128,56 +128,56 @@ void testSessionUserConnectionFailures() throws SQLException { } @Test - void testExecuteQueryForObjectViaColumnIndex() throws SQLException { + void testExecuteQueryForObjectViaColumnIndex() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnIndex", Integer.valueOf(1)); assertAccount1(account); } @Test - void testExecuteQueryForObjectViaResultClass() throws SQLException { + void testExecuteQueryForObjectViaResultClass() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaResultClass", Integer.valueOf(1)); assertAccount1(account); } @Test - void testExecuteQueryForObjectViaResultClassIgnoreCaseTypeAliasCase() throws SQLException { + void testExecuteQueryForObjectViaResultClassIgnoreCaseTypeAliasCase() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaResultClassIgnoreCaseTypeAlias", Integer.valueOf(1)); assertAccount1(account); } @Test - void testExecuteQueryForObjectViaResultClassPlusOne() throws SQLException { + void testExecuteQueryForObjectViaResultClassPlusOne() throws SQLException { List list = sqlMap.queryForList("getAccountViaResultClassPlusOne", Integer.valueOf(1)); assertList(list); } @Test - void testExecuteQueryForObjectAsHashMap() throws SQLException { + void testExecuteQueryForObjectAsHashMap() throws SQLException { Map account = (HashMap) sqlMap.queryForObject("getAccountAsHashMap", Integer.valueOf(1)); assertAccount1(account); } @Test - void testExecuteQueryForObjectAsHashMapResultClass() throws SQLException { + void testExecuteQueryForObjectAsHashMapResultClass() throws SQLException { Map account = (HashMap) sqlMap.queryForObject("getAccountAsHashMapResultClass", Integer.valueOf(1)); assertAccount1(account); } @Test - void testExecuteQueryForObjectWithSimpleResultClass() throws SQLException { + void testExecuteQueryForObjectWithSimpleResultClass() throws SQLException { String email = (String) sqlMap.queryForObject("getEmailAddressViaResultClass", Integer.valueOf(1)); assertEquals("clinton.begin@ibatis.com", email); } @Test - void testExecuteQueryForObjectWithSimpleResultMap() throws SQLException { + void testExecuteQueryForObjectWithSimpleResultMap() throws SQLException { String email = (String) sqlMap.queryForObject("getEmailAddressViaResultMap", Integer.valueOf(1)); assertEquals("clinton.begin@ibatis.com", email); } @Test - void testExecuteQueryForObjectWithResultObject() throws SQLException { + void testExecuteQueryForObjectWithResultObject() throws SQLException { Account account = new Account(); Account testAccount = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1), account); assertAccount1(account); @@ -185,7 +185,7 @@ void testExecuteQueryForObjectWithResultObject() throws SQLException { } @Test - void testGetSubclass() throws SQLException { + void testGetSubclass() throws SQLException { SuperAccount account = new SuperAccount(); account.setId(1); account = (SuperAccount) sqlMap.queryForObject("getSuperAccount", account); @@ -195,7 +195,7 @@ void testGetSubclass() throws SQLException { // LIST QUERY TESTS @Test - void testExecuteQueryForListWithResultMap() throws SQLException { + void testExecuteQueryForListWithResultMap() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultMap", null); assertAccount1((Account) list.get(0)); @@ -209,7 +209,7 @@ void testExecuteQueryForListWithResultMap() throws SQLException { } @Test - void testExecuteQueryWithCustomTypeHandler() throws SQLException { + void testExecuteQueryWithCustomTypeHandler() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaCustomTypeHandler", null); assertAccount1((Account) list.get(0)); @@ -237,7 +237,7 @@ void testExecuteQueryWithCustomTypeHandler() throws SQLException { * for bug 976614 - bug squashed 07-14-04 By Brandon Goodin */ /* - * @Test void testBrokenExecuteQueryForListWithResultMap() throws SQLException { List list = + * @Test void testBrokenExecuteQueryForListWithResultMap() throws SQLException { List list = * sqlMap.queryForList("getBrokenAllAccountsViaResultMap", null); assertAccount1((Account) list.get(0)); * assertEquals(5, list.size()); assertEquals(1, ((Account) list.get(0)).getId()); assertEquals(2, ((Account) * list.get(1)).getId()); assertEquals(3, ((Account) list.get(2)).getId()); assertEquals(4, ((Account) @@ -245,7 +245,7 @@ void testExecuteQueryWithCustomTypeHandler() throws SQLException { */ @Test - void testExecuteQueryForPaginatedList() throws SQLException { + void testExecuteQueryForPaginatedList() throws SQLException { // Get List of all 5 PaginatedList list = sqlMap.queryForPaginatedList("getAllAccountsViaResultMap", null, 2); @@ -398,7 +398,7 @@ void testExecuteQueryForPaginatedList() throws SQLException { } @Test - void testExecuteQueryForPaginatedList2() throws SQLException { + void testExecuteQueryForPaginatedList2() throws SQLException { // tests methods that don't require a parameter object // Get List of all 5 @@ -552,7 +552,7 @@ void testExecuteQueryForPaginatedList2() throws SQLException { } @Test - void testExecuteQueryForListWithResultMapWithDynamicElement() throws SQLException { + void testExecuteQueryForListWithResultMapWithDynamicElement() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultMapWithDynamicElement", "LIKE"); @@ -569,7 +569,7 @@ void testExecuteQueryForListWithResultMapWithDynamicElement() throws SQLExcepti } @Test - void testExecuteQueryForListResultClass() throws SQLException { + void testExecuteQueryForListResultClass() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultClass", null); assertAccount1((Account) list.get(0)); @@ -582,7 +582,7 @@ void testExecuteQueryForListResultClass() throws SQLException { } @Test - void testExecuteQueryForListWithHashMapResultMap() throws SQLException { + void testExecuteQueryForListWithHashMapResultMap() throws SQLException { List list = sqlMap.queryForList("getAllAccountsAsHashMapViaResultMap", null); assertAccount1((Map) list.get(0)); @@ -595,7 +595,7 @@ void testExecuteQueryForListWithHashMapResultMap() throws SQLException { } @Test - void testExecuteQueryForListWithHashMapResultClass() throws SQLException { + void testExecuteQueryForListWithHashMapResultClass() throws SQLException { List list = sqlMap.queryForList("getAllAccountsAsHashMapViaResultClass", null); assertAccount1((Map) list.get(0)); @@ -608,7 +608,7 @@ void testExecuteQueryForListWithHashMapResultClass() throws SQLException { } @Test - void testExecuteQueryForListWithSimpleResultClass() throws SQLException { + void testExecuteQueryForListWithSimpleResultClass() throws SQLException { List list = sqlMap.queryForList("getAllEmailAddressesViaResultClass", null); assertEquals("clinton.begin@ibatis.com", list.get(0)); @@ -616,7 +616,7 @@ void testExecuteQueryForListWithSimpleResultClass() throws SQLException { } @Test - void testExecuteQueryForListWithSimpleResultMap() throws SQLException { + void testExecuteQueryForListWithSimpleResultMap() throws SQLException { List list = sqlMap.queryForList("getAllEmailAddressesViaResultMap", null); assertEquals("clinton.begin@ibatis.com", list.get(0)); @@ -624,7 +624,7 @@ void testExecuteQueryForListWithSimpleResultMap() throws SQLException { } @Test - void testExecuteQueryForListWithSkipAndMax() throws SQLException { + void testExecuteQueryForListWithSkipAndMax() throws SQLException { List list = sqlMap.queryForList("getAllAccountsViaResultMap", null, 2, 2); assertEquals(2, list.size()); @@ -633,7 +633,7 @@ void testExecuteQueryForListWithSkipAndMax() throws SQLException { } @Test - void testExecuteQueryForListWithRowHandler() throws SQLException { + void testExecuteQueryForListWithRowHandler() throws SQLException { TestRowHandler handler = new TestRowHandler(); sqlMap.queryWithRowHandler("getAllAccountsViaResultMap", null, handler); List list = handler.getList(); @@ -649,7 +649,7 @@ void testExecuteQueryForListWithRowHandler() throws SQLException { } @Test - void testExecuteQueryForListWithRowHandler2() throws SQLException { + void testExecuteQueryForListWithRowHandler2() throws SQLException { // tests method that does not require a parameter object TestRowHandler handler = new TestRowHandler(); sqlMap.queryWithRowHandler("getAllAccountsViaResultMap", handler); @@ -666,7 +666,7 @@ void testExecuteQueryForListWithRowHandler2() throws SQLException { } @Test - void testLegacyExecuteQueryForListWithRowHandler() throws SQLException { + void testLegacyExecuteQueryForListWithRowHandler() throws SQLException { TestRowHandler handler = new TestRowHandler(); sqlMap.queryWithRowHandler("getAllAccountsViaResultMap", null, handler); assertEquals(5, handler.getIndex()); @@ -681,7 +681,7 @@ void testLegacyExecuteQueryForListWithRowHandler() throws SQLException { // MAP TESTS @Test - void testExecuteQueryForMap() throws SQLException { + void testExecuteQueryForMap() throws SQLException { Map map = sqlMap.queryForMap("getAllAccountsViaResultClass", null, "lastName"); assertAccount1((Account) map.get("Begin")); @@ -694,7 +694,7 @@ void testExecuteQueryForMap() throws SQLException { } @Test - void testExecuteQueryForMapWithValueProperty() throws SQLException { + void testExecuteQueryForMapWithValueProperty() throws SQLException { Map map = sqlMap.queryForMap("getAllAccountsViaResultClass", null, "lastName", "firstName"); assertEquals(5, map.size()); @@ -708,7 +708,7 @@ void testExecuteQueryForMapWithValueProperty() throws SQLException { // UPDATE TESTS @Test - void testInsertGeneratedKey() throws SQLException { + void testInsertGeneratedKey() throws SQLException { LineItem item = new LineItem(); item.setId(10); @@ -731,7 +731,7 @@ void testInsertGeneratedKey() throws SQLException { } @Test - void testInsertGeneratedKeyFailure() throws SQLException { + void testInsertGeneratedKeyFailure() throws SQLException { LineItem item = new LineItem(); item.setId(0); @@ -754,7 +754,7 @@ void testInsertGeneratedKeyFailure() throws SQLException { } @Test - void testInsertPreKey() throws SQLException { + void testInsertPreKey() throws SQLException { LineItem item = new LineItem(); item.setId(10); @@ -778,7 +778,7 @@ void testInsertPreKey() throws SQLException { } @Test - void testInsertNoKey() throws SQLException { + void testInsertNoKey() throws SQLException { LineItem item = new LineItem(); item.setId(100); @@ -802,7 +802,7 @@ void testInsertNoKey() throws SQLException { } @Test - void testExecuteUpdateWithParameterMap() throws SQLException { + void testExecuteUpdateWithParameterMap() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1)); account.setId(6); @@ -820,7 +820,7 @@ void testExecuteUpdateWithParameterMap() throws SQLException { } @Test - void testExecuteUpdateWithInlineParameters() throws SQLException { + void testExecuteUpdateWithInlineParameters() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", Integer.valueOf(1)); account.setEmailAddress("new.clinton@ibatis.com"); @@ -838,7 +838,7 @@ void testExecuteUpdateWithInlineParameters() throws SQLException { } @Test - void testExecuteUpdateWithParameterClass() throws SQLException { + void testExecuteUpdateWithParameterClass() throws SQLException { Account account = new Account(); account.setId(5); @@ -861,7 +861,7 @@ void testExecuteUpdateWithParameterClass() throws SQLException { * For bug 959140 */ // @Test - // void testExecuteUpdateWithDuplicateParams() throws SQLException { + // void testExecuteUpdateWithDuplicateParams() throws SQLException { // // sqlMap.update("deleteAccountByDuplicateInteger", new Integer (5)); // @@ -873,7 +873,7 @@ void testExecuteUpdateWithParameterClass() throws SQLException { // DYNAMIC SQL @Test - void testQueryDynamicSqlElement() throws SQLException { + void testQueryDynamicSqlElement() throws SQLException { List list = sqlMap.queryForList("getDynamicOrderedEmailAddressesViaResultMap", "ACC_ID"); assertEquals("clinton.begin@ibatis.com", list.get(0)); @@ -892,13 +892,13 @@ class TestRowHandler implements RowHandler { private List list = new ArrayList(); @Override - void handleRow(Object object) { + public void handleRow(Object object) { index++; assertEquals(index, ((Account) object).getId()); list.add(object); } - void handleRow(Object valueObject, List list) { + void handleRow(Object valueObject, List list) { index++; assertEquals(index, ((Account) valueObject).getId()); list.add(valueObject); @@ -915,7 +915,7 @@ public List getList() { } @Test - void testNestedResultMaps() throws SQLException { + void testNestedResultMaps() throws SQLException { List list = sqlMap.queryForList("getAllOrdersWithNestedResultMaps"); assertEquals(10, list.size()); diff --git a/src/test/java/com/ibatis/sqlmap/TransactionTest.java b/src/test/java/com/ibatis/sqlmap/TransactionTest.java index 9703cdbb..c06f49c2 100644 --- a/src/test/java/com/ibatis/sqlmap/TransactionTest.java +++ b/src/test/java/com/ibatis/sqlmap/TransactionTest.java @@ -28,7 +28,7 @@ class TransactionTest extends BaseSqlMapTest { @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); } @@ -36,7 +36,7 @@ void setUp() throws Exception { // TRANSACTION TESTS @Test - void testStartCommitTransaction() throws SQLException { + void testStartCommitTransaction() throws SQLException { Account account = newAccount6(); try { @@ -54,7 +54,7 @@ void testStartCommitTransaction() throws SQLException { } @Test - void testTransactionAlreadyStarted() throws SQLException { + void testTransactionAlreadyStarted() throws SQLException { Account account = newAccount6(); boolean exceptionThrownAsExpected = false; @@ -80,7 +80,7 @@ void testTransactionAlreadyStarted() throws SQLException { } @Test - void testNoTransactionStarted() throws SQLException { + void testNoTransactionStarted() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaParameterMap", account); @@ -99,7 +99,7 @@ void testNoTransactionStarted() throws SQLException { } @Test - void testTransactionFailed() throws SQLException { + void testTransactionFailed() throws SQLException { Account account = newAccount6(); boolean exceptionThrownAsExpected = false; @@ -118,7 +118,7 @@ void testTransactionFailed() throws SQLException { } @Test - void testTransactionFailed2() throws SQLException { + void testTransactionFailed2() throws SQLException { // testes method that does not require a parameter object Account account = newAccount6(); @@ -138,7 +138,7 @@ void testTransactionFailed2() throws SQLException { } @Test - void testStartRollbackTransaction() throws SQLException { + void testStartRollbackTransaction() throws SQLException { Account account = newAccount6(); try { @@ -157,7 +157,7 @@ void testStartRollbackTransaction() throws SQLException { // AUTOCOMMIT TESTS @Test - void testAutoCommitUpdate() throws SQLException { + void testAutoCommitUpdate() throws SQLException { Account account = newAccount6(); sqlMap.update("insertAccountViaParameterMap", account); account = (Account) sqlMap.queryForObject("getAccountNullableEmail", Integer.valueOf(6)); @@ -165,7 +165,7 @@ void testAutoCommitUpdate() throws SQLException { } @Test - void testAutoCommitQuery() throws SQLException { + void testAutoCommitQuery() throws SQLException { Account account = (Account) sqlMap.queryForObject("getAccountNullableEmail", Integer.valueOf(1)); assertAccount1(account); } diff --git a/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java b/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java index 55e22d48..94ec58db 100644 --- a/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java @@ -31,7 +31,7 @@ class XmlStatementTest extends BaseSqlMapTest { // SETUP & TEARDOWN @BeforeEach - void setUp() throws Exception { + void setUp() throws Exception { initSqlMap("com/ibatis/sqlmap/maps/SqlMapConfig.xml", null); initScript("scripts/account-init.sql"); initScript("scripts/order-init.sql"); @@ -39,7 +39,7 @@ void setUp() throws Exception { } @Test - void testExecuteQueryForXml() throws SQLException { + void testExecuteQueryForXml() throws SQLException { String account = (String) sqlMap.queryForObject("getAccountXml", "1"); assertNotNull(account); MiniDom dom = new MiniParser(account).getDom(); @@ -50,7 +50,7 @@ void testExecuteQueryForXml() throws SQLException { } @Test - void testExecuteQueryForXmlExternalMaps() throws SQLException { + void testExecuteQueryForXmlExternalMaps() throws SQLException { String account = (String) sqlMap.queryForObject("getAccountXmlExternalMaps", "1"); assertNotNull(account); MiniDom dom = new MiniParser(account).getDom(); @@ -65,7 +65,7 @@ void testExecuteQueryForXmlExternalMaps() throws SQLException { } @Test - void testExecuteQueryForOrderXml() throws SQLException { + void testExecuteQueryForOrderXml() throws SQLException { String order = (String) sqlMap.queryForObject("getOrderXml", "1"); assertNotNull(order); MiniDom dom = new MiniParser(order).getDom(); @@ -74,7 +74,7 @@ void testExecuteQueryForOrderXml() throws SQLException { } @Test - void testExecuteQueryForXmlSpecialChars() throws SQLException { + void testExecuteQueryForXmlSpecialChars() throws SQLException { String account = (String) sqlMap.queryForObject("getAccountXml", "5"); assertNotNull(account); MiniDom dom = new MiniParser(account).getDom(); diff --git a/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java b/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java index 1e667a0c..c176da31 100644 --- a/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java +++ b/src/test/java/com/ibatis/sqlmap/builder/xml/SqlMapClasspathEntityResolverTest.java @@ -26,25 +26,25 @@ class SqlMapClasspathEntityResolverTest { // ibatis.com @Test - void testComConfigSystemId() { + void testComConfigSystemId() { String id = "http://www.ibatis.com/dtd/sql-map-config-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - void testComConfigPublicId() { + void testComConfigPublicId() { String id = "-//iBATIS.com//DTD SQL Map Config 2.0//EN"; assertPublicIdCanBeResolved(id); } @Test - void testComMapSystemId() { + void testComMapSystemId() { String id = "http://www.ibatis.com/dtd/sql-map-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - void testComMapPublicId() { + void testComMapPublicId() { String id = "-//iBATIS.com//DTD SQL Map 2.0//EN"; assertPublicIdCanBeResolved(id); } @@ -52,31 +52,31 @@ void testComMapPublicId() { // ibatis.apache.org @Test - void testOrgConfigSystemId() { + void testOrgConfigSystemId() { String id = "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - void testOrgConfigPublicId() { + void testOrgConfigPublicId() { String id = "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"; assertPublicIdCanBeResolved(id); } @Test - void testOrgMapSystemId() { + void testOrgMapSystemId() { String id = "http://ibatis.apache.org/dtd/sql-map-2.dtd"; assertSystemIdCanBeResolved(id); } @Test - void testOrgMapPublicId() { + void testOrgMapPublicId() { String id = "-//ibatis.apache.org//DTD SQL Map 2.0//EN"; assertPublicIdCanBeResolved(id); } @Test - void testOddCase() { + void testOddCase() { String id = "-//iBATIS.apache.org//DTD SQL Map 2.0//EN"; assertPublicIdCanBeResolved(id); } diff --git a/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java b/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java index a6caabfc..9811c121 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/cache/CacheKeyTest.java @@ -33,7 +33,7 @@ class CacheKeyTest { @Test - void testUpdate() { + void testUpdate() { CacheKey key3 = new CacheKey(); CacheKey key4 = new CacheKey(); diff --git a/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java b/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java index 2ee3a17a..f4238d8f 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/cache/lru/LruCacheControllerTest.java @@ -24,14 +24,14 @@ import org.junit.jupiter.api.Test; -class LruCacheControllerTest { +public class LruCacheControllerTest { protected CacheController getController() { return new LruCacheController(); } @Test - void testSizeOne() { + public void testSizeOne() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; @@ -49,7 +49,7 @@ void testSizeOne() { } @Test - void testGetAndPutObject() { + public void testGetAndPutObject() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; @@ -65,7 +65,7 @@ void testGetAndPutObject() { } @Test - void testRemoveObject() { + public void testRemoveObject() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; @@ -80,7 +80,7 @@ void testRemoveObject() { } @Test - void testFlush() { + public void testFlush() { CacheController cc = getController(); String testKey = "testKey"; String testVal = "testVal"; diff --git a/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java b/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java index b11145b0..d2ad3227 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/cache/memory/MemoryCacheControllerTest.java @@ -29,7 +29,7 @@ protected CacheController getController() { @Override @Test - void testSizeOne() { + public void testSizeOne() { // This is not relevant for this model } } diff --git a/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java b/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java index 7d32246d..56075d8b 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/mapping/parameter/InlineParameterMapParserTest.java @@ -26,7 +26,7 @@ class InlineParameterMapParserTest { @Test - void testParseInlineParameterMapTypeHandlerFactoryString() { + void testParseInlineParameterMapTypeHandlerFactoryString() { InlineParameterMapParser parser = new InlineParameterMapParser(); SqlText parseInlineParameterMap = parser.parseInlineParameterMap(new TypeHandlerFactory(), "insert into foo (myColumn) values (1)"); diff --git a/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java b/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java index 4d49e245..d1974ebb 100644 --- a/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java +++ b/src/test/java/com/ibatis/sqlmap/engine/mapping/result/loader/EnhancedLazyResultLoaderTest.java @@ -36,7 +36,7 @@ class EnhancedLazyResultLoaderTest { * Depending of the implementation of the Cglib-proxy the access will throw an IllegalAccessException. */ @Test - void testProxyMethodAccess() throws SQLException { + void testProxyMethodAccess() throws SQLException { SqlMapClientImpl client = setupMockSqlMapClientImpl(); EnhancedLazyResultLoader loader = new EnhancedLazyResultLoader(client, "bean2", null, Bean2.class); @@ -50,7 +50,7 @@ void testProxyMethodAccess() throws SQLException { * Test if a proxy for a null nevertheless dispatch to a default object. */ @Test - void testNullProxy() throws SQLException { + void testNullProxy() throws SQLException { SqlMapClientImpl client = setupMockSqlMapClientImpl(); EnhancedLazyResultLoader loader = new EnhancedLazyResultLoader(client, "bean3", null, TestBean3.class); diff --git a/src/test/java/threads/RemapResultsThreadTest.java b/src/test/java/threads/RemapResultsThreadTest.java index 5345304a..fb884ea3 100644 --- a/src/test/java/threads/RemapResultsThreadTest.java +++ b/src/test/java/threads/RemapResultsThreadTest.java @@ -29,12 +29,12 @@ class RemapResultsThreadTest { @Test - void testWithRemap() throws Exception { + void testWithRemap() throws Exception { runTest("WithRemap"); } @Test - void testWithoutRemap() throws Exception { + void testWithoutRemap() throws Exception { runTest("WithoutRemap"); } From 3aca5e49deba4f103db8e20e1c8b9b680bb56a6f Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 9 May 2021 15:43:54 -0400 Subject: [PATCH 4/4] [tests] Rename BaseSqlMapTest to BaseSqlMap and remove dummy test --- .../sqlmap/{BaseSqlMapTest.java => BaseSqlMap.java} | 9 +-------- src/test/java/com/ibatis/sqlmap/BatchTest.java | 2 +- src/test/java/com/ibatis/sqlmap/CacheStatementTest.java | 2 +- src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java | 2 +- .../java/com/ibatis/sqlmap/DirectFieldMappingTest.java | 2 +- src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java | 2 +- src/test/java/com/ibatis/sqlmap/DomStatementTest.java | 2 +- src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java | 2 +- src/test/java/com/ibatis/sqlmap/DynamicTest.java | 2 +- src/test/java/com/ibatis/sqlmap/IterateTest.java | 2 +- src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java | 2 +- src/test/java/com/ibatis/sqlmap/NestedIterateTest.java | 2 +- src/test/java/com/ibatis/sqlmap/ParameterMapTest.java | 2 +- .../java/com/ibatis/sqlmap/PrivateMethodAccessTest.java | 2 +- .../com/ibatis/sqlmap/RepeatingGroupMappingTest.java | 2 +- src/test/java/com/ibatis/sqlmap/ResultMapTest.java | 2 +- .../java/com/ibatis/sqlmap/ResultObjectFactoryTest.java | 2 +- src/test/java/com/ibatis/sqlmap/StatementTest.java | 2 +- src/test/java/com/ibatis/sqlmap/TransactionTest.java | 2 +- src/test/java/com/ibatis/sqlmap/XmlStatementTest.java | 2 +- src/test/java/com/ibatis/sqlmap/jira/JiraIbatis260.java | 4 ++-- 21 files changed, 22 insertions(+), 29 deletions(-) rename src/test/java/com/ibatis/sqlmap/{BaseSqlMapTest.java => BaseSqlMap.java} (97%) diff --git a/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java b/src/test/java/com/ibatis/sqlmap/BaseSqlMap.java similarity index 97% rename from src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java rename to src/test/java/com/ibatis/sqlmap/BaseSqlMap.java index b6b0e360..76af53d9 100644 --- a/src/test/java/com/ibatis/sqlmap/BaseSqlMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/BaseSqlMap.java @@ -29,14 +29,12 @@ import javax.sql.DataSource; -import org.junit.jupiter.api.Test; - import testdomain.Account; import testdomain.FieldAccount; import testdomain.Order; import testdomain.PrivateAccount; -public class BaseSqlMapTest { +public class BaseSqlMap { protected static SqlMapClient sqlMap; @@ -169,9 +167,4 @@ protected void assertOrder1(Map order) { assertEquals("C4B 4F4", order.get("postalCode")); } - @Test - void testDummy() { - // just to avoid warnings when running all tests. - } - } diff --git a/src/test/java/com/ibatis/sqlmap/BatchTest.java b/src/test/java/com/ibatis/sqlmap/BatchTest.java index 0d06e783..5fb8b051 100644 --- a/src/test/java/com/ibatis/sqlmap/BatchTest.java +++ b/src/test/java/com/ibatis/sqlmap/BatchTest.java @@ -35,7 +35,7 @@ * @author Jeff Butler * */ -class BatchTest extends BaseSqlMapTest { +class BatchTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java b/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java index 11da76d1..f5c8a9c5 100644 --- a/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/CacheStatementTest.java @@ -33,7 +33,7 @@ import testdomain.Account; -class CacheStatementTest extends BaseSqlMapTest { +class CacheStatementTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java b/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java index 73e156e5..cf07e59f 100644 --- a/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java +++ b/src/test/java/com/ibatis/sqlmap/ComplexTypeTest.java @@ -25,7 +25,7 @@ import testdomain.ComplexBean; -class ComplexTypeTest extends BaseSqlMapTest { +class ComplexTypeTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java b/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java index 46b91a28..4bb49681 100644 --- a/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java +++ b/src/test/java/com/ibatis/sqlmap/DirectFieldMappingTest.java @@ -23,7 +23,7 @@ import testdomain.FieldAccount; import testdomain.PrivateAccount; -class DirectFieldMappingTest extends BaseSqlMapTest { +class DirectFieldMappingTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java b/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java index e64d6e5e..a3b2f650 100644 --- a/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java +++ b/src/test/java/com/ibatis/sqlmap/DiscriminatorTest.java @@ -28,7 +28,7 @@ import testdomain.Magazine; import testdomain.PersonDocument; -class DiscriminatorTest extends BaseSqlMapTest { +class DiscriminatorTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/DomStatementTest.java b/src/test/java/com/ibatis/sqlmap/DomStatementTest.java index 946e945a..4eaac20e 100644 --- a/src/test/java/com/ibatis/sqlmap/DomStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/DomStatementTest.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Document; -class DomStatementTest extends BaseSqlMapTest { +class DomStatementTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java b/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java index 5615dfa7..60edb4c6 100644 --- a/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java +++ b/src/test/java/com/ibatis/sqlmap/DynamicPrependTest.java @@ -28,7 +28,7 @@ import testdomain.Account; import testdomain.MyBean; -class DynamicPrependTest extends BaseSqlMapTest { +class DynamicPrependTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/DynamicTest.java b/src/test/java/com/ibatis/sqlmap/DynamicTest.java index 0f331e8b..3af33e41 100644 --- a/src/test/java/com/ibatis/sqlmap/DynamicTest.java +++ b/src/test/java/com/ibatis/sqlmap/DynamicTest.java @@ -27,7 +27,7 @@ import testdomain.Account; -class DynamicTest extends BaseSqlMapTest { +class DynamicTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/IterateTest.java b/src/test/java/com/ibatis/sqlmap/IterateTest.java index 90671824..e58afc35 100644 --- a/src/test/java/com/ibatis/sqlmap/IterateTest.java +++ b/src/test/java/com/ibatis/sqlmap/IterateTest.java @@ -25,7 +25,7 @@ import testdomain.Account; -class IterateTest extends BaseSqlMapTest { +class IterateTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java b/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java index 8a1fa04b..a203ac5c 100644 --- a/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java +++ b/src/test/java/com/ibatis/sqlmap/MultiResultSetTest.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -class MultiResultSetTest extends BaseSqlMapTest { +class MultiResultSetTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java b/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java index 79541890..184235e6 100644 --- a/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java +++ b/src/test/java/com/ibatis/sqlmap/NestedIterateTest.java @@ -28,7 +28,7 @@ import testdomain.*; -class NestedIterateTest extends BaseSqlMapTest { +class NestedIterateTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java b/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java index 0365ad0b..413d8a12 100644 --- a/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/ParameterMapTest.java @@ -26,7 +26,7 @@ import testdomain.Account; -class ParameterMapTest extends BaseSqlMapTest { +class ParameterMapTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java b/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java index 2798d55e..a826ff34 100644 --- a/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java +++ b/src/test/java/com/ibatis/sqlmap/PrivateMethodAccessTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -class PrivateMethodAccessTest extends BaseSqlMapTest { +class PrivateMethodAccessTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java b/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java index 4a7be011..dc8f8afe 100644 --- a/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java +++ b/src/test/java/com/ibatis/sqlmap/RepeatingGroupMappingTest.java @@ -25,7 +25,7 @@ import testdomain.*; -class RepeatingGroupMappingTest extends BaseSqlMapTest { +class RepeatingGroupMappingTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/ResultMapTest.java b/src/test/java/com/ibatis/sqlmap/ResultMapTest.java index 11cfb97e..3a5aac81 100644 --- a/src/test/java/com/ibatis/sqlmap/ResultMapTest.java +++ b/src/test/java/com/ibatis/sqlmap/ResultMapTest.java @@ -31,7 +31,7 @@ import testdomain.Account; import testdomain.Order; -class ResultMapTest extends BaseSqlMapTest { +class ResultMapTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java index ba84d395..96fe9fdb 100644 --- a/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java +++ b/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryTest.java @@ -24,7 +24,7 @@ import testdomain.IItem; -class ResultObjectFactoryTest extends BaseSqlMapTest { +class ResultObjectFactoryTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/StatementTest.java b/src/test/java/com/ibatis/sqlmap/StatementTest.java index dc8ebbb1..94993d43 100644 --- a/src/test/java/com/ibatis/sqlmap/StatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/StatementTest.java @@ -45,7 +45,7 @@ import testdomain.Order; import testdomain.SuperAccount; -class StatementTest extends BaseSqlMapTest { +class StatementTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/TransactionTest.java b/src/test/java/com/ibatis/sqlmap/TransactionTest.java index c06f49c2..d4727c59 100644 --- a/src/test/java/com/ibatis/sqlmap/TransactionTest.java +++ b/src/test/java/com/ibatis/sqlmap/TransactionTest.java @@ -25,7 +25,7 @@ import testdomain.Account; -class TransactionTest extends BaseSqlMapTest { +class TransactionTest extends BaseSqlMap { @BeforeEach void setUp() throws Exception { diff --git a/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java b/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java index 94ec58db..941e0cf5 100644 --- a/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java +++ b/src/test/java/com/ibatis/sqlmap/XmlStatementTest.java @@ -26,7 +26,7 @@ import xmltester.*; import xmltester.MiniParser; -class XmlStatementTest extends BaseSqlMapTest { +class XmlStatementTest extends BaseSqlMap { // SETUP & TEARDOWN diff --git a/src/test/java/com/ibatis/sqlmap/jira/JiraIbatis260.java b/src/test/java/com/ibatis/sqlmap/jira/JiraIbatis260.java index e7e0898a..5c82a228 100644 --- a/src/test/java/com/ibatis/sqlmap/jira/JiraIbatis260.java +++ b/src/test/java/com/ibatis/sqlmap/jira/JiraIbatis260.java @@ -15,7 +15,7 @@ */ package com.ibatis.sqlmap.jira; -import com.ibatis.sqlmap.BaseSqlMapTest; +import com.ibatis.sqlmap.BaseSqlMap; import java.util.HashMap; import java.util.Iterator; @@ -45,7 +45,7 @@ * @author Sven Boden * */ -public class JiraIbatis260 extends BaseSqlMapTest { +public class JiraIbatis260 extends BaseSqlMap { @BeforeEach public void setUp() throws Exception {