Ejemplo n.º 1
0
 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)));
 }
Ejemplo n.º 2
0
        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)));
        }
Ejemplo n.º 3
0
 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()]);
     }
 }
Ejemplo n.º 4
0
        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()]);
            }
        }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
        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);
        }