Exemple #1
0
        public async Task CountAllCompanyCustomers_Returns_Right_Number_Of_CompanyCustomers()
        {
            var CompanyCustomerMock = new Mock <IDelpinHttpClientHandler <CompanyCustomer> >();

            var PrivateCustomerMock = new Mock <IDelpinHttpClientHandler <PrivateCustomer> >();

            var BookingMock = new Mock <IDelpinHttpClientHandler <Booking> >();

            int NumberOfCompanyCustomers = 5;

            CompanyCustomerMock.Setup(m => m.GetCountHttp(It.IsAny <string>(), It.IsAny <string>()))
            .ReturnsAsync(NumberOfCompanyCustomers);

            var sut = new StatisticController(Configuration(), PrivateCustomerMock.Object, CompanyCustomerMock.Object, BookingMock.Object);


            var countCompanyCustomers = await sut.CountAllCompanyCustomers();

            Assert.Equal(NumberOfCompanyCustomers, countCompanyCustomers);
        }