stevel 02/01/13 16:00:30
Modified: src/testcases/org/apache/tools/ant BuildFileTest.java
Log:
added expect() clauses for properties being set, unset.
Revision Changes Path
1.5 +38 -0
jakarta-ant/src/testcases/org/apache/tools/ant/BuildFileTest.java
Index: BuildFileTest.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/BuildFileTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- BuildFileTest.java 15 Nov 2001 13:33:26 -0000 1.4
+++ BuildFileTest.java 14 Jan 2002 00:00:30 -0000 1.5
@@ -219,6 +219,44 @@
}
fail("Should throw BuildException because: " + cause);
}
+
+
+ /**
+ * call a target, verify property is as expected
+ *
+ * @param target build file target
+ * @param property property name
+ * @param value expected value
+ */
+
+ protected void expectPropertySet(String target, String property, String
value) {
+ executeTarget(target);
+ String result = project.getProperty(property);
+ assertEquals("property " + property,value,result);
+ }
+
+
+ /**
+ * call a target, verify property is "true"
+ *
+ * @param target build file target
+ * @param property property name
+ */
+ protected void expectPropertySet(String target, String property) {
+ expectPropertySet(target, property, "true");
+ }
+
+
+ /**
+ * call a target, verify property is null
+ * @param target build file target
+ * @param property property name
+ */
+ protected void expectPropertyUnset(String target, String property) {
+ expectPropertySet(target, property, null);
+ }
+
+
private class AntOutputStream extends java.io.OutputStream {
public void write(int b) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>