public void TestFile() { var path = PathUtilities.GetDirectoryForCaller(); var file = path + "a.txt"; SetApprovals.VerifyFileAsSet(file); }
public void TestFileWithScrubber() { var path = PathUtilities.GetDirectoryForCaller(); var file = path + "a.txt"; Func <string, string> scrubber = s => Regex.Replace(s, @"^[^\|]*", ""); SetApprovals.VerifyFileAsSet(file, scrubber); }
public void TestListString() { // Approved file has order apple, banana, carrot var list = new List <string> { "carrot", "apple", "banana" }; SetApprovals.VerifySet(list, String.Empty); }
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); }