Exemplo n.º 1
0
 public static void BaseComponent_ResolveChildren_NoChildrenTest()
 {
     using (var component = new WithChildrenComponent()) {
         component.Initialize(Substitute.For <IScene>());
         Assert.False(component.HasTestComponent);
         Assert.IsNull(component.EmptyComponent);
     }
 }
Exemplo n.º 2
0
        public static void BaseComponent_ResolveChildren_HasChildrenTest()
        {
            using (var component = new WithChildrenComponent()) {
                component.AddChild <EmptyComponent>();
                component.AddChild <TestComponent>();

                component.Initialize(Substitute.For <IScene>());
                Assert.True(component.HasTestComponent);
                Assert.IsNotNull(component.EmptyComponent);
            }
        }