public void GetByErroneousIdKeyFeaturey() { using (var db = new EntitesContext()) { keyFeatureL = Get(db); Assert.ThrowsException <ArgumentException>(() => keyFeatureL.GetById(erroneousId)); } }
public void GetByIdNoDBKeyFeature() { KeyFeature getById; using (var db = new EntitesContext()) { ClearTable.KeyFeatures(db); keyFeatureL = Get(db); getById = keyFeatureL.GetById(1); } Assert.IsNull(getById); }
public void GetByIdKeyFeature() { KeyFeature getById; KeyFeature kfExpected = CreateNew(1); using (var db = new EntitesContext()) { ClearTable.KeyFeatures(db); keyFeatureL = Get(db); keyFeatureL.Save(CreateNew()); getById = keyFeatureL.GetById(1); } Assert.AreEqual(getById, kfExpected); }