public void GetAllReturnsAllData()
        {
            // Arrange
            var customersJson = File.ReadAllText(@"Business\CustomerDataFactories\Json\customers.json");
            var customerApi   = new Mock <ICustomerServiceApi>();

            customerApi.Setup(arg => arg.GetAllAsync())
            .Returns(Task.FromResult(customersJson));

            var factory = new LiveCustomerDataFactory(customerApi.Object);

            // Act
            var customers = factory.GetAll();

            // Assert
            Assert.IsNotNull(customers);
            Assert.IsTrue(customers.ListOfCustomers.Any());
        }
        public void GetAllReturnsEmptyCustomersWithInvalidApiResponse()
        {
            // Arrange
            var httpClient = new HttpClient();

            var customerApi = new Mock <ICustomerServiceApi>();

            customerApi.Setup(arg => arg.GetAllAsync())
            .Returns(Task.FromResult("<Invalid>Response</Invalid>"));

            var factory = new LiveCustomerDataFactory(customerApi.Object);

            // Act
            var customers = factory.GetAll();

            // Assert
            Assert.IsNotNull(customers);
            Assert.IsNotNull(customers.ListOfCustomers);
            Assert.IsFalse(customers.ListOfCustomers.Any());
        }