public void DeleteLanguageIsPersisted()
        {
            using (var businessContext = new BusinessContext())
            {
                var language = new Language
                {
                    Name = "LanguageName"
                };

                businessContext.AddNewLanguage(language);

                businessContext.DeleteLanguage(language);

                bool notDeleted = businessContext.DataContext.Languages.Any(l => l.Id == language.Id);

                Assert.IsFalse(notDeleted);
            }
        }
Beispiel #2
0
        public void DeleteLanguage_ThrowsException_WhenLanguageIdDoesNotExist()
        {
            using (var businessContext = new BusinessContext())
            {
                var language = new Language
                {
                    Name = "LanguageName"
                };

                businessContext.DeleteLanguage(language);
            }
        }