X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-src%2Fclass%2Forg%2Fargeo%2Fria%2Ftest%2FDemoTest.js;fp=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-src%2Fclass%2Forg%2Fargeo%2Fria%2Ftest%2FDemoTest.js;h=5e9a86ed51e9d06268b4aa83282f225a44b7f90f;hb=a10c083ba5bde2d7ebb466153c99858247ddb0aa;hp=0000000000000000000000000000000000000000;hpb=eea4bceab5bed0001c049b46cd6842ebdf41c95f;p=gpl%2Fargeo-slc.git 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 index 000000000..5e9a86ed5 --- /dev/null +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/test/DemoTest.js @@ -0,0 +1,55 @@ +/* ************************************************************************ + + Copyright: + + License: + + Authors: + +************************************************************************ */ + +/** + * This class demonstrates how to define unit tests for your application. + * + * Execute generate.py test to generate a testrunner application + * and open it from test/index.html + * + * The methods that contain the tests are instance methods with a + * test prefix. You can create an arbitrary number of test + * classes like this one. They can be organized in a regular class hierarchy, + * i.e. using deeper namespaces and a corresponding file structure within the + * test folder. + */ +qx.Class.define("org.argeo.ria.test.DemoTest", +{ + extend : qx.dev.unit.TestCase, + + members : + { + /* + --------------------------------------------------------------------------- + TESTS + --------------------------------------------------------------------------- + */ + + /** + * Here are some simple tests + */ + testSimple : function() + { + this.assertEquals(4, 3+1, "This should never fail!"); + this.assertFalse(false, "Can false be true?!"); + }, + + /** + * Here are some more advanced tests + */ + testAdvanced: function () + { + var a = 3; + var b = a; + this.assertIdentical(a, b, "A rose by any other name is still a rose"); + this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!"); + } + } +});