private void AssertHasNotComponentA(MyTestEntity e) { var components = e.GetComponents(); Assert.AreEqual(0, components.Length); var indices = e.GetComponentIndices(); Assert.AreEqual(0, indices.Length); Assert.IsFalse(e.HasComponentA()); Assert.IsFalse(e.HasComponents(_indicesA)); Assert.IsFalse(e.HasAnyComponent(_indicesA)); }
private void AssertHasComponentA(MyTestEntity e, IComponent componentA = null) { if (componentA == null) { componentA = Component.A; } Assert.AreEqual(componentA, e.GetComponentA()); var components = e.GetComponents(); Assert.AreEqual(1, components.Length); Assert.Contains(componentA, components); var indices = e.GetComponentIndices(); Assert.AreEqual(1, indices.Length); Assert.Contains(MyTestComponentsLookup.ComponentA, indices); Assert.IsTrue(e.HasComponentA()); Assert.IsTrue(e.HasComponents(_indicesA)); Assert.IsTrue(e.HasAnyComponent(_indicesA)); }
public void ValidateInitialComponentIndicesAreEmpty() { Assert.IsEmpty(_defaultEntity.GetComponentIndices()); }