public void Crud_BlindSetup() { string testName = "ScooterTest123"; string testName2 = "ScooterTest321"; BlindSetup setup = new BlindSetup() { Name = testName }; foreach (BlindSetup s in repo.GetBlindSetups().Where(x => x.Name.Equals(testName) || x.Name.Equals(testName2))) repo.DeleteBlindSetup(s); Assert.AreEqual(0, repo.GetBlindSetups().Where(x => x.Name.Equals(testName)).Count()); repo.AddBlindSetup(setup); Assert.AreEqual(1, repo.GetBlindSetups().Where(x => x.Name.Equals(testName)).Count()); setup.Name = testName2; repo.UpdateBlindSetup(setup); Assert.AreEqual(1, repo.GetBlindSetups().Where(x => x.Name.Equals(testName2)).Count()); Assert.AreEqual(0, repo.GetBlindSetups().Where(x => x.Name.Equals(testName)).Count()); repo.DeleteBlindSetup(setup); Assert.AreEqual(0, repo.GetBlindSetups().Where(x => x.Name.Equals(testName2)).Count()); }
public void AddBlindSetup(BlindSetup b) { Connection.Insert<BlindSetup>(b); }
public void DeleteBlindSetup(BlindSetup b) { Connection.Delete<BlindSetup>(b); }
public void UpdateBlindSetup(BlindSetup b) { Connection.Update<BlindSetup>(b); }