Entity2DTests CannotAddTheSameTypeOfComponentTwice Method Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Tests
Assembly: DeltaEngine.Rendering2D.Tests (in DeltaEngine.Rendering2D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void CannotAddTheSameTypeOfComponentTwice()
Examples

[Test]
public void CannotAddTheSameTypeOfComponentTwice()
{
    var entity = new Entity2D(Rectangle.Zero);
    Assert.Throws<Entity.ComponentOfTheSameTypeAddedMoreThanOnce>(() => entity.Add(Rectangle.One));
}
See Also