예제 #1
0
        public void dynamic_contains_property_throws_exception_if_key_not_provided()
        {
            var props = new DynaProps();

            Should.Throw <ArgumentNullException>(() => props.ContainsProperty(null));
            Should.Throw <ArgumentNullException>(() => props.ContainsProperty(string.Empty));
            Should.Throw <ArgumentNullException>(() => props.ContainsProperty(""));
        }
예제 #2
0
        public void dynamic_contains_property_returns_true_if_property_exists()
        {
            var props = new DynaProps();

            props.Properties.Key = "value";
            props.ContainsProperty("Key").ShouldBeTrue();
        }
예제 #3
0
        public void dynamic_contains_property_returns_false_if_property_does_not_exist()
        {
            var props = new DynaProps();

            props.ContainsProperty("Key1").ShouldBeFalse();
        }