public void UpdatePluginSettings_Should_Add_Plugin_Settings_ToCache() { // Arrange CacheMock cache = new CacheMock(); ApplicationSettings settings = new ApplicationSettings(); SiteCache siteCache = new SiteCache(settings, cache); TextPluginStub plugin = new TextPluginStub(); plugin.PluginCache = siteCache; plugin.Repository = new RepositoryMock(); plugin.Settings.SetValue("foo", "bar"); // Act siteCache.UpdatePluginSettings(plugin); // Assert Assert.That(cache.Count(), Is.EqualTo(1)); }
public void updatepluginsettings_should_add_plugin_settings_tocache() { // Arrange CacheMock cache = new CacheMock(); SiteCache siteCache = new SiteCache(cache); TextPluginStub plugin = new TextPluginStub(); plugin.PluginCache = siteCache; plugin.Repository = new SettingsRepositoryMock(); plugin.Settings.SetValue("foo", "bar"); // Act siteCache.UpdatePluginSettings(plugin); // Assert Assert.That(cache.Count(), Is.EqualTo(1)); }