AssertEqualsTask
instance.
- */
- public AssertEqualsTask() {
- super();
- this.body = "";
- this.message = "";
- this.arg1 = null;
- this.arg2 = null;
- }
-
- /**
- * Method setBody.
- *
- * @param body String
- */
- public void setBody(String body) {
- this.body = body;
- }
-
- /**
- * Method setMessage.
- *
- * @param message String
- */
- public void setMessage(String message) {
- this.message = message;
- }
-
- /**
- * Method setArg1.
- *
- * @param arg1 String
- */
- public void setArg1(String arg1) {
- this.arg1 = arg1;
- }
-
- /**
- * Method setArg2.
- *
- * @param arg2 String
- */
- public void setArg2(String arg2) {
- this.arg2 = arg2;
- }
-
- /**
- * Method execute.
- *
- * @throws BuildException if something goes wrong
- */
- @Override
- public void execute() {
- // @param arg1 - first argument for comparison
- // @param arg2 - second argument for comparison
- // @param body - detail of the error message
- // @param message - short text description of the error
- if (arg1 == null) {
- throw new BuildException("You must supply a first argument for comparison");
- }
- if (arg2 == null) {
- throw new BuildException("You must supply a second argument for comparison");
- }
-
- boolean os = "true".equals(getProject().getProperty("test.os.matches"));
-
- if (os && !arg1.equals(arg2)) {
- String escapeCode = Character.toString((char) 27);
- boolean colorize = "true".equals(getProject().getProperty("cli.color"));
-
- if (colorize) {
- message = escapeCode + "[31m" + message + escapeCode + "[0m";
- }
- getProject().log("", 1);
- getProject().log(message, 1);
-
- Exit task = (Exit) getProject().createTask("fail");
- task.setMessage(body);
-
- task.perform();
- }
- }
-}
diff --git a/src/fox/jason/unittest/tasks/CalculateValueTask.java b/src/fox/jason/unittest/tasks/CalculateValueTask.java
deleted file mode 100644
index f2a7382..0000000
--- a/src/fox/jason/unittest/tasks/CalculateValueTask.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * This file is part of the DITA-OT Unit Test Plug-in project.
- * See the accompanying LICENSE file for applicable licenses.
- */
-
-package fox.jason.unittest.tasks;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-// Custom Task to apply some mathematical operations
-// This removes a dependency on the Ant Contrib