public void BadCustomerId_ReturnsNull() { // arrange IFavoritesListLogic testunit = MakeTestsUnit(); UserSelectedContext testcontext = new UserSelectedContext { BranchId = "FUT", CustomerId = "223456" }; UserProfile fakeUser = new UserProfile(); int fakeId = 0; // act ListModel results = testunit.GetListModel(fakeUser, testcontext, fakeId); // assert results.Should() .BeNull(); }
public void GoodCustomerIdAndBranchHeaderOnly_ReturnsListWithExpectedId() { // arrange IFavoritesListLogic testunit = MakeTestsUnit(); UserSelectedContext testcontext = new UserSelectedContext { BranchId = "FUT", CustomerId = "123456" }; UserProfile fakeUser = new UserProfile(); int expectedId = 1; int fakeId = 0; // act ListModel results = testunit.GetListModel(fakeUser, testcontext, fakeId); // assert results.ListId .Should() .Be(expectedId); }
public void GoodCustomerIdAndBranch_ReturnsListExpectedItemNumber() { // arrange IFavoritesListLogic testunit = MakeTestsUnit(); UserSelectedContext testcontext = new UserSelectedContext { BranchId = "FUT", CustomerId = "123456" }; UserProfile fakeUser = new UserProfile(); string expected = "123456"; int fakeId = 0; // act ListModel results = testunit.GetListModel(fakeUser, testcontext, fakeId); // assert results.Items .First() .ItemNumber .Should() .Be(expected); }