diff --git a/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs b/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs index 1abfda99..f1ad737d 100644 --- a/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs @@ -6,6 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +using System.IO.Packaging; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using SafeExamBrowser.Client.Notifications; @@ -29,6 +30,9 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications appConfig = new Mock(); text = new Mock(); uiFactory = new Mock(); + + // Ensure that the pack scheme is known before executing the unit tests, see https://stackoverflow.com/a/6005606 + _ = PackUriHelper.UriSchemePack; } [TestMethod] diff --git a/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs b/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs index 4d2c382a..bec16f23 100644 --- a/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs +++ b/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs @@ -6,6 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +using System.IO.Packaging; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using SafeExamBrowser.Client.Notifications; @@ -29,6 +30,9 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications logger = new Mock(); text = new Mock(); uiFactory = new Mock(); + + // Ensure that the pack scheme is known before executing the unit tests, see https://stackoverflow.com/a/6005606 + _ = PackUriHelper.UriSchemePack; } [TestMethod] diff --git a/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj b/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj index 71509fed..11f0ebb9 100644 --- a/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj +++ b/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj @@ -71,6 +71,14 @@ + + ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll + True + True + + + ..\packages\System.IO.Packaging.5.0.0\lib\net46\System.IO.Packaging.dll + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll @@ -80,6 +88,7 @@ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + diff --git a/SafeExamBrowser.Client.UnitTests/packages.config b/SafeExamBrowser.Client.UnitTests/packages.config index 8a3d95b0..e2097cad 100644 --- a/SafeExamBrowser.Client.UnitTests/packages.config +++ b/SafeExamBrowser.Client.UnitTests/packages.config @@ -4,6 +4,8 @@ + +