Skip to content

Commit 9c641a8

Browse files
committed
add target unit tests for DeluxeSignal class
1 parent 8675638 commit 9c641a8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import "../../../entry";
2+
3+
import { assert } from "chai";
4+
5+
import { DeluxeSignal } from "../../../../src/org/osflash/signals/DeluxeSignal";
6+
7+
describe("DeluxeSignaltargetTest", () => {
8+
9+
let signal: DeluxeSignal;
10+
let self = this;
11+
12+
beforeEach(() => {
13+
signal = new DeluxeSignal(self, Number, String, Boolean);
14+
});
15+
16+
afterEach(() => {
17+
signal.removeAll();
18+
signal = null;
19+
});
20+
21+
it("set_target_should_change_target()", () => {
22+
let target: object = {};
23+
signal.target = target;
24+
assert.equal(signal.target, target);
25+
});
26+
27+
it("set_same_target_should_not_change_target()", () => {
28+
signal.target = self;
29+
assert.equal(signal.target, self);
30+
});
31+
});

0 commit comments

Comments
 (0)