public void TestGetAllMakers() { // arrange var repo = new MakerRepository(_context, _mapper); // act var result = repo.GetAll(); // assert Assert.Equal(MockData.ListOfMakers.Count(), result.Count()); }
public async void TestUpdateMaker() { // arrange int indexMaker = 5; var repo = new MakerRepository(_context, _mapper); Maker Expected = MockData.ListOfMakers.Where(m => m.Id == indexMaker).FirstOrDefault(); // act var result = await repo.Update(Expected); // assert Assert.Equal(Expected, result); }