Exemple #1
0
        public void SimpleDeleteUsingWhereTest()
        {
            using (EasySession easySession = new EasySession())
            {
                ///[Test Create] - without relationship
                Location location = new Location();

                int resultCount = location.Count(easySession);
                Assert.AreEqual(13, resultCount);

                bool result = location.DeleteAllByCustomWhere(easySession, "Availability = 120.00");

                resultCount = location.Count(easySession);
                Assert.AreEqual(9, resultCount);
            }
        }
Exemple #2
0
        public void SimpleDeleteAllTest()
        {
            using (EasySession easySession = new EasySession())
            {
                ///[Test Create] - without relationship
                Location location = new Location();

                int resultCount = location.Count(easySession);
                Assert.AreEqual(9, resultCount);

                bool result = location.DeleteAll(easySession);

                resultCount = location.Count(easySession);
                Assert.AreEqual(0, resultCount);
            }
        }
Exemple #3
0
        public void SimpleCountTest()
        {
            using (EasySession easySession = new EasySession())
            {
                ///[Test Read] - without relationship
                Location location = new Location();
                int resultList = location.Count(easySession);

                Assert.AreEqual(14, resultList);
            }
        }
Exemple #4
0
        public void SimpleCountByPropertyAndTypeTest()
        {
            using (EasySession easySession = new EasySession())
            {
                ///[Test Read] - without relationship
                Location location = new Location();
                int resultList = location.Count(easySession, "Availability", 120.00);

                Assert.AreEqual(4, resultList);
            }
        }
 public void LocationReturnsAllPossibleNeighbours()
 {
     var neighbouringLocations = new Location(1, 1).NeighbouringLocations();
     Assert.AreEqual(8, neighbouringLocations.Count(), "count");
 }