public void TestDeleteNotInUse()
        {
            Country country = _dataGenerator.CreateCountry();

            ICountryDao countryDao = new CountryDao(_graphClient);

            countryDao.Delete(country);

            Assert.AreEqual(0, countryDao.GetAll().Count);
        }
        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>();
        }
        public async void TestDelete()
        {
            ConnectionFactory connectionFactory = new ConnectionFactory(Environment.Testing);
            ICountryDao       countryDao        = new CountryDao(connectionFactory);

            Country country = new Country {
                Code = "AT"
            };

            country.Id = await countryDao.Insert(country);

            Assert.NotNull(await countryDao.FindById(country.Id));

            await countryDao.Delete(country.Id);

            Assert.Null(await countryDao.FindById(country.Id));
        }