| var AssertTestCase = TestCase.create("AssertTestCase"); |
| AssertTestCase.prototype.testAssertTrue = function() { |
| assertTrue(true); |
| assertTrue("test", true); |
| assertTrue(false, true); |
| }; |
| AssertTestCase.prototype.testAssertFalse = function() { |
| assertFalse(false); |
| assertFalse("test", false); |
| assertFalse(true, false); |
| }; |
| // more to come |
| |
| function MyTestCase1(name) { |
| this.setName(name); |
| } |
| MyTestCase1.prototype = new TestCase(); |
| MyTestCase1.prototype.setTestCaseName("MyTestCase1"); |
| MyTestCase1.prototype.testA = function() { |
| assertTrue(true); |
| }; |
| MyTestCase1.prototype.testB = function() { |
| assertTrue(true); |
| }; |
| |
| var MyTestCase2 = TestCase.create("MyTestCase2"); |
| MyTestCase2.prototype.testA = function() { |
| assertTrue(true); |
| assertNotUndefined(this.testSetup); |
| }; |
| MyTestCase2.prototype.testB = function() { |
| assertTrue(true); |
| }; |
| MyTestCase2.prototype.setUp = function() { |
| this.testSetup = true; |
| }; |
| |
| var MyTestCase3 = TestCase.create("MyTestCase3", { |
| testA: function() { |
| assertTrue(true); |
| assertNotUndefined(this.testSetup); |
| }, |
| testB: function() { |
| assertTrue(true); |
| }, |
| setUp: function() { |
| this.testSetup = true; |
| } |
| }); |
| |
| |