From f8111857db280e91f506296f309d90f4c1843c26 Mon Sep 17 00:00:00 2001 From: dbuechel Date: Wed, 26 Jun 2019 10:19:19 +0200 Subject: [PATCH] SEBWIN-301: Added unit test project for lockdown assembly. --- .../Properties/AssemblyInfo.cs | 17 ++++ .../SafeExamBrowser.Lockdown.UnitTests.csproj | 85 +++++++++++++++++++ .../packages.config | 5 ++ .../Properties/AssemblyInfo.cs | 2 + SafeExamBrowser.sln | 10 +++ appveyor.yml | 1 + 6 files changed, 120 insertions(+) create mode 100644 SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs create mode 100644 SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj create mode 100644 SafeExamBrowser.Lockdown.UnitTests/packages.config diff --git a/SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs b/SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..36e70600 --- /dev/null +++ b/SafeExamBrowser.Lockdown.UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,17 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("SafeExamBrowser.Lockdown.UnitTests")] +[assembly: AssemblyDescription("Safe Exam Browser")] +[assembly: AssemblyCompany("ETH Zürich")] +[assembly: AssemblyProduct("SafeExamBrowser.Lockdown.UnitTests")] +[assembly: AssemblyCopyright("Copyright © 2019 ETH Zürich, Educational Development and Technology (LET)")] + +[assembly: ComVisible(false)] + +[assembly: Guid("90378e33-3898-4a7c-be2d-2f3efcfc4bb5")] + +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj b/SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj new file mode 100644 index 00000000..ceeaca29 --- /dev/null +++ b/SafeExamBrowser.Lockdown.UnitTests/SafeExamBrowser.Lockdown.UnitTests.csproj @@ -0,0 +1,85 @@ + + + + + + Debug + AnyCPU + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5} + Library + Properties + SafeExamBrowser.Lockdown.UnitTests + SafeExamBrowser.Lockdown.UnitTests + v4.7.2 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Lockdown.UnitTests/packages.config b/SafeExamBrowser.Lockdown.UnitTests/packages.config new file mode 100644 index 00000000..2f7c5a18 --- /dev/null +++ b/SafeExamBrowser.Lockdown.UnitTests/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs b/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs index ef15fc65..4d250abc 100644 --- a/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs +++ b/SafeExamBrowser.Lockdown/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -14,6 +15,7 @@ using System.Runtime.InteropServices; // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] +[assembly: InternalsVisibleTo("SafeExamBrowser.Lockdown.UnitTests")] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("386b6042-3e12-4753-9fc6-c88ea4f97030")] diff --git a/SafeExamBrowser.sln b/SafeExamBrowser.sln index 44a1df3c..b124b003 100644 --- a/SafeExamBrowser.sln +++ b/SafeExamBrowser.sln @@ -64,6 +64,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Service.Uni EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Lockdown", "SafeExamBrowser.Lockdown\SafeExamBrowser.Lockdown.csproj", "{386B6042-3E12-4753-9FC6-C88EA4F97030}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Lockdown.UnitTests", "SafeExamBrowser.Lockdown.UnitTests\SafeExamBrowser.Lockdown.UnitTests.csproj", "{90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -272,6 +274,14 @@ Global {386B6042-3E12-4753-9FC6-C88EA4F97030}.Release|Any CPU.Build.0 = Release|Any CPU {386B6042-3E12-4753-9FC6-C88EA4F97030}.Release|x86.ActiveCfg = Release|x86 {386B6042-3E12-4753-9FC6-C88EA4F97030}.Release|x86.Build.0 = Release|x86 + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Debug|x86.ActiveCfg = Debug|x86 + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Debug|x86.Build.0 = Debug|x86 + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Release|Any CPU.Build.0 = Release|Any CPU + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Release|x86.ActiveCfg = Release|x86 + {90378E33-3898-4A7C-BE2D-2F3EFCFC4BB5}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/appveyor.yml b/appveyor.yml index 725b08e4..c783124a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,6 +18,7 @@ test_script: - .\packages\OpenCover.4.7.922\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Configuration.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Configuration.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - .\packages\OpenCover.4.7.922\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Core.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Core.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - .\packages\OpenCover.4.7.922\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.I18n.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.I18n.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" + - .\packages\OpenCover.4.7.922\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Lockdown.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Lockdown.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - .\packages\OpenCover.4.7.922\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Logging.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Logging.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - .\packages\OpenCover.4.7.922\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Runtime.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Runtime.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml" - .\packages\OpenCover.4.7.922\tools\OpenCover.Console.exe -register:user -target:"vstest.console.exe" -targetargs:"/logger:Appveyor .\SafeExamBrowser.Service.UnitTests\bin\%PLATFORM%\%CONFIGURATION%\SafeExamBrowser.Service.UnitTests.dll" -filter:"+[*]* -[*.UnitTests]* -[*Moq*]*" -mergebyhash -mergeoutput -output:"coverage.xml"