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); } }
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); } }
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); } }
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"); }