Esempio n. 1
0
        public void Contains_WithNoMatchers_Throws()
        {
            var ex = Assert.Throws <ArgumentException>(() =>
                                                       EntitiesAssert.Contains(m_Manager));

            StringAssert.Contains("Use IsEmpty", ex.Message);
        }
Esempio n. 2
0
        public void Contains_WithPartialMatch_DoesNotAssert()
        {
            var entity1 = m_Manager.CreateEntity(typeof(EcsTestData));
            var entity2 = m_Manager.CreateEntity();

            Assert.DoesNotThrow(() =>
                                EntitiesAssert.Contains(m_Manager, EntityMatch.Any(entity1)));
            Assert.DoesNotThrow(() =>
                                EntitiesAssert.Contains(m_Manager, EntityMatch.Exact <EcsTestData>()));
            Assert.DoesNotThrow(() =>
                                EntitiesAssert.Contains(m_Manager, EntityMatch.Exact(entity2)));
        }