diff --git a/OSCADSharp/OSCADSharp.UnitTests/OSCADSharp.UnitTests.csproj b/OSCADSharp/OSCADSharp.UnitTests/OSCADSharp.UnitTests.csproj
index d9bf4e0..2a6184b 100644
--- a/OSCADSharp/OSCADSharp.UnitTests/OSCADSharp.UnitTests.csproj
+++ b/OSCADSharp/OSCADSharp.UnitTests/OSCADSharp.UnitTests.csproj
@@ -65,6 +65,7 @@
+
diff --git a/OSCADSharp/OSCADSharp.UnitTests/Transforms/ResizeTests.cs b/OSCADSharp/OSCADSharp.UnitTests/Transforms/ResizeTests.cs
new file mode 100644
index 0000000..af993df
--- /dev/null
+++ b/OSCADSharp/OSCADSharp.UnitTests/Transforms/ResizeTests.cs
@@ -0,0 +1,22 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using OSCADSharp.Solids;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OSCADSharp.UnitTests.Transforms
+{
+ [TestClass]
+ public class ResizeTests
+ {
+ [TestMethod]
+ [ExpectedException(typeof(NotSupportedException))]
+ public void Resize_PositionNotSupportedAfterResize()
+ {
+ var pos = new Cube(5, 5, 20)
+ .Translate(30, 0, 0).Rotate(0, 90, 0).Resize(2, 2, 2).Position();
+ }
+ }
+}
diff --git a/OSCADSharp/OSCADSharp/Transforms/ResizedObject.cs b/OSCADSharp/OSCADSharp/Transforms/ResizedObject.cs
index 506bdb3..29837c8 100644
--- a/OSCADSharp/OSCADSharp/Transforms/ResizedObject.cs
+++ b/OSCADSharp/OSCADSharp/Transforms/ResizedObject.cs
@@ -51,7 +51,7 @@ namespace OSCADSharp.Transforms
public override Vector3 Position()
{
- return obj.Position();
+ throw new NotSupportedException("Position is not supported on Resized objects.");
}
}
}