Namespace: DeltaEngine.Tests.Entities
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void AddingTheSameEntityTwiceIsNotOk() { var entity1 = new MockEntity(); var entity2 = new MockEntity().Start<MockUpdateBehavior>(); Assert.Throws<EntitiesRunner.EntityAlreadyAdded>(() => EntitiesRunner.Current.Add(entity1)); Assert.Throws<EntitiesRunner.EntityAlreadyAdded>(() => EntitiesRunner.Current.Add(entity2)); var entity3 = new MockEntity(); Assert.Throws<EntitiesRunner.EntityAlreadyAdded>(() => EntitiesRunner.Current.Add(entity3)); }
See Also