public SiteCatalogServiceImpl(ICatalogLogic catalogLogic
                               , ICatalogRepository catalogRepository, IPriceLogic priceLogic
                               , IHistoryListLogic historyLogic, ICategoryImageRepository categoryImageRepository
                               , IRecommendedItemsRepository recommendedItemsRepository
                               , IGrowthAndRecoveriesRepository growthAndRecoveryItemsRepository)
 {
     _catalogLogic                     = catalogLogic;
     _catalogRepository                = catalogRepository;
     _priceLogic                       = priceLogic;
     _historyLogic                     = historyLogic;
     _recommendedItemsRepository       = recommendedItemsRepository;
     _growthAndRecoveryItemsRepository = growthAndRecoveryItemsRepository;
     _categoryImageRepository          = categoryImageRepository;
 }
            public void BadCustomerId_ReturnsNull()
            {
                // arrange
                IHistoryListLogic   testunit    = MakeTestsObject();
                UserSelectedContext testcontext = new UserSelectedContext {
                    BranchId   = "FUT",
                    CustomerId = "223456"
                };
                UserProfile fakeUser = new UserProfile();

                // act
                ListModel results = testunit.GetListModel(fakeUser, testcontext, 0);

                // assert
                results.Should()
                .BeNull();
            }
            public void BadBranchId_ReturnsNull()
            {
                // arrange
                IHistoryListLogic   testunit    = MakeTestsObject();
                UserSelectedContext testcontext = new UserSelectedContext {
                    BranchId   = "XXX",
                    CustomerId = "123456"
                };
                UserProfile fakeUser   = new UserProfile();
                bool        headerOnly = false;

                // act
                ListModel results = testunit.ReadList(fakeUser, testcontext, headerOnly);

                // assert
                results.Should()
                .BeNull();
            }
            public void GoodCustomerIdAndBranch_ReturnsExpectedList()
            {
                // arrange
                IHistoryListLogic   testunit    = MakeTestsObject();
                UserSelectedContext testcontext = new UserSelectedContext {
                    BranchId   = "FUT",
                    CustomerId = "123456"
                };
                UserProfile fakeUser = new UserProfile();
                string      expected = "123456";

                // act
                ListModel results = testunit.GetListModel(fakeUser, testcontext, 0);

                // assert
                results.CustomerNumber
                .Should()
                .Be(expected);
            }
            public void GoodCustomerIdAndBranchHeaderOnlyTrue_ReturnsExpectedNumberOfItems()
            {
                // arrange
                IHistoryListLogic   testunit    = MakeTestsObject();
                UserSelectedContext testcontext = new UserSelectedContext {
                    BranchId   = "FUT",
                    CustomerId = "123456"
                };
                UserProfile fakeUser   = new UserProfile();
                int         expected   = 0;
                bool        headerOnly = true;

                // act
                ListModel results = testunit.ReadList(fakeUser, testcontext, headerOnly);

                // assert
                results.Items
                .Count
                .Should()
                .Be(expected);
            }
            public void GoodCustomerIdAndBranch_ReturnsListWithInListItemsAndInHistoryTrue()
            {
                // arrange
                IHistoryListLogic   testunit    = MakeTestsObject();
                UserSelectedContext testcontext = new UserSelectedContext {
                    BranchId   = "FUT",
                    CustomerId = "123456"
                };
                List <string> InList = new List <string> {
                    "123456"
                };
                bool expected = true;

                // act
                List <InHistoryReturnModel> results = testunit.ItemsInHistoryList(testcontext, InList);

                // assert
                results.First()
                .InHistory
                .Should()
                .Be(expected);
            }