]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/test/DemoTest.js
move "source" to "argeo-ria-src"
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / argeo-ria-src / class / org / argeo / ria / test / DemoTest.js
diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/test/DemoTest.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/test/DemoTest.js
new file mode 100644 (file)
index 0000000..5e9a86e
--- /dev/null
@@ -0,0 +1,55 @@
+/* ************************************************************************\r
+\r
+   Copyright:\r
+\r
+   License:\r
+\r
+   Authors:\r
+\r
+************************************************************************ */\r
+\r
+/**\r
+ * This class demonstrates how to define unit tests for your application.\r
+ *\r
+ * Execute <code>generate.py test</code> to generate a testrunner application \r
+ * and open it from <tt>test/index.html</tt>\r
+ *\r
+ * The methods that contain the tests are instance methods with a \r
+ * <code>test</code> prefix. You can create an arbitrary number of test \r
+ * classes like this one. They can be organized in a regular class hierarchy, \r
+ * i.e. using deeper namespaces and a corresponding file structure within the \r
+ * <tt>test</tt> folder.\r
+ */\r
+qx.Class.define("org.argeo.ria.test.DemoTest",\r
+{\r
+  extend : qx.dev.unit.TestCase,\r
+\r
+  members :\r
+  {\r
+    /*\r
+    ---------------------------------------------------------------------------\r
+      TESTS\r
+    ---------------------------------------------------------------------------\r
+    */\r
+  \r
+    /**\r
+     * Here are some simple tests\r
+     */\r
+    testSimple : function()\r
+    {\r
+      this.assertEquals(4, 3+1, "This should never fail!");\r
+      this.assertFalse(false, "Can false be true?!");\r
+    },\r
+\r
+    /**\r
+     * Here are some more advanced tests\r
+     */\r
+    testAdvanced: function () \r
+    {\r
+      var a = 3;\r
+      var b = a;\r
+      this.assertIdentical(a, b, "A rose by any other name is still a rose");\r
+      this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!");\r
+    }\r
+  }\r
+});\r