mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-11 21:48:34 +00:00
Added NotSupportedException on ResizedObject.Position
This commit is contained in:
parent
80c400dee8
commit
0141538a2d
@ -65,6 +65,7 @@
|
||||
<Compile Include="Booleans\DifferenceTests.cs" />
|
||||
<Compile Include="Booleans\IntersectionTests.cs" />
|
||||
<Compile Include="Transforms\MinkowskiTests.cs" />
|
||||
<Compile Include="Transforms\ResizeTests.cs" />
|
||||
<Compile Include="Transforms\ScaleTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
22
OSCADSharp/OSCADSharp.UnitTests/Transforms/ResizeTests.cs
Normal file
22
OSCADSharp/OSCADSharp.UnitTests/Transforms/ResizeTests.cs
Normal file
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -51,7 +51,7 @@ namespace OSCADSharp.Transforms
|
||||
|
||||
public override Vector3 Position()
|
||||
{
|
||||
return obj.Position();
|
||||
throw new NotSupportedException("Position is not supported on Resized objects.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user