Skip to content

Commit

Permalink
Removed CallbackBridge because it was no different than a Result. Ren…
Browse files Browse the repository at this point in the history
…amed CallbackBridge to ResultObserverTest. May merge with the older-style ResultTest later.
  • Loading branch information
Robert Penner committed Nov 7, 2010
1 parent 4d3708c commit cc9371b
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 87 deletions.
10 changes: 0 additions & 10 deletions asunit-4.0/src/asunit/framework/CallbackBridge.as

This file was deleted.

1 change: 0 additions & 1 deletion asunit-4.0/src/asunit/runners/SuiteRunner.as
@@ -1,6 +1,5 @@
package asunit.runners {

import asunit.framework.CallbackBridge;
import asunit.framework.IResult;
import asunit.framework.IRunner;
import asunit.framework.IRunnerFactory;
Expand Down
2 changes: 0 additions & 2 deletions asunit-4.0/test/AllTests.as
Expand Up @@ -13,7 +13,6 @@ package {
import asunit.framework.AssertThrowsTest;
import asunit.framework.AsyncMethodTest;
import asunit.framework.AsyncTest;
import asunit.framework.CallbackBridgeTest;
import asunit.framework.NestedSuiteIteratorTest;
import asunit.framework.ProceedOnEventTest;
import asunit.framework.ResultTest;
Expand Down Expand Up @@ -45,7 +44,6 @@ package {
public var asunit_framework_AssertThrowsTest:asunit.framework.AssertThrowsTest;
public var asunit_framework_AsyncMethodTest:asunit.framework.AsyncMethodTest;
public var asunit_framework_AsyncTest:asunit.framework.AsyncTest;
public var asunit_framework_CallbackBridgeTest:asunit.framework.CallbackBridgeTest;
public var asunit_framework_NestedSuiteIteratorTest:asunit.framework.NestedSuiteIteratorTest;
public var asunit_framework_ProceedOnEventTest:asunit.framework.ProceedOnEventTest;
public var asunit_framework_ResultTest:asunit.framework.ResultTest;
Expand Down
73 changes: 0 additions & 73 deletions asunit-4.0/test/asunit/framework/CallbackBridgeTest.as

This file was deleted.

61 changes: 61 additions & 0 deletions asunit-4.0/test/asunit/framework/ResultObserverTest.as
@@ -0,0 +1,61 @@
package asunit.framework {

import asunit.asserts.*;
import asunit.support.FakeObserver;
import asunit.framework.Result;

public class ResultObserverTest {

private var result:Result;

private var observer:FakeObserver;

[Before]
public function createObserver():void {
observer = new FakeObserver();
result = new Result();
result.addListener(observer);
}

[After]
public function destroyObserver():void {
observer = null;
}

[Test]
public function canInstantiate():void {
assertTrue("instance is Result", result is Result);
}

[Test]
public function addedListenerReceivesOnRunStarted():void {
result.onRunStarted();
assertTrue(observer.onRunStartedCalled);
}

[Test]
public function addedListenerReceivesOnTestStarted():void {
result.onTestStarted(null);
assertTrue(observer.onTestStartedCalled);
}

[Test]
public function shouldHaveDefaultRunCount():void
{
assertEquals(0, result.runCount);
}

[Test]
public function shouldHaveCumulativeRunCount():void
{
result.onTestStarted(null);
result.onTestSuccess(null);
result.onTestCompleted(null);
result.onTestStarted(null);
result.onTestSuccess(null);
result.onTestCompleted(null);
assertEquals(2, result.runCount);
}

}
}
1 change: 0 additions & 1 deletion asunit-4.0/test/asunit/support/CustomSuiteRunner.as
@@ -1,6 +1,5 @@
package asunit.support {

import asunit.framework.CallbackBridge;
import asunit.framework.IResult;
import asunit.framework.IRunnerFactory;
import asunit.runners.SuiteRunner;
Expand Down

0 comments on commit cc9371b

Please sign in to comment.