예제 #1
0
        public void HasValueWithUnknownKey()
        {
            var key = new ConfigurationKey <string>("a");

            var configuration = new ConstantConfiguration(new Dictionary <ConfigurationKeyBase, object>());

            Assert.IsFalse(configuration.HasValueFor(key));
        }
예제 #2
0
        public void HasValueWithKnownKey()
        {
            var key = new ConfigurationKey <string>("a");

            var configuration = new ConstantConfiguration(
                new Dictionary <ConfigurationKeyBase, object>
            {
                [key] = 10
            });

            Assert.IsTrue(configuration.HasValueFor(key));
        }
예제 #3
0
        public void HasValueWithNullKey()
        {
            var configuration = new ConstantConfiguration(new Dictionary <ConfigurationKeyBase, object>());

            Assert.IsFalse(configuration.HasValueFor(null));
        }