public void ShouldSerializeValueReturnsFalseWhenParameterValueIsSameAsDefault()
        {
            var target = new CustomToolParameter(ParameterName, typeof(int), string.Empty);

            target.SetValue(this.parent, default(int));
            Assert.IsFalse(target.ShouldSerializeValue(this.parent));
        }
        public void ShouldSerializeValueReturnsTrueWhenParameterValueIsDifferentFromDefault()
        {
            var target = new CustomToolParameter(ParameterName, typeof(int), string.Empty);

            target.SetValue(this.parent, int.Parse(ParameterValue, CultureInfo.InvariantCulture));
            Assert.IsTrue(target.ShouldSerializeValue(this.parent));
        }
        public void ShouldSerializeValueThrowsArgumentExceptionWhenComponentIsOfWrongType()
        {
            var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);

            target.ShouldSerializeValue(new object());
        }
        public void ShouldSerializeValueThrowsArgumentNullExceptionWhenComponentIsNull()
        {
            var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);

            target.ShouldSerializeValue(null);
        }
 public void ShouldSerializeValueReturnsFalseWhenParameterValueIsSameAsDefault()
 {
     var target = new CustomToolParameter(ParameterName, typeof(int), string.Empty);
     target.SetValue(this.parent, default(int));
     Assert.IsFalse(target.ShouldSerializeValue(this.parent));
 }
 public void ShouldSerializeValueReturnsTrueWhenParameterValueIsDifferentFromDefault()
 {
     var target = new CustomToolParameter(ParameterName, typeof(int), string.Empty);
     target.SetValue(this.parent, int.Parse(ParameterValue, CultureInfo.InvariantCulture));
     Assert.IsTrue(target.ShouldSerializeValue(this.parent));            
 }
 public void ShouldSerializeValueThrowsArgumentExceptionWhenComponentIsOfWrongType()
 {
     var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);
     target.ShouldSerializeValue(new object());
 }
 public void ShouldSerializeValueThrowsArgumentNullExceptionWhenComponentIsNull()
 {
     var target = new CustomToolParameter(ParameterName, typeof(string), string.Empty);
     target.ShouldSerializeValue(null);
 }