public async void ReadAllAsync_ReturnsEmptyArray_WhenRepositoryReturnsEmptyArray() { // Arrange var expectedActivations = new List <Activation>(); ActivationsRepositoryMock .Setup(x => x.ReadAllAsync()) .ReturnsAsync(expectedActivations); // Act var result = await ActivationsService.ReadAllAsync(); // Assert Assert.Same(expectedActivations, result); }
public async void ReadAllAsync_ReturnsActivations_WhenRepositoryReturnsActivations() { // Arrange var expectedActivations = TestData.Activations.ContractActivations; ActivationsRepositoryMock .Setup(x => x.ReadAllAsync()) .ReturnsAsync(expectedActivations); // Act var result = await ActivationsService.ReadAllAsync(); // Assert Assert.Same(expectedActivations, result); }