Skip to content

Commit 386a809

Browse files
committed
.
1 parent 6c0c281 commit 386a809

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

test/flyweight_test.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ void main() {
1616
expect(bar, isNot(Flyweight('Baz')));
1717
});
1818
});
19+
20+
test('Flyweight.operation returns flyweight name', () {
21+
final foo = Flyweight('Foo');
22+
expect(foo.operation(), "Flyweight('Foo')");
23+
});
1924
}

test/iterator_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,10 @@ void main() {
3636
expect(iterator.next(), null);
3737
});
3838
});
39+
40+
test('Aggregator creates iterator', () {
41+
final iterator = Aggregator(['foo']).createIterator();
42+
expect(iterator.hasNext(), isTrue);
43+
expect(iterator.next(), 'foo');
44+
});
3945
}

test/mediator_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ void main() {
3131
colleague.handleRequest();
3232
verify(mediatorMock.mediate(colleague));
3333
});
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+
});
3440
});
3541

3642
group('Mediator', () {

0 commit comments

Comments
 (0)