Skip to content

Commit

Permalink
Fix unit test ContentManager state carrying over... whoops.
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDuchess committed Jun 26, 2024
1 parent b943ef5 commit 8d7124f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Assets/Tests/OpenTS2/Content/ContentManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public void ChangesEditAssetTest()
TestCore.Initialize();
var contentManager = ContentManager.Instance;
contentManager.AddPackage("TestAssets/TestPackage.package");
foreach(var entry in contentManager.ContentEntries)
{
UnityEngine.Debug.Log(entry.FilePath);
}
var stringAsset = contentManager.GetAsset<StringSetAsset>(new ResourceKey(1, "testpackage", TypeIDs.STR));
Assert.IsNotNull(stringAsset);

Expand Down
5 changes: 0 additions & 5 deletions Assets/Tests/TestCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
/// </summary>
public static class TestCore
{
static bool Initialized = false;

/// <summary>
/// Initializes all singletons, systems and the game assembly.
/// </summary>
public static void Initialize()
{
if (Initialized)
return;
var settings = new Settings()
{
CustomContentEnabled = false,
Expand All @@ -35,6 +31,5 @@ public static void Initialize()
CodecAttribute.Initialize();
AssemblyHelper.InitializeLoadedAssemblies();
VMPrimitiveRegistry.Initialize();
Initialized = true;
}
}

0 comments on commit 8d7124f

Please sign in to comment.