Exemple #1
0
        public void PropertyBagHolder_RemoveProperty_SucceedsIfPropertyDoesNotExist()
        {
            var inputObject = new TestClass();

            inputObject.ShouldNotContainProperty(PropertyName);

            inputObject.RemoveProperty(PropertyName);
            inputObject.ShouldNotContainProperty(PropertyName);
        }
Exemple #2
0
        public void PropertyBagHolder_RemoveProperty_RemovesExistingProperty()
        {
            var inputObject = new TestClass();

            inputObject.SetProperty(PropertyName, "x");

            inputObject.RemoveProperty(PropertyName);

            inputObject.PropertyNames.Count.Should().Be(0);
            inputObject.ShouldNotContainProperty(PropertyName);
        }