public void GetCategoryByIdWhenChildCategoryIdPassedReturnsCorrectCategory()
        {
            // Arrange
            long childId = 874329832;

            var rootCategory = new CategoryBuilder()
                               .WithChildCategory(new CategoryBuilder()
                                                  .WithChildCategory(new CategoryBuilder().WithId(childId).BuildWCF())
                                                  .BuildWCF())
                               .WithChildCategory(new CategoryBuilder().BuildWCF())
                               .BuildWCF();

            var serviceClient = new MaxCommerceServiceClientBuilder()
                                .SetupGetCategories(rootCategory)
                                .Build();

            var sut = new ProductRepository(serviceClient);

            // Act
            var result = sut.GetCategoryById(childId.ToString()).Result;

            // Assert
            serviceClient.AsMock().Verify();
            Assert.AreEqual(childId.ToString(), result.Id);
        }
        public void GetCategoriesReturnsRootCategoryFromServiceClient()
        {
            // Arrange
            WCF.Category category = new CategoryBuilder().BuildWCF();
            IMaxCommerceServiceClient serviceClient = new MaxCommerceServiceClientBuilder()
                                                      .SetupGetCategories(category)
                                                      .Build();

            var sut = new ProductRepository(serviceClient);

            // Act
            Category result = sut.GetCategories().Result;

            // Assert
            serviceClient.AsMock().Verify();
            Assert.AreEqual(category.Id.ToString(), result.Id);
            Assert.AreEqual(category.Name, result.Name);
        }