Beispiel #1
0
        public async void UpdateMakeAsync_Returns_1()
        {
            repoMock.Setup(s => s.UpdateAsync(It.IsAny <IVehicleMake>()));
            uowMock.SetupGet(s => s.Makers).Returns(repoMock.Object);
            uowMock.Setup(s => s.CommitAsync()).Returns(Task.FromResult(1));


            var makeService = new VehicleMakeService(uowMock.Object);
            var result      = await makeService.UpdateMakeAsync(new Mock <IVehicleMake>().Object);

            //Assert
            Assert.Equal(1, result);
        }