示例#1
0
        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> >()));
        }
示例#2
0
        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"]);
        }
示例#3
0
        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);
        }