diff --git a/OSCADSharp/OSCADSharp.UnitTests/Booleans/DifferenceTests.cs b/OSCADSharp/OSCADSharp.UnitTests/Booleans/DifferenceTests.cs index d6c822e..3d425e4 100644 --- a/OSCADSharp/OSCADSharp.UnitTests/Booleans/DifferenceTests.cs +++ b/OSCADSharp/OSCADSharp.UnitTests/Booleans/DifferenceTests.cs @@ -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)); + } } } diff --git a/OSCADSharp/OSCADSharp/Scripting/MultiStatementObject.cs b/OSCADSharp/OSCADSharp/Scripting/MultiStatementObject.cs index b186a7e..dc45de2 100644 --- a/OSCADSharp/OSCADSharp/Scripting/MultiStatementObject.cs +++ b/OSCADSharp/OSCADSharp/Scripting/MultiStatementObject.cs @@ -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."); } } }