예제 #1
0
        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());
        }
예제 #2
0
        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());
        }
예제 #3
0
 public void DeleteBlindSetup(BlindSetup b)
 {
     Connection.Delete<BlindSetup>(b);
 }
예제 #4
0
 public void AddBlindSetup(BlindSetup b)
 {
     Connection.Insert<BlindSetup>(b);
 }
예제 #5
0
 public void UpdateBlindSetup(BlindSetup b)
 {
     Connection.Update<BlindSetup>(b);
 }
예제 #6
0
 public void DeleteBlindSetup(BlindSetup b)
 {
     Connection.Delete <BlindSetup>(b);
 }
예제 #7
0
 public void UpdateBlindSetup(BlindSetup b)
 {
     Connection.Update <BlindSetup>(b);
 }
예제 #8
0
 public void AddBlindSetup(BlindSetup b)
 {
     Connection.Insert <BlindSetup>(b);
 }