Esempio n. 1
0
        public void TestFile()
        {
            var path = PathUtilities.GetDirectoryForCaller();
            var file = path + "a.txt";

            SetApprovals.VerifyFileAsSet(file);
        }
Esempio n. 2
0
        public void TestFileWithScrubber()
        {
            var path = PathUtilities.GetDirectoryForCaller();
            var file = path + "a.txt";
            Func <string, string> scrubber = s => Regex.Replace(s, @"^[^\|]*", "");

            SetApprovals.VerifyFileAsSet(file, scrubber);
        }
Esempio n. 3
0
        public void TestListString()
        {
            // Approved file has order apple, banana, carrot
            var list = new List <string> {
                "carrot", "apple", "banana"
            };

            SetApprovals.VerifySet(list, String.Empty);
        }
Esempio n. 4
0
        public void TestListObject()
        {
            var list = new List <Foo>
            {
                new Foo {
                    Bar = "carrot"
                },
                new Foo {
                    Bar = "apple"
                },
                new Foo {
                    Bar = "banana"
                },
            };

            SetApprovals.VerifySet(list, String.Empty, f => f.Bar);
        }