static void Main(string[] args) { var _awesome = new Candidates(); _awesome.Check("foo", "bar").PipeWith(Console.WriteLine); _awesome.Check("foo", "baa").PipeWith(Console.WriteLine); Console.ReadKey(); }
public void Should_Return_True_For_This_Candidates() { var listOfCandidates = new List <ItemHolders>() { new ItemHolders("foo", "baa"), new ItemHolders(string.Empty, null), new ItemHolders(null, null) }; var sut = new Candidates(); listOfCandidates.ForEach(c => Assert.True(sut.Check(c.Item1, c.Item2))); }
public void Should_Return_False_For_This_Candidates() { var listOfCandidates = new List <ItemHolders>() { new ItemHolders("foo", "for"), new ItemHolders("foo", "foor"), new ItemHolders("", "foo"), new ItemHolders("foo", null), new ItemHolders(null, "foo") }; var sut = new Candidates(); listOfCandidates.ForEach(c => Assert.False(sut.Check(c.Item1, c.Item2))); }