Skip to content

Commit f83db84

Browse files
authored
Merge pull request #49 from geeklearningio/release/1.3.0
Release/1.3.0
2 parents 69fb760 + 59cf5f7 commit f83db84

File tree

10 files changed

+51
-41
lines changed

10 files changed

+51
-41
lines changed

sample/Sample.Test.Splecflow/Api/GetBlogs/GetBlogs.feature.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sample/Sample.Test.Splecflow/Mvc/CreateBlog/CreateBlog.feature.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sample/Sample.Test.Splecflow/Mvc/GetBlogs/GetBlogs.feature.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sample/Sample.Test.Splecflow/Sample.Test.Splecflow.csproj

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
<!--<RuntimeIdentifier>win7-x86</RuntimeIdentifier>-->
65
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
76
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
87
</PropertyGroup>
@@ -13,21 +12,21 @@
1312
</ItemGroup>
1413

1514
<ItemGroup>
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
17-
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
18-
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
19-
<PackageReference Include="SpecFlow" Version="2.2.0" />
20-
<PackageReference Include="SpecFlow.NetCore" Version="1.0.0-rc8" />
21-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
16+
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0" />
17+
<PackageReference Include="MSTest.TestFramework" Version="1.2.0" />
18+
<PackageReference Include="SpecFlow" Version="2.2.1" />
19+
<PackageReference Include="SpecFlow.NetCore" Version="1.2.0" />
20+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.1" />
2221
</ItemGroup>
2322

2423
<ItemGroup>
2524
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
2625
</ItemGroup>
2726

28-
<Target Name="PrecompileScript" BeforeTargets="BeforeBuild">
29-
<Exec Command="dotnet SpecFlow.NetCore" />
30-
</Target>
27+
<Target Name="PrecompileScript" BeforeTargets="BeforeBuild">
28+
<Exec Command="dotnet SpecFlow.NetCore --test-framework mstest --specflow-path $(USERPROFILE)\.nuget\packages\SpecFlow\2.2.1\tools\specflow.exe" />
29+
</Target>
3130

3231
<ItemGroup>
3332
<DotNetCliToolReference Include="SpecFlow.NetCore" Version="1.0.0-rc8" />

sample/Sample.Test/Sample.Test.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
14-
<PackageReference Include="MSTest.TestAdapter" Version="1.1.18" />
15-
<PackageReference Include="MSTest.TestFramework" Version="1.1.18" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
14+
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0" />
15+
<PackageReference Include="MSTest.TestFramework" Version="1.2.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

sample/Sample.Web/Sample.Web.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</ItemGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
12+
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

src/GeekLearning.Testavior.Configuration/GeekLearning.Testavior.Configuration.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.0" />
19-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.0" />
18+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.1" />
19+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.1" />
2020
</ItemGroup>
2121

2222
</Project>
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
namespace GeekLearning.Testavior.Authentication
22
{
33
using Microsoft.AspNetCore.Authentication;
4-
using Microsoft.Extensions.DependencyInjection;
5-
using Microsoft.Extensions.DependencyInjection.Extensions;
6-
using Microsoft.Extensions.Options;
74
using System;
85

96
public static class TestAuthenticationExtensions
@@ -12,5 +9,15 @@ public static AuthenticationBuilder AddTestAuthentication(this AuthenticationBui
129
{
1310
return builder.AddScheme<TestAuthenticationOptions, TestAuthenticationHandler>(authenticationScheme, displayName, configureOptions);
1411
}
12+
13+
public static AuthenticationBuilder AddTestAuthentication(this AuthenticationBuilder builder, string[] authenticationSchemes, string displayName, Action<TestAuthenticationOptions> configureOptions)
14+
{
15+
foreach (var authenticationScheme in authenticationSchemes)
16+
{
17+
builder = builder.AddScheme<TestAuthenticationOptions, TestAuthenticationHandler>(authenticationScheme, displayName, configureOptions);
18+
}
19+
20+
return builder;
21+
}
1522
}
1623
}

src/GeekLearning.Testavior/Environment/TestStartupConfigurationService.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
using Microsoft.Extensions.Configuration;
1010
using Microsoft.Extensions.DependencyInjection;
1111
using Microsoft.Extensions.Logging;
12-
using Microsoft.Extensions.Options;
1312
using Mvc;
1413
using System;
14+
using System.Linq;
1515
using System.Security.Claims;
1616

1717
public class TestStartupConfigurationService<TDbContext> : IStartupConfigurationService
@@ -69,14 +69,18 @@ protected virtual void ConfigureStore(IServiceCollection services)
6969
services.AddDbContext<TDbContext>(options => options.UseSqlite(connection));
7070
}
7171

72-
protected virtual void ConfigureAuthentication(IServiceCollection services, string authenticationDefaultScheme = "Test")
72+
protected virtual void ConfigureAuthentication(IServiceCollection services, params string[] authenticationDefaultSchemes)
7373
{
74+
if (authenticationDefaultSchemes?.Any() != true)
75+
{
76+
authenticationDefaultSchemes = new string[] { "Test" };
77+
}
78+
7479
services.AddAuthentication(o =>
7580
{
76-
o.DefaultAuthenticateScheme = authenticationDefaultScheme;
77-
o.DefaultChallengeScheme = authenticationDefaultScheme;
81+
o.DefaultScheme = authenticationDefaultSchemes.First();
7882
})
79-
.AddTestAuthentication(authenticationDefaultScheme, "Test Authentication Scheme", o =>
83+
.AddTestAuthentication(authenticationDefaultSchemes, "Test Authentication Scheme", o =>
8084
{
8185
o.Identity = ConfigureIdentity();
8286
});

src/GeekLearning.Testavior/GeekLearning.Testavior.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.0.0" />
23-
<PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="2.0.0" />
24-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.0" />
25-
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.0.0" />
26-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" />
22+
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.0.1" />
23+
<PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="2.0.1" />
24+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.1" />
25+
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.0.1" />
26+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.1" />
2727
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
2828
</ItemGroup>
2929

0 commit comments

Comments
 (0)