public void ProcessTest() { Mock <Manifest> mock = new Mock <Manifest>(); var sut = new ManifestConfigurationProcessor(new[] { new Engine.Configuration.ArgumentManifestConfigurationProvider(new[] { "name=happypath" }) }); sut.Process(mock.Object, new Dictionary <string, string> { { "name", "happypath" } }); mock.Verify(m => m.ConfigureItems(It.IsAny <Dictionary <string, string> >())); }
public void BuildConfiguration_CreatesCaseInsensitiveResults() { var seed = new Kanyon.Engine.Configuration.ArgumentManifestConfigurationProvider(new[] { "name=happypath" }); var sut = new ManifestConfigurationProcessor(new[] { seed }); var actual = sut.BuildConfiguration(); Assert.AreEqual(1, actual.Count); Assert.AreEqual("happypath", actual["NAME"]); }
public void BuildConfiguration_CombinesMultipleProviders() { var seed = new Kanyon.Engine.Configuration.ArgumentManifestConfigurationProvider(new[] { "name=happypath" }); var seed2 = new Kanyon.Engine.Configuration.ArgumentManifestConfigurationProvider(new[] { "age=42" }); var sut = new ManifestConfigurationProcessor(new[] { seed, seed2 }); var actual = sut.BuildConfiguration(); Assert.AreEqual(2, actual.Count); }