Esempio n. 1
0
        protected override CourseCreationWizard Given()
        {
            GlobalEditorHandler.SetStrategy(new EmptyTestStrategy());

            CourseAssetManager.Delete(courseName);

            foreach (CourseCreationWizard window in Resources.FindObjectsOfTypeAll <CourseCreationWizard>())
            {
                window.Close();
            }

            CourseCreationWizard wizard = ScriptableObject.CreateInstance <CourseCreationWizard>();

            wizard.ShowUtility();
            wizard.maxSize  = wizard.minSize;
            wizard.position = new Rect(Vector2.zero, wizard.minSize);
            return(wizard);
        }
Esempio n. 2
0
        /// <inheritdoc />
        protected override StepWindow Given()
        {
            if (EditorUtils.IsWindowOpened <StepWindow>())
            {
                EditorWindow.GetWindow <StepWindow>().Close();
            }

            GlobalEditorHandler.SetStrategy(new EmptyTestStrategy());

            EditorUtils.ResetKeyboardElementFocus();
            StepWindow window = ScriptableObject.CreateInstance <StepWindow>();

            window.ShowUtility();
            window.position = new Rect(Vector2.zero, window.position.size);
            window.minSize  = window.maxSize = new Vector2(512f, 512f);
            window.SetStep(StepFactory.Instance.Create("Test"));
            window.Focus();

            return(window);
        }
Esempio n. 3
0
        /// <inheritdoc />
        protected override CourseWindow Given()
        {
            if (EditorUtils.IsWindowOpened <CourseWindow>())
            {
                EditorWindow.GetWindow <CourseWindow>().Close();
            }

            GlobalEditorHandler.SetStrategy(new EmptyTestStrategy());

            EditorUtils.ResetKeyboardElementFocus();
            CourseWindow window = ScriptableObject.CreateInstance <CourseWindow>();

            window.ShowUtility();
            window.position = new Rect(Vector2.zero, window.position.size);
            window.minSize  = window.maxSize = new Vector2(1024f, 512f);
            window.SetCourse(new Course("Test", new Chapter("Test", null)));
            window.Focus();

            return(window);
        }