public async Task TestThat_SetCoffeeShopDistances_When_DistancesListIsEmpty_Throws_ArgumentOutOfRangeException()
        {
            // Arrange
            var dataWriterMock = new Mock <ICoffeeShopDistanceDataWriter>();

            var coffeeShopDistanceRepository = new CoffeeShopDistanceRepository(dataWriterMock.Object);

            // Act
            async Task Act() => await coffeeShopDistanceRepository.SetCoffeeShopDistances(MockObjects.EmptyShopDistances);

            // Assert
            await Assert.ThrowsAsync <ArgumentOutOfRangeException>(Act);
        }
        public async Task TestThat_SetCoffeeShopDistances_When_DistancesListIsValid_Calls_DataWriterWriteCoffeeShopDistances_Once()
        {
            // Arrange
            var distancesMock = MockObjects.SelectedShopDistances.ToList();

            var dataWriterMock = new Mock <ICoffeeShopDistanceDataWriter>();

            dataWriterMock.Setup(x => x.WriteCoffeeShopDistances(It.IsAny <IEnumerable <Distance> >()));

            var coffeeShopDistanceRepository = new CoffeeShopDistanceRepository(dataWriterMock.Object);

            // Act
            await coffeeShopDistanceRepository.SetCoffeeShopDistances(distancesMock);

            // Assert
            dataWriterMock.Verify(x => x.WriteCoffeeShopDistances(distancesMock), Times.Once);
        }
        public async Task TestThat_SetCoffeeShopDistances_When_DataWriterThrowsDataProviderException_Throws_DataProviderExceptionWithExpectedMessage()
        {
            // Arrange
            var dataWriterMock = new Mock <ICoffeeShopDistanceDataWriter>();

            dataWriterMock
            .Setup(x => x.WriteCoffeeShopDistances(It.IsAny <IEnumerable <Distance> >()))
            .Throws(new DataProviderException(MockValues.OutputDataProviderExceptionMessage));

            var coffeeShopDistanceRepository = new CoffeeShopDistanceRepository(dataWriterMock.Object);

            // Act
            async Task Act() => await coffeeShopDistanceRepository.SetCoffeeShopDistances(MockObjects.SelectedShopDistances);

            // Assert
            var exception = await Assert.ThrowsAsync <DataProviderException>(Act);

            Assert.Equal(MockValues.OutputDataProviderExceptionMessage, exception.Message);
        }