public void GetPluginSettings_Should_Return_Plugin_Settings() { // Arrange CacheMock cache = new CacheMock(); ApplicationSettings settings = new ApplicationSettings(); SiteCache siteCache = new SiteCache(settings, cache); TextPluginStub plugin = new TextPluginStub("id1", "", ""); plugin.PluginCache = siteCache; plugin.Repository = new RepositoryMock(); plugin.Settings.SetValue("foo", "bar"); TextPluginStub plugin2 = new TextPluginStub("id2", "", ""); plugin2.PluginCache = siteCache; plugin2.Repository = new RepositoryMock(); plugin2.Settings.SetValue("foo", "bar2"); // Act PluginSettings pluginSettings = siteCache.GetPluginSettings(plugin); // Assert Assert.That(pluginSettings.Values.Count(), Is.EqualTo(1)); Assert.That(pluginSettings.GetValue("foo"), Is.EqualTo("bar")); }