public void GetSettings_Should_Retrun_Settings_Aggregate()
        {
            var localizationSettings = Fixture.Create <LocalizationSettingsData>();

            _localizationSettingsRepository.Insert(localizationSettings);

            LocalizationSettingsAggregateData settings = _localizationSettingsRepository.GetSettings(localizationSettings.EntityId, localizationSettings.Language);

            Assert.IsNotNull(settings);
        }
        public void GetSettings_Should_Retrun_Include_Created_Localizations()
        {
            var localizationSettings = Fixture.Build <LocalizationSettingsData>()
                                       .With(p => p.Formattings, null)
                                       .With(p => p.Localizations, null)
                                       .Create();

            _localizationSettingsRepository.Insert(localizationSettings);

            var overrides = Fixture.Build <LocalizationData>()
                            .With(p => p.LocalizationSettingsId, localizationSettings.Id)
                            .CreateMany().ToList();

            _localizationOverridesRepository.Insert(overrides);

            LocalizationSettingsData settings = _localizationSettingsRepository.GetSettings(localizationSettings.EntityId, localizationSettings.Language);

            Assert.IsTrue(Comparer.Compare(settings.Localizations.ToList(), overrides.ToList()), Comparer.DifferencesString);
        }
        public void Insert_Should_Create_Multiple_New_Overrides()
        {
            var localizationSettings = Fixture.Create <LocalizationSettingsData>();

            _localizationSettingsRepository.Insert(localizationSettings);

            var overrides = Fixture.Build <LocalizationData>()
                            .With(p => p.LocalizationSettingsId, localizationSettings.Id)
                            .CreateMany().ToList();

            _localizationOverridesRepository.Insert(overrides);

            ICollection <LocalizationData> createdOverrides = _localizationOverridesRepository.GetBySettingsId(localizationSettings.Id);

            _localizationOverridesRepository.Delete(localizationSettings.Id);

            Assert.AreEqual(overrides.Count, createdOverrides.Count);
        }