public static void ShouldHaveUpdatedContentTo(this IHomepageContentProvider provider, string newContent) { provider.AssertWasCalled(p => p.SetHomepageContent(newContent)); }
public static void ShouldHaveBeenAskedToGetAllReviewedBooks(this IBookRetriever retriever) { retriever.AssertWasCalled(b => b.GetReviewedBooks()); }
public static void TestWasVisited(this IHierarchyVisitor visitor, Hierarchy hierarchy, string path) { Test test = hierarchy.FindTest(path); test.ShouldNotBeNull(); visitor.AssertWasCalled(x => x.Test(test)); }
// TODO - Are we going to put these in an Assertion extensions class instead? public static void ShouldHaveBeenAskedToGetBooksFor(this IBookRetriever retriever, string genre) { retriever.AssertWasCalled(b => b.GetReviewedBooks(genre)); }
public static void SuiteWasVisited(this IHierarchyVisitor visitor, Hierarchy hierarchy, string path) { Suite suite = hierarchy.FindSuite(path); suite.ShouldNotBeNull(); visitor.AssertWasCalled(x => x.StartSuite(suite)); visitor.AssertWasCalled(x => x.EndSuite(suite)); }