Upgrade to xunit 2.3.0-beta4

This commit is contained in:
Nate McMaster 2017-08-18 09:55:10 -07:00
parent 14dcbdb9dd
commit a4320ccbda
19 changed files with 79 additions and 67 deletions

View File

@ -1,23 +1,19 @@
<Project>
<Import Project="dependencies.props" />
<Import Project="..\version.xml" />
<Import Project="build\dependencies.props" />
<Import Project="version.xml" />
<PropertyGroup>
<Product>Microsoft .NET</Product>
<RepositoryUrl>https://github.com/aspnet/DotNetTools</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)build\Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Binary compatiblity is not a goal for command-line tools. -->
<EnableApiCheck>false</EnableApiCheck>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
</ItemGroup>
</Project>

2
Directory.Build.targets Normal file
View File

@ -0,0 +1,2 @@
<Project>
</Project>

View File

@ -1,18 +1,38 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26510.0
VisualStudioVersion = 15.0.26815.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{66517987-2A5A-4330-B130-207039378FD4}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Watcher.Tools", "src\Microsoft.DotNet.Watcher.Tools\Microsoft.DotNet.Watcher.Tools.csproj", "{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8321E0D1-9A47-4D2F-AED8-3AE636D44E35}"
ProjectSection(SolutionItems) = preProject
.appveyor.yml = .appveyor.yml
.editorconfig = .editorconfig
NuGet.Config = NuGet.Config
.gitattributes = .gitattributes
.gitignore = .gitignore
.travis.yml = .travis.yml
build.cmd = build.cmd
build.ps1 = build.ps1
build.sh = build.sh
CONTRIBUTING.md = CONTRIBUTING.md
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
LICENSE.txt = LICENSE.txt
NuGet.config = NuGet.config
NuGetPackageVerifier.json = NuGetPackageVerifier.json
README.md = README.md
version.xml = version.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F5B382BC-258F-46E1-AC3D-10E5CCD55134}"
ProjectSection(SolutionItems) = preProject
test\Directory.Build.props = test\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Watcher.Tools.FunctionalTests", "test\Microsoft.DotNet.Watcher.Tools.FunctionalTests\Microsoft.DotNet.Watcher.Tools.FunctionalTests.csproj", "{16BADE2F-1184-4518-8A70-B68A19D0805B}"
EndProject
@ -80,4 +100,7 @@ Global
{7B293291-26F4-47F0-9C2F-E396F35A4280} = {66517987-2A5A-4330-B130-207039378FD4}
{3A7EF01A-073B-4123-850D-DFA4701EBE5B} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {57C07F14-2EAC-44FF-A277-B9221B4B2BF7}
EndGlobalSection
EndGlobal

View File

@ -6,7 +6,8 @@
<MicrosoftBuildVersion>15.3.409</MicrosoftBuildVersion>
<NETStandardImplicitPackageVersion>2.0.0-*</NETStandardImplicitPackageVersion>
<RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0-*</RuntimeFrameworkVersion>
<TestSdkVersion>15.3.0-*</TestSdkVersion>
<XunitVersion>2.3.0-beta2-*</XunitVersion>
<TestSdkVersion>15.3.0</TestSdkVersion>
<XunitVersion>2.3.0-beta4-build3742</XunitVersion>
<XunitAnalyzersVersion>0.6.1</XunitAnalyzersVersion>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,7 @@
<Project>
<Import Project="..\Directory.Build.props" />
<ItemGroup>
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<Description>MSBuild target for generating HTTPS certificates for development cross-platform.</Description>
@ -16,5 +14,5 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildVersion)" />
</ItemGroup>
</Project>

View File

@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<LangVersion>7.1</LangVersion>
<LangVersion>latest</LangVersion>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>dotnet-watch</AssemblyName>
<OutputType>exe</OutputType>

View File

@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>dotnet-sql-cache</AssemblyName>

View File

@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>dotnet-user-secrets</AssemblyName>

View File

@ -0,0 +1,11 @@
<Project>
<Import Project="..\Directory.Build.props" />
<ItemGroup>
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
</ItemGroup>
</Project>

View File

@ -27,8 +27,8 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task
// Assert
Assert.True(result);
var certificates = GetTestCertificates();
Assert.Equal(1, certificates.Count);
Assert.Equal(1, task.Messages.Count);
Assert.Single(certificates);
Assert.Single(task.Messages);
Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]);
}
@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task
Assert.True(result);
var certificates = GetTestCertificates();
Assert.Equal(2, certificates.Count);
Assert.Equal(1, task.Messages.Count);
Assert.Single(task.Messages);
Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]);
}
@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task
Assert.True(result);
var certificates = GetTestCertificates();
Assert.Equal(2, certificates.Count);
Assert.Equal(1, task.Messages.Count);
Assert.Single(task.Messages);
Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]);
}
@ -105,8 +105,8 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task
// Assert
Assert.True(result);
var certificates = GetTestCertificates();
Assert.Equal(1, certificates.Count);
Assert.Equal(1, task.Messages.Count);
Assert.Single(certificates);
Assert.Single(task.Messages);
Assert.Equal($"A certificate with subject name '{TestSubject}' already exists. Skipping certificate generation.", task.Messages[0]);
}
@ -125,7 +125,7 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task
Assert.True(result);
var certificates = GetTestCertificates();
Assert.Equal(2, certificates.Count);
Assert.Equal(1, task.Messages.Count);
Assert.Single(task.Messages);
Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]);
}
@ -167,8 +167,10 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task
var signingRequest = new CertificateRequest(
new X500DistinguishedName(TestSubject), rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
var enhancedKeyUsage = new OidCollection();
enhancedKeyUsage.Add(new Oid("1.3.6.1.5.5.7.3.1", "Server Authentication"));
var enhancedKeyUsage = new OidCollection
{
new Oid("1.3.6.1.5.5.7.3.1", "Server Authentication")
};
signingRequest.CertificateExtensions.Add(new X509EnhancedKeyUsageExtension(enhancedKeyUsage, critical: true));
signingRequest.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment, critical: true));
signingRequest.CertificateExtensions.Add(

View File

@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
@ -10,11 +8,4 @@
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.CertificateGeneration.Task\Microsoft.AspNetCore.CertificateGeneration.Task.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
@ -120,8 +120,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
File.Move(srcFile, dstFile);
Assert.True(changedEv.WaitOne(DefaultTimeout));
Assert.True(filesChanged.Contains(srcFile));
Assert.True(filesChanged.Contains(dstFile));
Assert.Contains(srcFile, filesChanged);
Assert.Contains(dstFile, filesChanged);
}
});
}
@ -165,8 +165,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
File.WriteAllText(testFileFullPath, string.Empty);
Assert.True(changedEv.WaitOne(DefaultTimeout));
Assert.True(filesChanged.Contains(subdir));
Assert.True(filesChanged.Contains(testFileFullPath));
Assert.Contains(subdir, filesChanged);
Assert.Contains(testFileFullPath, filesChanged);
}
});
}
@ -399,10 +399,10 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
Assert.True(changedEv.WaitOne(DefaultTimeout));
Assert.True(filesChanged.Contains(f1));
Assert.True(filesChanged.Contains(f2));
Assert.True(filesChanged.Contains(f3));
Assert.True(filesChanged.Contains(subdir));
Assert.Contains(f1, filesChanged);
Assert.Contains(f2, filesChanged);
Assert.Contains(f3, filesChanged);
Assert.Contains(subdir, filesChanged);
}
});
}

View File

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
@ -27,6 +27,7 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
[InlineData(false)]
public async Task ChangeCompiledFile(bool usePollingWatcher)
{
_app.UsePollingWatcher = usePollingWatcher;
await _app.StartWatcherAsync();
var types = await _app.GetCompiledAppDefinedTypes().TimeoutAfter(DefaultTimeout);

View File

@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes>
@ -23,9 +21,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Process.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
</ItemGroup>
<Target Name="CleanTestProjects" BeforeTargets="CoreCompile">

View File

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
@ -78,7 +78,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
WorkingDirectory = SourceDirectory,
EnvironmentVariables =
{
["DOTNET_CLI_CONTEXT_VERBOSE"] = bool.TrueString
["DOTNET_CLI_CONTEXT_VERBOSE"] = bool.TrueString,
["DOTNET_USE_POLLING_FILE_WATCHER"] = UsePollingWatcher.ToString(),
},
};

View File

@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
@ -19,9 +17,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
</ItemGroup>
</Project>

View File

@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
@ -12,9 +10,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Extensions.SecretManager.Tools\Microsoft.Extensions.SecretManager.Tools.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
</ItemGroup>
</Project>