コード例 #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();
        }
コード例 #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();
        }
コード例 #3
0
 public virtual void SetUp()
 {
     StaticContext.Clear();
     SetMemberDefaults();
 }
コード例 #4
0
 public virtual void Teardown()
 {
     UniDiTestUtil.DestroyEverythingExceptTestRunner(true);
     StaticContext.Clear();
     SetMemberDefaults();
 }
コード例 #5
0
ファイル: UniDiUnitTestFixture.cs プロジェクト: UniDi/UniDi
 public virtual void Teardown()
 {
     StaticContext.Clear();
 }