예제 #1
0
        public void TestGetSingleEntityWithAll_TryToGetSingleEntity_ReturnsThatEntity()
        {
            for (int i = 0; i < 2; ++i)
            {
                mWorldContext.CreateEntity("JunkEntity");
            }

            IEntity expectedEntity = mWorldContext.GetEntityById(mWorldContext.CreateEntity());

            expectedEntity.AddComponent <TTestComponent>();

            IEntity actualEntity = mWorldContext.GetSingleEntityWithAll(typeof(TTestComponent));

            Assert.AreSame(expectedEntity, actualEntity);
        }