public void ContactManager_works() { List <Contact2> contacts = new List <Contact2> { new Contact2 { Name = "Homer", Iq = 50 }, new Contact2 { Name = "Lisa", Iq = 120 }, new Contact2 { Name = "Bart", Iq = 90 }, }; var contactManager = new ContactManager(); contactManager.Add(contacts); var filterStrategy = new FilterStrategy(); contactManager.Filter(filterStrategy); var formattedStrings = contactManager.Format(new SimpleFormatStrategy()); IPrintStrategy printStrategy = new PrintStrategy(); var result = contactManager.Print(formattedStrings, printStrategy); result.Should().Be("Lisa,Bart"); }
public void Print() { PrintStrategy.Print(Text); Console.WriteLine(); }