public void CanGetAllBodyStyle() { BodyStyleRepository repo = new BodyStyleRepository(); Assert.AreEqual(3, repo.GetAll().Count); Assert.AreEqual("Space Wagon", repo.GetAll().FirstOrDefault().BodyStyleName); }
public void CanRemoveBodyStyle() { BodyStyleRepository repo = new BodyStyleRepository(); Assert.AreEqual(3, repo.GetAll().Count); repo.Remove(1); Assert.AreEqual(2, repo.GetAll().Count); Assert.IsFalse(repo.GetAll().Any(bs => bs.BodyStyleId == 1)); }
public void CanAddBodyStyle() { BodyStyleRepository repo = new BodyStyleRepository(); Assert.AreEqual(3, repo.GetAll().Count); repo.Add(new BodyStyle { BodyStyleName = "Big" }); Assert.AreEqual(4, repo.GetAll().Count); }
public void CanLoadBodyStyles() { var repo = new BodyStyleRepository(); var styles = repo.GetAll(); Assert.AreEqual(5, styles.Count()); Assert.AreEqual("Convertible", styles[0].BodyStyleName); Assert.AreEqual(3, styles[2].BodyStyleId); Assert.AreEqual("SUV", styles[4].BodyStyleName); }
public void CanGetBodyStyle() { BodyStyleRepository repo = new BodyStyleRepository(); Assert.AreEqual("Space Wagon", repo.Get(1).BodyStyleName); }