public void Init_Should_Apply_Entity_Channels_To_Aspect() { var expected = new[] {"one", "two", "three"}; var e = new DefaultEntity("Test", expected).CreateLabelAspect("Label", 0, 0); var aspect = new LabelAspect(); aspect.Init(e); Assert.True(aspect.Channels.All(s => expected.Contains(s))); }
public void Init_Should_Apply_Entity_Channels_To_Aspect() { var expected = new[] { "one", "two", "three" }; var e = new DefaultEntity("Test", expected).CreateLabelAspect("Label", 0, 0); var aspect = new LabelAspect(); aspect.Init(e); Assert.True(aspect.Channels.All(s => expected.Contains(s))); }
public void Init_Should_Create_Pointers_To_Entity_Components_From_Aspect() { var e = new DefaultEntity("Test", "default").CreateLabelAspect("Label", 0, 0); var aspect = new LabelAspect(); aspect.Init(e); foreach (var component in e.Components.Values) { Assert.Equal(component, aspect.Components[component.GetType()]); } }
public void Init_Should_Create_Pointers_To_Entity_Components_From_Aspect() { var e = new DefaultEntity("Test", "default").CreateLabelAspect("Label", 0, 0); var aspect = new LabelAspect(); aspect.Init(e); foreach (var component in e.Components.Values) { Assert.Equal(component, aspect.Components[component.GetType()]); } }
public void Reset_Should_Clear_Components_and_Channels() { var e = new DefaultEntity("Test", "default").CreateLabelAspect("Label", 0, 0); var aspect = new LabelAspect(); aspect.Init(e); Assert.True(aspect.Components.Count > 0); Assert.True(aspect.Channels.Count > 0); aspect.Reset(); Assert.Equal(0, aspect.Components.Count); Assert.Equal(0, aspect.Channels.Count); }
public void Reset_Should_Clear_Components_and_Channels() { var e = new DefaultEntity("Test", "default").CreateLabelAspect("Label", 0, 0); var aspect = new LabelAspect(); aspect.Init(e); Assert.True(aspect.Components.Count > 0); Assert.True(aspect.Channels.Count > 0); aspect.Reset(); Assert.Equal(0, aspect.Components.Count); Assert.Equal(0, aspect.Channels.Count); }