Sha256: 6b1c7c35da7b8651109e282feb485a3fb3b80fa7d30e75e5b3bb2cf9c9712cf2

Contents?: true

Size: 1.31 KB

Versions: 28

Compression:

Stored size: 1.31 KB

Contents

import asunit.framework.Assert;
import asunit.framework.TestCase;
import asunit.errors.AssertionFailedError;
import asunit.framework.AssertMock;
import asunit.errors.IllegalOperationError;

class asunit.framework.AssertTest extends TestCase {
	private var className:String = "asunit.framework.AssertTest";
	private var instance:AssertMock;

	public function AssertTest(testMethod:String) {
		super(testMethod);
	}

	public function setUp():Void {
		instance = new AssertMock();
	}

	public function tearDown():Void {
		delete instance;
	}

	public function testAssertTrueFailureA():Void {
		try {
			instance.assertTrue(false);
			fail("assertTrue(false) should throw");
		}
		catch(e) {
			if(!(e instanceof AssertionFailedError)) {
				fail("assertTrue should have thrown an AssertionFailedError");
			}
		}
	}

//			instance.assertTrue("faux message", false);

	public function testAssertTrueTooManyArgs():Void {
		try {
			instance.assertTrue("faux message", false, false);
			fail("assertTrue should have failed with too many args");
		}
		catch(e) {
			if(!(e instanceof IllegalOperationError)) {
				fail(e.toString());
			}
		}
	}

	public function testAssertTrueSuccess():Void {
		try {
			instance.assertTrue(true);
			instance.assertTrue("faux message", true);
		}
		catch(e) {
			fail("assertTrue should not have thrown");
		}
	}
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
asproject-0.1.21 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.27 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.28 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.29 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.30 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.31 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.34 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.33 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.37 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.32 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.36 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.35 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.43 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.44 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.40 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.41 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.38 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.42 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.68 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as
asproject-0.1.60 templates/asproject/asunit25/project/lib/asunit/asunit/framework/AssertTest.as