Exemplo n.º 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());
        }
Exemplo n.º 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());
        }
Exemplo n.º 3
0
 public void DeleteBlindSetup(BlindSetup b)
 {
     Connection.Delete<BlindSetup>(b);
 }
Exemplo n.º 4
0
 public void AddBlindSetup(BlindSetup b)
 {
     Connection.Insert<BlindSetup>(b);
 }
Exemplo n.º 5
0
 public void UpdateBlindSetup(BlindSetup b)
 {
     Connection.Update<BlindSetup>(b);
 }
Exemplo n.º 6
0
 public void DeleteBlindSetup(BlindSetup b)
 {
     Connection.Delete <BlindSetup>(b);
 }
Exemplo n.º 7
0
 public void UpdateBlindSetup(BlindSetup b)
 {
     Connection.Update <BlindSetup>(b);
 }
Exemplo n.º 8
0
 public void AddBlindSetup(BlindSetup b)
 {
     Connection.Insert <BlindSetup>(b);
 }