New Version 1.42

Moving cam replay.
Fixed the bugs.

New Version 1.42

Moving cam replay.
Fixed the bugs.

New Version 1.42

Moving cam replay,
Fixed the bugs.
This commit is contained in:
SkunkStudios 2025-01-29 09:54:37 +07:00
parent dcb7df5fd1
commit 1c033119df
7079 changed files with 186851 additions and 48991 deletions

View file

@ -0,0 +1,55 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEditor.Experimental.UIElements;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.PackageManager.UI.Tests
{
internal abstract class UITests<TWindow> where TWindow : EditorWindow
{
private TWindow Window { get; set; }
protected VisualElement Container { get { return Window.GetRootVisualContainer(); } }
protected MockOperationFactory Factory { get; private set; }
[OneTimeSetUp]
protected void OneTimeSetUp()
{
Factory = new MockOperationFactory();
OperationFactory.Instance = Factory;
Window = EditorWindow.GetWindow<TWindow>();
Window.Show();
}
[OneTimeTearDown]
protected void OneTimeTearDown()
{
OperationFactory.Reset();
Window = null;
if (TestContext.CurrentContext.Result.FailCount <= 0)
{
PackageCollection.Instance.UpdatePackageCollection(true);
}
}
protected void SetSearchPackages(IEnumerable<PackageInfo> packages)
{
Factory.SearchOperation = new MockSearchOperation(Factory, packages);
PackageCollection.Instance.FetchSearchCache(true);
}
protected void SetListPackages(IEnumerable<PackageInfo> packages)
{
Factory.Packages = packages;
PackageCollection.Instance.FetchListCache(true);
}
protected static Error MakeError(ErrorCode code, string message)
{
var error = "{\"errorCode\" : " + (uint)code + ", \"message\" : \"" + message + "\"}";
return JsonUtility.FromJson<Error>(error);
}
}
}