public async Task UpdateFixtureAsync() { var mockRepo = new Mock <IDeletableEntityRepository <Fixture> >(); mockRepo.Setup(x => x.All()).Returns(this.fixture.AsQueryable()); var service = new FixtureService(mockRepo.Object); var fixturesForUpdate = new List <FixtureForUpdateDto> { new FixtureForUpdateDto { Id = 1, Result = "2-2" }, new FixtureForUpdateDto { Id = 3, Result = "2-1" }, }; await service.UpdateFixtureAsync(fixturesForUpdate); Assert.Equal("2-2", fixture.Where(x => x.Id == 1).FirstOrDefault().Result); Assert.Equal("2-1", fixture.Where(x => x.Id == 3).FirstOrDefault().Result); }