public void BadBranchId_ReturnsNull() { // arrange IRecentlyViewedListLogic testunit = MakeTestsObject(); UserSelectedContext testcontext = new UserSelectedContext { BranchId = "XXX", CustomerId = "123456" }; UserProfile fakeUser = new UserProfile { UserId = new Guid("dddddddddddddddddddddddddddddddd") }; bool headerOnly = false; // act ListModel results = testunit.ReadList(fakeUser, testcontext, headerOnly); // assert results.Should() .BeNull(); }
public void GoodCustomerIdAndBranch_ReturnsExpectedList() { // arrange IRecentlyViewedListLogic testunit = MakeTestsObject(); UserSelectedContext testcontext = new UserSelectedContext { BranchId = "FUT", CustomerId = "123456" }; int expectedListId = 1; UserProfile fakeUser = new UserProfile { UserId = new Guid("dddddddddddddddddddddddddddddddd") }; bool headerOnly = false; // act ListModel results = testunit.ReadList(fakeUser, testcontext, headerOnly); // assert results.ListId .Should() .Be(expectedListId); }