chore: import upstream snapshot with attribution
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
using NUnit.Framework;
|
||||
using MCPForUnity.Editor.Helpers;
|
||||
using MCPForUnity.Editor.Constants;
|
||||
using UnityEditor;
|
||||
|
||||
namespace MCPForUnityTests.Editor.Helpers
|
||||
{
|
||||
public class AssetPathUtilityOfflineTests
|
||||
{
|
||||
private bool _originalForceRefresh;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
_originalForceRefresh = EditorPrefs.GetBool(EditorPrefKeys.DevModeForceServerRefresh, false);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
EditorPrefs.SetBool(EditorPrefKeys.DevModeForceServerRefresh, _originalForceRefresh);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldUseUvxOffline_WhenForceRefreshEnabled_ReturnsFalse()
|
||||
{
|
||||
EditorPrefs.SetBool(EditorPrefKeys.DevModeForceServerRefresh, true);
|
||||
Assert.IsFalse(AssetPathUtility.ShouldUseUvxOffline());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldUseUvxOffline_DoesNotThrow()
|
||||
{
|
||||
EditorPrefs.SetBool(EditorPrefKeys.DevModeForceServerRefresh, false);
|
||||
Assert.DoesNotThrow(() => AssetPathUtility.ShouldUseUvxOffline());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user