Skip to content

Commit

Permalink
Issue 1102, 4413, 1083, 1096
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Dec 8, 2023
1 parent 02436b0 commit 85e6edb
Show file tree
Hide file tree
Showing 11 changed files with 244 additions and 7 deletions.
20 changes: 20 additions & 0 deletions Issue1083/Issue1083.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="NUnit.Analyzers" Version="3.6.1" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions Issue1083/Issue1083.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33815.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Issue1083", "Issue1083.csproj", "{73BDF939-265D-4372-B7DD-239D1887DFB9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{73BDF939-265D-4372-B7DD-239D1887DFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73BDF939-265D-4372-B7DD-239D1887DFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73BDF939-265D-4372-B7DD-239D1887DFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73BDF939-265D-4372-B7DD-239D1887DFB9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {699BB14C-ABD8-4553-B38C-4E9DA30DE503}
EndGlobalSection
EndGlobal
15 changes: 15 additions & 0 deletions Issue1083/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Issue1083;

public class Tests
{
[SetUp]
public void Setup()
{
}

[Test]
public void Test1()
{
Assert.Pass();
}
}
1 change: 1 addition & 0 deletions Issue1083/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using NUnit.Framework;
25 changes: 25 additions & 0 deletions Issue1096/NUnitParseIssue.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33815.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NUnitParseIssue", "NUnitParseIssue.csproj", "{D43FBE88-2D4A-475D-AA46-58E6470053EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D43FBE88-2D4A-475D-AA46-58E6470053EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D43FBE88-2D4A-475D-AA46-58E6470053EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D43FBE88-2D4A-475D-AA46-58E6470053EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D43FBE88-2D4A-475D-AA46-58E6470053EF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {84E63DB0-9E7D-4C26-A5E3-958393890E71}
EndGlobalSection
EndGlobal
144 changes: 144 additions & 0 deletions Issue1102/.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information, see https://docs.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2019 -->

<RunSettings>
<RunConfiguration>
<!-- See https://github.com/microsoft/vstest-docs/blob/master/docs/configure.md -->
<!-- 1. Test related settings -->
<!-- [x86] | x64: architecture of test host -->
<!--<TargetPlatform>x86</TargetPlatform>-->

<!-- Framework35 | [Framework40] | Framework45 -->
<!--<TargetFrameworkVersion>Framework40</TargetFrameworkVersion>-->

<!-- Path to Test Adapters -->
<!--<TestAdaptersPaths>%SystemDrive%\Temp\foo;%SystemDrive%\Temp\bar</TestAdaptersPaths>-->
<TreatTestAdapterErrorsAsWarnings>false</TreatTestAdapterErrorsAsWarnings>

<!-- Path relative to solution directory -->
<ResultsDirectory>.\TestResults</ResultsDirectory>

<!-- 0 = As many processes as possible, limited by number of cores on machine, 1 = Sequential (1 process), 2-> Given number of processes up to limit by number of cores on machine-->
<MaxCpuCount>1</MaxCpuCount>

<!-- TestSessionTimeout was introduced in Visual Studio 2017 version 15.5 -->
<!-- Specify timeout in milliseconds. A valid value should be >= 0. If 0, timeout will be infinity-->
<TestSessionTimeout>10000</TestSessionTimeout>

<!-- Specify a Boolean value, which defines the exit code when no tests are discovered.-->
<TreatNoTestsAsError>false</TreatNoTestsAsError>

<!-- STA | MTA default is STA for .NET Full and MTA for .NET Core-->
<!--<ExecutionThreadApartmentState>STA</ExecutionThreadApartmentState>-->

<!-- Disables in-assembly parallel execution, applies to both MSTest and NUnit -->
<DisableParallelization>false</DisableParallelization>
<DisableAppDomain>false</DisableAppDomain>
<CollectSourceInformation>true</CollectSourceInformation>

<!-- Runner related configuration -->
<BatchSize>10</BatchSize>

</RunConfiguration>

<!-- <DataCollectionRunSettings>
<DataCollectors> -->
<!-- This option can help you isolate a problematic test that causes a test host crash. Running the collector creates an output file (Sequence.xml) in TestResults, which captures the order of execution of the test before the crash. -->
<!-- See https://docs.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2022#blame-data-collector-->
<!-- <DataCollector friendlyName="blame" enabled="True">
</DataCollectors> -->
<!-- </DataCollectionRunSettings> -->

<!--
<TestRunParameters>
<Parameter name="webAppUrl" value="http://localhost" />
<Parameter name="webAppUserName" value="Admin" />
</TestRunParameters> -->

<!-- Section for loggers, see https://docs.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2019#loggerrunsettings-element
<LoggerRunSettings>
<Loggers>
<Logger friendlyName="console" enabled="True">
<Configuration>
<Verbosity>quiet</Verbosity>
</Configuration>
</Logger>
<Logger friendlyName="trx" enabled="True">
<Configuration>
<LogFileName>foo.trx</LogFileName>
</Configuration>
</Logger>
<Logger friendlyName="html" enabled="True">
<Configuration>
<LogFileName>foo.html</LogFileName>
</Configuration>
</Logger>
</Loggers>
</LoggerRunSettings>
-->


<!-- Adapter Specific sections -->

<!-- MSTest adapter -->
<MSTest>
<MapInconclusiveToFailed>false</MapInconclusiveToFailed>
<CaptureTraceOutput>true</CaptureTraceOutput>
<DeleteDeploymentDirectoryAfterTestRunIsComplete>true</DeleteDeploymentDirectoryAfterTestRunIsComplete>
<DeploymentEnabled>true</DeploymentEnabled>
<DeployTestSourceDependencies>true</DeployTestSourceDependencies>
<MapNotRunnableToFailed>false</MapNotRunnableToFailed>
<EnableBaseClassTestMethodsFromOtherAssemblies>false</EnableBaseClassTestMethodsFromOtherAssemblies>
<!-- <TestTimeout>5000</TestTimeout> -->

<!-- Uncomment and update path for assembly resolution -->
<!-- <AssemblyResolution>
<Directory path="D:\myfolder\bin\" includeSubDirectories="false"/>
</AssemblyResolution> -->
<ForcedLegacyMode>false</ForcedLegacyMode>
<!--
<SettingsFile>a .testsettings file (require ForcedLegacyMode true) </SettingsFile>
-->
</MSTest>

<!-- NUnit3 adapter, uncomment sections to set as appropriate, numeric, booleans, enums have their default values below, except RandomSeed -->
<!-- For documentation, see https://docs.nunit.org/articles/vs-test-adapter/Tips-And-Tricks.html -->
<NUnit>
<!--<BasePath>D:\Dev\NUnit\nunit3-vs-adapter\demo\NUnitTestDemo\bin\Release</BasePath>-->
<!--<PrivateBinPath>extras;more.extras</PrivateBinPath>-->
<DefaultTimeout>0</DefaultTimeout>
<!--<WorkDirectory>work</WorkDirectory>-->
<InternalTraceLevel>Off</InternalTraceLevel>
<!--<RandomSeed>1234567</RandomSeed>-->
<NumberOfTestWorkers>-1</NumberOfTestWorkers>
<Verbosity>0</Verbosity>
<!--<UseVsKeepEngineRunning>false</UseVsKeepEngineRunning>-->
<!--<ShadowCopyFiles>false</ShadowCopyFiles>-->
<!--<DefaultTestNamePattern>{m}{a}</DefaultTestNamePattern>-->
<!--<DomainUsage>Single</DomainUsage>-->
<DumpXmlTestDiscovery>false</DumpXmlTestDiscovery>
<DumpXmlTestResults>false</DumpXmlTestResults>
<ShowInternalProperties>false</ShowInternalProperties>
<!--<TestOutputXml>TestOutputXml</TestOutputXml>-->
<!--<Where></Where>-->
<!-- NUnit filter expression, see https://docs.nunit.org/articles/nunit/running-tests/Test-Selection-Language.html -->
<ConsoleOut>0</ConsoleOut>
<UseTestNameInConsoleOutput>true</UseTestNameInConsoleOutput>
<StopOnError>false</StopOnError>
<SkipNonTestAssemblies>false</SkipNonTestAssemblies>
<MapWarningTo>Skipped</MapWarningTo>
<!--Passed, Failed or Skipped-->
<DisplayName>Name</DisplayName>
<!--Name, FullName or FullNameSep-->
<FullnameSeparator>:</FullnameSeparator>
<DiscoveryMethod>Current</DiscoveryMethod>
<!--Legacy or Current-->
<AssemblySelectLimit>2000</AssemblySelectLimit>
<NewOutputXmlFileForEachRun>false</NewOutputXmlFileForEachRun>
<IncludeStackTraceForSuites>true</IncludeStackTraceForSuites>
<ExplicitMode>Strict</ExplicitMode>
<SkipExecutionWhenNoTests>false</SkipExecutionWhenNoTests>

</NUnit>
</RunSettings>

7 changes: 6 additions & 1 deletion Issue1102/Issue1102.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp", "MyApp\MyApp.csproj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.Tests.NUnit", "MyApp.Tests.NUnit\MyApp.Tests.NUnit.csproj", "{FABB63DB-A96F-46EB-8E59-8716F7C45D9A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Tests.MSTest", "MyApp.Tests.MSTest\MyApp.Tests.MSTest.csproj", "{38BF43CB-5E95-4FB5-93E0-0BD6E4C6C681}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.Tests.MSTest", "MyApp.Tests.MSTest\MyApp.Tests.MSTest.csproj", "{38BF43CB-5E95-4FB5-93E0-0BD6E4C6C681}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A35F65AB-2E9E-42D8-936E-491F366AFEED}"
ProjectSection(SolutionItems) = preProject
.runsettings = .runsettings
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 3 additions & 3 deletions Issue1102/MyApp.Tests.NUnit/MyApp.Tests.NUnit.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Issue1102/MyApp.Tests.NUnit/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public void Test1()
{
Program.Main(new string[] { });
Assert.Pass();
Assert.AreEqual(1,2);
}
}
}
3 changes: 2 additions & 1 deletion Issue4413And3936/Issue4413And3936.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
4 changes: 2 additions & 2 deletions Issue996/Issue996.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0-alpha-107" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>
Expand Down

0 comments on commit 85e6edb

Please sign in to comment.