From 1eb85012af786e655090e29ab624299f05a84edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Mon, 17 Mar 2025 19:30:22 +0000 Subject: [PATCH] Improve test to call enum in another assembly - Now enum type is actually used in a local variable and not just the value. --- .../TestNFApp/TestEnumInAnotherAssembly.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MetadataProcessor.Tests/TestNFApp/TestEnumInAnotherAssembly.cs b/MetadataProcessor.Tests/TestNFApp/TestEnumInAnotherAssembly.cs index 1f1fc49e..052368bf 100644 --- a/MetadataProcessor.Tests/TestNFApp/TestEnumInAnotherAssembly.cs +++ b/MetadataProcessor.Tests/TestNFApp/TestEnumInAnotherAssembly.cs @@ -11,10 +11,11 @@ public void CallTestEnumInAnotherAssembly() { // This test checks if MDP can minimize the assembly using an enum that is defined in another assembly // and the class calling it is in a different assembly BUT in the same namespace. - var ioException = new IOException( + IOException.IOExceptionErrorCode dummyEnum = IOException.IOExceptionErrorCode.DirectoryNotFound; + + _ = new IOException( string.Empty, - (int)IOException.IOExceptionErrorCode.DirectoryNotFound); + (int)dummyEnum); } } - }