public void TestDeleteNotInUse() { Area area = _dataGenerator.CreateArea(); SummitGroup summitGroup = _dataGenerator.CreateSummitGroup(area: area); ISummitGroupDao summitGroupDao = new SummitGroupDao(_graphClient); summitGroupDao.Delete(summitGroup); Assert.AreEqual(0, summitGroupDao.GetAllIn(area).Count); }
public void TestCreateAndGetAll() { Area area = _dataGenerator.CreateArea(); SummitGroupDao groupDao = new SummitGroupDao(_graphClient); SummitGroup created = _dataGenerator.CreateSummitGroup(area: area); IList <SummitGroup> groupsInArea = groupDao.GetAllIn(area); Assert.AreEqual(1, groupsInArea.Count); Assert.AreEqual(created.Name, groupsInArea.First().Name); Assert.AreEqual(created.Id, groupsInArea.First().Id); Assert.AreEqual(created.Id, groupsInArea.First().Id); }
public void TestUpdate() { Area area = _dataGenerator.CreateArea(); SummitGroup summitGroup = _dataGenerator.CreateSummitGroup("oldname", area); summitGroup.Name = "newname"; ISummitGroupDao summitGroupDao = new SummitGroupDao(_graphClient); summitGroupDao.Save(summitGroup); Assert.AreEqual("newname", summitGroupDao.GetAllIn(area).First().Name); }