public void CanGetColorById() { ColorRepositoryMock repo = new ColorRepositoryMock(); Color Color = repo.GetAll().FirstOrDefault(c => c.ColorId == 3); Assert.AreEqual(Color.ColorId, 3); Assert.AreEqual(Color.ColorName, "Gray"); }
public void CanGetAllColors() { ColorRepositoryMock repo = new ColorRepositoryMock(); List <Color> Colors = repo.GetAll().ToList(); Assert.AreEqual(5, Colors.Count); Assert.AreEqual(Colors[2].ColorId, 3); Assert.AreEqual(Colors[2].ColorName, "Gray"); }