File tree Expand file tree Collapse file tree 9 files changed +27
-9
lines changed
Expand file tree Collapse file tree 9 files changed +27
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Released under the MIT License. See the [LICENSE][] File for further details.
1313## Installation
1414Install ` https ` as a global .NET tool using
1515``` bash
16- dotnet tool install --global https --version 0.2 .0-*
16+ dotnet tool install --global https --version 0.3 .0-*
1717```
1818
1919## Usage
Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ variables:
1111 shouldPublish : $[eq(variables['Build.SourceBranch'], 'refs/heads/publish')]
1212
1313steps :
14+ - task : UseDotNet@2
15+ displayName : Use .NET (global.json)
16+ inputs :
17+ packageType : ' sdk'
18+ useGlobalJson : true
19+
1420- task : DotNetCoreCLI@2
1521 displayName : Pack https
1622 condition : eq(variables.shouldPublish, true)
Original file line number Diff line number Diff line change 1+ {
2+ "sdk" : {
3+ "version" : " 5.0.100"
4+ }
5+ }
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >netcoreapp3.1 </TargetFramework >
5+ <TargetFramework >net5.0 </TargetFramework >
66 <LangVersion >preview</LangVersion >
77 </PropertyGroup >
88
99 <PropertyGroup >
10- <VersionPrefix >0.2 .0</VersionPrefix >
10+ <VersionPrefix >0.3 .0</VersionPrefix >
1111 </PropertyGroup >
1212
1313 <PropertyGroup >
Original file line number Diff line number Diff line change 44
55namespace Https . Tests
66{
7- public class CertificateTests : IClassFixture < WebHostFixture >
7+ [ Collection ( nameof ( WebHostFixture ) ) ]
8+ public class CertificateTests
89 {
910 readonly WebHostFixture _fixture ;
1011 public CertificateTests ( WebHostFixture fixture ) =>
Original file line number Diff line number Diff line change 55
66namespace Https . Tests
77{
8- public class ContentTypeTests : IClassFixture < WebHostFixture >
8+ [ Collection ( nameof ( WebHostFixture ) ) ]
9+ public class ContentTypeTests
910 {
1011 readonly WebHostFixture _fixture ;
1112 public ContentTypeTests ( WebHostFixture fixture ) =>
Original file line number Diff line number Diff line change 33
44namespace Https . Tests
55{
6- public class RedirectTests : IClassFixture < WebHostFixture >
6+ [ Collection ( nameof ( WebHostFixture ) ) ]
7+ public class RedirectTests
78 {
89 readonly WebHostFixture _fixture ;
910 public RedirectTests ( WebHostFixture fixture ) =>
Original file line number Diff line number Diff line change 33using System ;
44using System . Threading ;
55using System . Threading . Tasks ;
6+ using Xunit ;
67
78namespace Https . Tests
89{
10+ [ CollectionDefinition ( nameof ( WebHostFixture ) ) ]
11+ public class WebHostCollection : ICollectionFixture < WebHostFixture > { }
12+
913 public class WebHostFixture : IDisposable
1014 {
1115 readonly IWebHost _webHost ;
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1 </TargetFramework >
4+ <TargetFramework >net5.0 </TargetFramework >
55 <IsPackable >false</IsPackable >
66 <RootNamespace >Https.Tests</RootNamespace >
77 <LangVersion >preview</LangVersion >
1717 <PrivateAssets >all</PrivateAssets >
1818 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
1919 </PackageReference >
20- <PackageReference Include =" Microsoft.Extensions.Hosting" Version =" 3.1.6 " />
21- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.6.1 " />
20+ <PackageReference Include =" Microsoft.Extensions.Hosting" Version =" 5.0.0 " />
21+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.8.0 " />
2222 <PackageReference Include =" xunit" Version =" 2.4.1" />
2323 <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.2" >
2424 <PrivateAssets >all</PrivateAssets >
You can’t perform that action at this time.
0 commit comments