diff --git a/src/cs/Tests/MonoGame.Extended.Collisions.Tests/CollisionComponentTests.cs b/src/cs/Tests/MonoGame.Extended.Collisions.Tests/CollisionComponentTests.cs
index dbba215e..39ac707f 100644
--- a/src/cs/Tests/MonoGame.Extended.Collisions.Tests/CollisionComponentTests.cs
+++ b/src/cs/Tests/MonoGame.Extended.Collisions.Tests/CollisionComponentTests.cs
@@ -4,6 +4,8 @@ using Xunit;
namespace MonoGame.Extended.Collisions.Tests
{
+ using MonoGame.Extended.Collisions.Layers;
+
///
/// Test collision of actors with various shapes.
///
@@ -376,6 +378,16 @@ namespace MonoGame.Extended.Collisions.Tests
Assert.True(dynamicActor.IsColliding);
}
+ [Fact]
+ public void InsertActor_ThrowsUndefinedLayerException_IfThereIsNoLayerDefined()
+ {
+ var sut = new CollisionComponent();
+
+ var act = () => sut.Insert(new CollisionIndicatingActor(RectangleF.Empty));
+
+ Assert.Throws(act);
+ }
+
private class CollisionIndicatingActor : ICollisionActor
{
private RectangleF _bounds;