EntityTests AddingComponentOfTheSameTypeTwiceErrors Method Delta Engine Documentation

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

public void AddingComponentOfTheSameTypeTwiceErrors()
Examples

[Test]
public void AddingComponentOfTheSameTypeTwiceErrors()
{
    entityWithTags.Add(Size.Zero);
    Assert.Throws<Entity.ComponentOfTheSameTypeAddedMoreThanOnce>(
        () => entityWithTags.Add(Size.One));
    entityWithTags.Remove<Size>();
    entityWithTags.Add(Size.One);
}
See Also