public void GetByActiveHaspKey() { List <HaspKey> GetByActive; var GetByActiveExpected = new List <HaspKey> { CreateNew(1), }; using (var db = new EntitesContext()) { ClearTable.HaspKeys(db); ClearTable.KeyFeatures(db); haspKeyL = Get(db); db.HaspKeys.AddRange(CreateListEntities.HaspKeys()); db.KeyFeatures.AddRange(CreateListEntities.KeyFeatures()); db.SaveChanges(); GetByActive = haspKeyL.GetByActive(); } CollectionAssert.AreEqual(GetByActive, GetByActiveExpected); }
public List <ModelViewHaspKey> GetByActive() => Convert(keyLogic.GetByActive());