Fixing a few things

1. Changing the SigninAsAuthenticationType to a variable to avoid failures when the value changes.
2. Adding a Scripts folder like default VS projects.
3. Adding version numbers to GAC assemblies in the test project.
4. Adding a check for pack-exclude.
This commit is contained in:
Praburaj 2014-10-09 16:11:38 -07:00
parent f35dd45ea6
commit ae91663eb7
8 changed files with 25 additions and 11 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.AspNet.Security.Facebook;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Security.Facebook;
using Microsoft.AspNet.Security.OAuth;
using MusicStore.Mocks.Common;
using System;
@ -34,7 +35,7 @@ namespace MusicStore.Mocks.Facebook
internal static async Task OnReturnEndpoint(OAuthReturnEndpointContext context)
{
if (context.Identity != null && context.SignInAsAuthenticationType == "Microsoft.AspNet.Identity.External")
if (context.Identity != null && context.SignInAsAuthenticationType == IdentityOptions.ExternalCookieAuthenticationType)
{
//This way we will know all notifications were fired.
var manageStoreClaim = context.Identity.Claims.Where(c => c.Type == "ManageStore" && c.Value == "false").FirstOrDefault();

View File

@ -1,4 +1,5 @@
using Microsoft.AspNet.Security.Google;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Security.Google;
using Microsoft.AspNet.Security.OAuth;
using MusicStore.Mocks.Common;
using System;
@ -33,7 +34,7 @@ namespace MusicStore.Mocks.Google
internal static async Task OnReturnEndpoint(OAuthReturnEndpointContext context)
{
if (context.Identity != null && context.SignInAsAuthenticationType == "Microsoft.AspNet.Identity.External")
if (context.Identity != null && context.SignInAsAuthenticationType == IdentityOptions.ExternalCookieAuthenticationType)
{
//This way we will know all notifications were fired.
var manageStoreClaim = context.Identity.Claims.Where(c => c.Type == "ManageStore" && c.Value == "false").FirstOrDefault();

View File

@ -1,4 +1,5 @@
using Microsoft.AspNet.Security.MicrosoftAccount;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Security.MicrosoftAccount;
using Microsoft.AspNet.Security.OAuth;
using MusicStore.Mocks.Common;
using System;
@ -34,7 +35,7 @@ namespace MusicStore.Mocks.MicrosoftAccount
internal static async Task OnReturnEndpoint(OAuthReturnEndpointContext context)
{
if (context.Identity != null && context.SignInAsAuthenticationType == "Microsoft.AspNet.Identity.External")
if (context.Identity != null && context.SignInAsAuthenticationType == IdentityOptions.ExternalCookieAuthenticationType)
{
//This way we will know all notifications were fired.
var manageStoreClaim = context.Identity.Claims.Where(c => c.Type == "ManageStore" && c.Value == "false").FirstOrDefault();

View File

@ -1,4 +1,5 @@
using Microsoft.AspNet.Security.Twitter;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Security.Twitter;
using MusicStore.Mocks.Common;
using System.Linq;
using System.Security.Claims;
@ -27,7 +28,7 @@ namespace MusicStore.Mocks.Twitter
internal static async Task OnReturnEndpoint(TwitterReturnEndpointContext context)
{
if (context.Identity != null && context.SignInAsAuthenticationType == "Microsoft.AspNet.Identity.External")
if (context.Identity != null && context.SignInAsAuthenticationType == IdentityOptions.ExternalCookieAuthenticationType)
{
//This way we will know all notifications were fired.
var manageStoreClaim = context.Identity.Claims.Where(c => c.Type == "ManageStore" && c.Value == "false").FirstOrDefault();

View File

@ -0,0 +1 @@
/// <autosync enabled="true" />

View File

@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Net.Http;
using Xunit;
@ -63,6 +64,14 @@ namespace E2ETests
//Static files are served?
VerifyStaticContentServed();
if (serverType != ServerType.Helios)
{
if (Directory.GetFiles(startParameters.ApplicationPath, "*.cmd", SearchOption.TopDirectoryOnly).Length > 0)
{
throw new Exception("pack-exclude parameter values are not honored");
}
}
var testCompletionTime = DateTime.Now;
Console.WriteLine("[Time]: All tests completed in '{0}' seconds", (testCompletionTime - initializationCompleteTime).TotalSeconds);
Console.WriteLine("[Time]: Total time taken for this test variation '{0}' seconds", (testCompletionTime - testStartTime).TotalSeconds);

View File

@ -13,9 +13,9 @@
"frameworks": {
"aspnet50": {
"frameworkAssemblies": {
"System.Xml": "",
"System.Data": "",
"System.Net.Http": ""
"System.Xml": "4.0.0.0",
"System.Data": "4.0.0.0",
"System.Net.Http": "4.0.0.0"
}
}
}