|
From: <bd...@us...> - 2002-07-15 01:00:39
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/ant
In directory usw-pr-cvs1:/tmp/cvs-serv22997/src/test/org/dbunit/ant
Modified Files:
DbUnitTaskTest.java
Log Message:
Added export functionality. Also replaced boolean 'flat' with 'format' attributes in Export, Operation, and Composite
Index: DbUnitTaskTest.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/ant/DbUnitTaskTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DbUnitTaskTest.java 13 Jun 2002 21:17:06 -0000 1.3
--- DbUnitTaskTest.java 15 Jul 2002 01:00:30 -0000 1.4
***************
*** 121,128 ****
public void testSetFlatFalse()
{
! String targetName = "set-flat-false";
Operation operation = (Operation)getFirstStepFromTarget(targetName);
! assertTrue("Operation attribute flat should have been false, but was: "
! + operation.getFlat(), !operation.getFlat());
}
--- 121,128 ----
public void testSetFlatFalse()
{
! String targetName = "set-format-xml";
Operation operation = (Operation)getFirstStepFromTarget(targetName);
! assertTrue("Operation attribute format should have been 'xml', but was: "
! + operation.getFormat(), operation.getFormat().equalsIgnoreCase("xml"));
}
***************
*** 190,195 ****
public void testInvalidCompositeOperationFlat()
{
! expectBuildException("invalid-composite-operation-flat",
! "Should have objected to nested operation flat attribute "
+ "being set.");
}
--- 190,195 ----
public void testInvalidCompositeOperationFlat()
{
! expectBuildException("invalid-composite-operation-format-flat",
! "Should have objected to nested operation format attribute "
+ "being set.");
}
***************
*** 199,202 ****
--- 199,205 ----
String targetName = "test-export-full";
Export export = (Export)getFirstStepFromTarget(targetName);
+ assertTrue("Should have been a flat format, "
+ + "but was: " + export.getFormat(),
+ export.getFormat().equalsIgnoreCase("flat"));
List tables = export.getTables();
assertTrue("Should have been an empty table list "
***************
*** 220,223 ****
--- 223,259 ----
}
+ public void testExportFlat()
+ {
+ String targetName = "test-export-format-flat";
+ Export export = (Export)getFirstStepFromTarget(targetName);
+ assertTrue("Should have been a flat format, "
+ + "but was: " + export.getFormat(),
+ export.getFormat().equalsIgnoreCase("flat"));
+ }
+
+ public void testExportXml()
+ {
+ String targetName = "test-export-format-xml";
+ Export export = (Export)getFirstStepFromTarget(targetName);
+ assertTrue("Should have been an xml format, "
+ + "but was: " + export.getFormat(),
+ export.getFormat().equalsIgnoreCase("xml"));
+ }
+
+ public void testExportDtd()
+ {
+ String targetName = "test-export-format-dtd";
+ Export export = (Export)getFirstStepFromTarget(targetName);
+ assertTrue("Should have been a dtd format, "
+ + "but was: " + export.getFormat(),
+ export.getFormat().equalsIgnoreCase("dtd"));
+ }
+
+ public void testInvalidExportFormat()
+ {
+ expectBuildException("invalid-export-format",
+ "Should have objected to invalid format attribute.");
+ }
+
protected void assertOperationType(String failMessage, String targetName, DatabaseOperation expected)
{
***************
*** 264,271 ****
}
}
-
-
}
-
-
-
--- 300,302 ----
|