public void Should_make_master_language()
        {
            var config = LanguagesConfig.Create(Language.DE).Add(Language.IT).MakeMaster(Language.IT);

            Assert.Equal(Language.IT, config.Master.Language);
        }
        public void Should_throw_exception_if_language_to_make_optional_must_be_set_to_master()
        {
            var config = LanguagesConfig.Create(Language.DE).Add(Language.IT);

            Assert.Throws <ValidationException>(() => config.Update(Language.DE, true, true, null));
        }
        public void Should_throw_exception_if_language_to_add_already_exists()
        {
            var config = LanguagesConfig.Create(Language.DE);

            Assert.Throws <ValidationException>(() => config.Add(Language.DE));
        }
        public void Should_throw_exception_if_fallback_language_is_invalid()
        {
            var config = LanguagesConfig.Create(Language.DE);

            Assert.Throws <ValidationException>(() => config.Update(Language.DE, false, false, new[] { Language.EN }));
        }
        public void Should_throw_exception_if_language_to_make_optional_is_master_language()
        {
            var config = LanguagesConfig.Create(Language.DE);

            Assert.Throws <ValidationException>(() => config.Update(Language.DE, true, false, null));
        }
        public void Should_throw_exception_if_language_to_update_is_not_found()
        {
            var config = LanguagesConfig.Create(Language.DE);

            Assert.Throws <DomainObjectNotFoundException>(() => config.Update(Language.EN, true, false, null));
        }
        public void Should_also_set_make_master_when_updating_language()
        {
            var config = LanguagesConfig.Create(Language.DE).Add(Language.IT).Update(Language.IT, false, true, null);

            Assert.Equal(Language.IT, config.Master.Language);
        }
        public void Should_throw_exception_if_language_to_remove_is_master_language()
        {
            var config = LanguagesConfig.Create(Language.DE);

            Assert.Throws <ValidationException>(() => config.Remove(Language.DE));
        }
        public void Should_throw_exception_if_language_to_remove_is_not_found()
        {
            var config = LanguagesConfig.Create(Language.DE);

            Assert.Throws <DomainObjectNotFoundException>(() => config.Remove(Language.EN));
        }
        public void Should_not_throw_exception_if_language_is_already_master_language()
        {
            var config = LanguagesConfig.Create(Language.DE);

            config.MakeMaster(Language.DE);
        }