public void ContactSettingsRepository_NoPresets_ShouldReturnEmptyCollection(Db db, [Greedy] ContactSettingsRepository repo) { var siteContext = new FakeSiteContext("siteName"); using (new FakeSiteContextSwitcher(siteContext)) { CreateItem(db, $"/sitecore/client/Applications/ExperienceGenerator/Common/Contacts/{siteContext.Name}"); repo.GetPresets().Count.Should().Be(0); } }
public void Save_OnePresent_ShouldReturnSingleSetting(Db db, [Greedy] ContactSettingsRepository repo) { var siteContext = new FakeSiteContext("siteName"); using (new FakeSiteContextSwitcher(siteContext)) { CreateItem(db, $"/sitecore/client/Applications/ExperienceGenerator/Common/Contacts/{siteContext.Name}"); repo.Save("name", EmptySpecification); repo.GetPresets().Count.Should().Be(1); } }