public async void CreatingExistingPlannedInspectionAgainShouldThrowError() { await Assert.ThrowsAsync <EntityExistsException>(() => _inspectionService.CreatePlannedInspection( _modelMocks.Festivals.FirstOrDefault(f => f.Id == 1).Id, _modelMocks.Questionnaires.First(q => q.Id == 1).Id, new DateTime(2020, 3, 4, 12, 30, 0), new DateTime(2020, 3, 4, 17, 0, 0), "Pinkpop", _modelMocks.Employees.First(e => e.Id == 2).Id)); _dbMock.Verify(x => x.SaveChangesAsync(), Times.Never); }