File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,9 @@ void main() {
16
16
expect (bar, isNot (Flyweight ('Baz' )));
17
17
});
18
18
});
19
+
20
+ test ('Flyweight.operation returns flyweight name' , () {
21
+ final foo = Flyweight ('Foo' );
22
+ expect (foo.operation (), "Flyweight('Foo')" );
23
+ });
19
24
}
Original file line number Diff line number Diff line change @@ -36,4 +36,10 @@ void main() {
36
36
expect (iterator.next (), null );
37
37
});
38
38
});
39
+
40
+ test ('Aggregator creates iterator' , () {
41
+ final iterator = Aggregator (['foo' ]).createIterator ();
42
+ expect (iterator.hasNext (), isTrue);
43
+ expect (iterator.next (), 'foo' );
44
+ });
39
45
}
Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ void main() {
31
31
colleague.handleRequest ();
32
32
verify (mediatorMock.mediate (colleague));
33
33
});
34
+
35
+ test ('sets its state to "notified" when receiving notify' , () {
36
+ final colleague = Colleague (mediatorMock);
37
+ colleague.notify ();
38
+ expect (colleague.toString (), 'State.notified' );
39
+ });
34
40
});
35
41
36
42
group ('Mediator' , () {
You can’t perform that action at this time.
0 commit comments