Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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)));
        }
Ejemplo n.º 3
0
        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)));
        }