public void ConversionIgnoresMissingMonoBehaviour() { LogAssert.Expect(LogType.Warning, new Regex("missing")); var entity = ConvertGameObjectHierarchy(LoadPrefab("Prefab_MissingMB"), MakeDefaultSettings()); EntitiesAssert.ContainsOnly(m_Manager, EntityMatch.Any(entity)); }
public void SingleGameObject_RecordsCreatingDstEntity() { var go = CreateGameObject(); var entity = GameObjectConversionUtility.ConvertGameObjectHierarchy(go, m_Settings); EntitiesAssert.ContainsOnly(m_Manager, EntityMatch.Any(entity)); Assert.That(m_Events, Has.Length.EqualTo(1)); Assert.That(m_Events.EventsOfType <Entity>(), Is.EqualTo(new[] { JournalDataDebug.Create(go.GetInstanceID(), entity) })); }
public void ErrorDuringSelfConversion_RecordsError() { var go = CreateGameObject(); go.AddComponent <JournalTestAuthoring>().ShouldError = true; var entity = GameObjectConversionUtility.ConvertGameObjectHierarchy(go, m_Settings); EntitiesAssert.ContainsOnly(m_Manager, EntityMatch.Any(entity)); Assert.That(m_Events.EventsOfType <LogEventData>(), Is.EqualTo(new[] { JournalDataDebug.Create(go.GetInstanceID(), new LogEventData { Type = LogType.Error, Message = "JournalTestAuthoring.Convert error" }) })); LogAssert.Expect(LogType.Error, "JournalTestAuthoring.Convert error"); }