Exemplo n.º 1
0
            public async void GetAllAsync()
            {
                // Arrange
                var expectedVehicles = new Page <Vehicle>
                {
                    Items     = new Vehicle[] { vehicles[0], vehicles[1], vehicles[2] },
                    TotalSize = 3
                };

                VehiclesRepositoryMock
                .Setup(x => x.GetAllAsync())
                .ReturnsAsync(vehicles);

                // Act
                var result = await ServiceUnderTest.GetAllAsync(pagingOptions);

                // Assert
                Assert.True(EqualityHelper.SamePageOfVehicles(expectedVehicles, result));
            }