Пример #1
0
        public void ResetValueRemovesProjectItemMetadata()
        {
            this.projectItem.Metadata[ParameterName] = ParameterValue;
            var target = new CustomToolParameter(ParameterName, typeof(int), string.Empty);

            target.ResetValue(this.parent);
            Assert.IsFalse(this.projectItem.Metadata.ContainsKey(ParameterName));
        }
Пример #2
0
        public void ResetValueThrowsArgumentExceptionWhenComponentIsOfWrongType()
        {
            var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);

            target.ResetValue(new object());
        }
Пример #3
0
        public void ResetValueThrowsArgumentNullExceptionWhenComponentIsNull()
        {
            var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);

            target.ResetValue(null);
        }
Пример #4
0
 public void ResetValueRemovesProjectItemMetadata()
 {
     this.projectItem.Metadata[ParameterName] = ParameterValue;
     var target = new CustomToolParameter(ParameterName, typeof(int), string.Empty);
     target.ResetValue(this.parent);
     Assert.IsFalse(this.projectItem.Metadata.ContainsKey(ParameterName));
 }
Пример #5
0
 public void ResetValueThrowsArgumentExceptionWhenComponentIsOfWrongType()
 {
     var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);
     target.ResetValue(new object());
 }
Пример #6
0
 public void ResetValueThrowsArgumentNullExceptionWhenComponentIsNull()
 {
     var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);
     target.ResetValue(null);
 }