From 14470589289b284ae0bc60191c1048688d21592a Mon Sep 17 00:00:00 2001 From: lahm86 <33758420+lahm86@users.noreply.github.com> Date: Mon, 6 May 2024 18:42:50 +0100 Subject: [PATCH] Add alias test --- TRDataControlTests/IO/ImportTests.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/TRDataControlTests/IO/ImportTests.cs b/TRDataControlTests/IO/ImportTests.cs index a617cf12..219f96fd 100644 --- a/TRDataControlTests/IO/ImportTests.cs +++ b/TRDataControlTests/IO/ImportTests.cs @@ -108,6 +108,24 @@ public void TestTR5Import() Assert.IsTrue(level.Models.ContainsKey(TR5Type.Huskie)); } + [TestMethod] + [Description("Test that importing a non-specific type that has aliases fails.")] + public void TestAliasImport() + { + TR2DataImporter importer = new() + { + Level = GetTR2TestLevel(), + TypesToImport = new() { TR2Type.StickWieldingGoon1 }, + }; + + try + { + importer.Import(); + Assert.Fail(); + } + catch (TransportException) { } + } + private static void ExportTR1Model(TR1Type type, TRBlobType blobType) { TR1Level level = GetTR1TestLevel();