public void MockCanAddMake() { var make = new Make() { Name = "Fiat", DateAdded = DateTime.Parse("5/5/2005") }; repo.Insert(make); var makes = repo.GetAll().ToList(); Assert.AreEqual(5, makes.Count()); Assert.AreEqual("Fiat", makes[4].Name); Assert.AreEqual(DateTime.Parse("5/5/2005"), makes[4].DateAdded); }
public void CanAddMake() { Make make = new Make { MakeName = "TestMake", DateAdded = DateTime.Now.Date, AddedBy = "TestUser" }; MakeRepositoryMock repo = new MakeRepositoryMock(); repo.Insert(make); List <Make> makes = repo.GetAll().ToList(); Assert.AreEqual(6, makes.Count); Assert.AreEqual("6", makes[5].MakeId); Assert.AreEqual(make.MakeName, makes[5].MakeName); Assert.AreEqual(make.DateAdded, makes[5].DateAdded); Assert.AreEqual(make.AddedBy, makes[5].AddedBy); }