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

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

            Assert.AreEqual(0, countryDao.GetAll().Count);
        }
Exemplo 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>();
        }