Skip to content

Commit

Permalink
update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
necessarylion committed Apr 16, 2023
1 parent 91e5d62 commit b2d8f87
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/di_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ void main() {
expect(animal.duck.walk.start(), 'walking');
expect(animal.duck.fly?.start(), 'flying');
expect(animal.duck.swim.start(), 'swimming');

Animal animal2 = Animal(
Dog(Walk()),
Fish(Swim()),
Bird(Fly()),
Duck(Swim(), walk: Walk(), fly: Fly()),
);

expect(animal.toString(), animal2.toString());
});
});
}
Expand Down

0 comments on commit b2d8f87

Please sign in to comment.