NotSupportedException on MultiStatementObject base class bind method

This commit is contained in:
Michael L Smith 2016-03-01 18:20:48 -08:00
parent 255318fb07
commit 8eba76a670
2 changed files with 10 additions and 1 deletions

View File

@ -53,5 +53,14 @@ namespace OSCADSharp.UnitTests
Assert.AreEqual(0, childrenThatAreDiffs);
}
[TestMethod]
[ExpectedException(typeof(NotSupportedException))]
public void Difference_NoBindableProperties()
{
var diff = new Cube() - new Sphere();
diff.Bind("SomeProperty", new Scripting.Variable("test", 5));
}
}
}

View File

@ -98,7 +98,7 @@ namespace OSCADSharp.Scripting
public override void Bind(string property, Variable variable)
{
throw new NotImplementedException();
throw new NotSupportedException("This object has no bindable properties.");
}
}
}