Esempio n. 1
0
        public void TestDeleteNotInUse()
        {
            Country country = _dataGenerator.CreateCountry();

            ICountryDao countryDao = new CountryDao(_graphClient);
            countryDao.Delete(country);

            Assert.AreEqual(0, countryDao.GetAll().Count);
        }
Esempio n. 2
0
        public void TestDeleteInUse()
        {
            Country country = _dataGenerator.CreateCountry();
            Route route = _dataGenerator.CreateRouteInCountry(country: country);

            ICountryDao countryDao = new CountryDao(_graphClient);
            Action action = ()=>countryDao.Delete(country);
            action.ShouldThrow<NodeInUseException>();
        }