From 205ef1f9b439e229616023aad51448d349dcf505 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Thu, 3 Oct 2024 23:58:08 -0400 Subject: [PATCH] Fix compilation errors from test code changes --- .../OpenTS2/Files/Formats/DBPF/ObjectModuleCodecTest.cs | 6 +++--- .../Files/Formats/DBPF/ObjectSaveTypeTableCodecTest.cs | 6 +++--- .../Tests/OpenTS2/Files/Formats/DBPF/SimsObjectCodecTest.cs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectModuleCodecTest.cs b/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectModuleCodecTest.cs index 546a939..ae2e963 100644 --- a/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectModuleCodecTest.cs +++ b/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectModuleCodecTest.cs @@ -11,14 +11,14 @@ public class ObjectModuleCodecTest [SetUp] public void SetUp() { - TestMain.Initialize(); - _groupID = ContentProvider.Get().AddPackage("TestAssets/Codecs/ObjCodecs.package").GroupID; + TestCore.Initialize(); + _groupID = ContentManager.Instance.AddPackage("TestAssets/Codecs/ObjCodecs.package").GroupID; } [Test] public void TestSuccessfullyLoadsObjectModule() { - var objectModuleAsset = ContentProvider.Get() + var objectModuleAsset = ContentManager.Instance .GetAsset(new ResourceKey(0x1, _groupID, TypeIDs.OBJM)); Assert.That(objectModuleAsset, Is.Not.Null); diff --git a/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectSaveTypeTableCodecTest.cs b/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectSaveTypeTableCodecTest.cs index 61848b0..a4cb8d6 100644 --- a/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectSaveTypeTableCodecTest.cs +++ b/Assets/Tests/OpenTS2/Files/Formats/DBPF/ObjectSaveTypeTableCodecTest.cs @@ -11,14 +11,14 @@ public class ObjectSaveTypeTableCodecTest [SetUp] public void SetUp() { - TestMain.Initialize(); - _groupID = ContentProvider.Get().AddPackage("TestAssets/Codecs/ObjCodecs.package").GroupID; + TestCore.Initialize(); + _groupID = ContentManager.Instance.AddPackage("TestAssets/Codecs/ObjCodecs.package").GroupID; } [Test] public void TestSuccessfullyLoadsSaveTypeTable() { - var tableAsset = ContentProvider.Get() + var tableAsset = ContentManager.Instance .GetAsset(new ResourceKey(0x0, _groupID, TypeIDs.OBJ_SAVE_TYPE_TABLE)); Assert.That(tableAsset, Is.Not.Null); diff --git a/Assets/Tests/OpenTS2/Files/Formats/DBPF/SimsObjectCodecTest.cs b/Assets/Tests/OpenTS2/Files/Formats/DBPF/SimsObjectCodecTest.cs index f26c8ca..e96cce6 100644 --- a/Assets/Tests/OpenTS2/Files/Formats/DBPF/SimsObjectCodecTest.cs +++ b/Assets/Tests/OpenTS2/Files/Formats/DBPF/SimsObjectCodecTest.cs @@ -12,14 +12,14 @@ public class SimsObjectCodecTest [SetUp] public void SetUp() { - TestMain.Initialize(); - _groupID = ContentProvider.Get().AddPackage("TestAssets/Codecs/ObjCodecs.package").GroupID; + TestCore.Initialize(); + _groupID = ContentManager.Instance.AddPackage("TestAssets/Codecs/ObjCodecs.package").GroupID; } [Test] public void TestSuccessfullyLoadsSimsObject() { - var objectAsset = ContentProvider.Get().GetAsset(new ResourceKey(0x158, _groupID, TypeIDs.XOBJ)); + var objectAsset = ContentManager.Instance.GetAsset(new ResourceKey(0x158, _groupID, TypeIDs.XOBJ)); Assert.That(objectAsset, Is.Not.Null); }