Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }