public void BadCustomerId_ReturnsNull() { // arrange IFavoritesListLogic testunit = MakeTestsUnit(); UserSelectedContext testcontext = new UserSelectedContext { BranchId = "FUT", CustomerId = "223456" }; UserProfile fakeUser = new UserProfile(); // act ListModel results = testunit.GetFavoritesList(fakeUser.UserId, testcontext, true); // 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; // act ListModel results = testunit.GetFavoritesList(fakeUser.UserId, testcontext, true); // assert results.ListId .Should() .Be(expectedId); }
public void GoodCustomerIdAndBranch_ReturnsListWithAnItem() { // arrange IFavoritesListLogic testunit = MakeTestsUnit(); UserSelectedContext testcontext = new UserSelectedContext { BranchId = "FUT", CustomerId = "123456" }; UserProfile fakeUser = new UserProfile(); int expectedCount = 1; // act ListModel results = testunit.GetFavoritesList(fakeUser.UserId, testcontext, false); // assert results.Items .Count() .Should() .Be(expectedCount); }