Ejemplo n.º 1
0
        public void Setup()
        {
            Assert.That(Application.isPlaying,
                        "UniDiIntegrationTestFixture is meant to be used for play mode tests only.  Please ensure your test file '{0}' is outside of the editor folder and try again.", GetType());

            UniDiTestUtil.DestroyEverythingExceptTestRunner(true);
            StaticContext.Clear();
        }
Ejemplo n.º 2
0
        void DestroyEverythingInternal(bool immediate)
        {
            if (_sceneContext != null)
            {
                // We need to use DestroyImmediate so that all the IDisposable's etc get processed immediately before
                // next test runs
                if (immediate)
                {
                    GameObject.DestroyImmediate(_sceneContext.gameObject);
                }
                else
                {
                    GameObject.Destroy(_sceneContext.gameObject);
                }

                _sceneContext = null;
            }

            UniDiTestUtil.DestroyEverythingExceptTestRunner(immediate);
            StaticContext.Clear();
        }
Ejemplo n.º 3
0
 public virtual void SetUp()
 {
     StaticContext.Clear();
     SetMemberDefaults();
 }
Ejemplo n.º 4
0
 public virtual void Teardown()
 {
     UniDiTestUtil.DestroyEverythingExceptTestRunner(true);
     StaticContext.Clear();
     SetMemberDefaults();
 }
Ejemplo n.º 5
0
 public virtual void Teardown()
 {
     StaticContext.Clear();
 }