コード例 #1
0
        public void Remove_InvalidValue_ThrowsArgumentException(object value, string paramName)
        {
            var attribute = new DirectoryAttribute {
                "value"
            };

            AssertExtensions.Throws <ArgumentException>(paramName, () => attribute.Remove(value));
        }
コード例 #2
0
        public void Remove_Valid_Success()
        {
            var attribute = new DirectoryAttribute {
                "value"
            };

            attribute.Remove("value");
            Assert.Empty(attribute);
        }
コード例 #3
0
        public void Remove_NullValue_ThrowsArgumentNullException()
        {
            var attribute = new DirectoryAttribute();

            AssertExtensions.Throws <ArgumentNullException>("value", () => attribute.Remove(null));
        }