From b2d8f87973588b0e3fc52510863d10614c8dca54 Mon Sep 17 00:00:00 2001 From: AJ Date: Sun, 16 Apr 2023 16:28:57 +0700 Subject: [PATCH] update test case --- test/di_test.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/di_test.dart b/test/di_test.dart index 2f9fc92..6890c42 100644 --- a/test/di_test.dart +++ b/test/di_test.dart @@ -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()); }); }); }