]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/test/DemoTest.js
Refactoring part I (src move)
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / source / class / org / argeo / ria / test / DemoTest.js
1 /* ************************************************************************
2
3 Copyright:
4
5 License:
6
7 Authors:
8
9 ************************************************************************ */
10
11 /**
12 * This class demonstrates how to define unit tests for your application.
13 *
14 * Execute <code>generate.py test</code> to generate a testrunner application
15 * and open it from <tt>test/index.html</tt>
16 *
17 * The methods that contain the tests are instance methods with a
18 * <code>test</code> prefix. You can create an arbitrary number of test
19 * classes like this one. They can be organized in a regular class hierarchy,
20 * i.e. using deeper namespaces and a corresponding file structure within the
21 * <tt>test</tt> folder.
22 */
23 qx.Class.define("org.argeo.ria.test.DemoTest",
24 {
25 extend : qx.dev.unit.TestCase,
26
27 members :
28 {
29 /*
30 ---------------------------------------------------------------------------
31 TESTS
32 ---------------------------------------------------------------------------
33 */
34
35 /**
36 * Here are some simple tests
37 */
38 testSimple : function()
39 {
40 this.assertEquals(4, 3+1, "This should never fail!");
41 this.assertFalse(false, "Can false be true?!");
42 },
43
44 /**
45 * Here are some more advanced tests
46 */
47 testAdvanced: function ()
48 {
49 var a = 3;
50 var b = a;
51 this.assertIdentical(a, b, "A rose by any other name is still a rose");
52 this.assertInRange(3, 1, 10, "You must be kidding, 3 can never be outside [1,10]!");
53 }
54 }
55 });