From ae91663eb7ad1b58ce9f37d200c652093b2ae5fa Mon Sep 17 00:00:00 2001 From: Praburaj Date: Thu, 9 Oct 2014 16:11:38 -0700 Subject: [PATCH] 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. --- .../Mocks/Facebook/FacebookNotifications.cs | 5 +++-- .../Mocks/Google/GoogleNotifications.cs | 5 +++-- .../MicrosoftAccountNotifications.cs | 5 +++-- .../Mocks/Twitter/TwitterNotifications.cs | 5 +++-- src/MusicStore/Scripts/_references.js | 1 + src/MusicStore/wwwroot/Scripts/_references.js | Bin 598 -> 0 bytes test/E2ETests/PublishAndRunTests.cs | 9 +++++++++ test/E2ETests/project.json | 6 +++--- 8 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 src/MusicStore/Scripts/_references.js delete mode 100644 src/MusicStore/wwwroot/Scripts/_references.js diff --git a/src/MusicStore/Mocks/Facebook/FacebookNotifications.cs b/src/MusicStore/Mocks/Facebook/FacebookNotifications.cs index fe669d7fb3..ce6acec454 100644 --- a/src/MusicStore/Mocks/Facebook/FacebookNotifications.cs +++ b/src/MusicStore/Mocks/Facebook/FacebookNotifications.cs @@ -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(); diff --git a/src/MusicStore/Mocks/Google/GoogleNotifications.cs b/src/MusicStore/Mocks/Google/GoogleNotifications.cs index a870fd123a..9277fc7876 100644 --- a/src/MusicStore/Mocks/Google/GoogleNotifications.cs +++ b/src/MusicStore/Mocks/Google/GoogleNotifications.cs @@ -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(); diff --git a/src/MusicStore/Mocks/MicrosoftAccount/MicrosoftAccountNotifications.cs b/src/MusicStore/Mocks/MicrosoftAccount/MicrosoftAccountNotifications.cs index e6d68217c1..49d4c19779 100644 --- a/src/MusicStore/Mocks/MicrosoftAccount/MicrosoftAccountNotifications.cs +++ b/src/MusicStore/Mocks/MicrosoftAccount/MicrosoftAccountNotifications.cs @@ -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(); diff --git a/src/MusicStore/Mocks/Twitter/TwitterNotifications.cs b/src/MusicStore/Mocks/Twitter/TwitterNotifications.cs index 1ab82e77d2..5cf3b2c21b 100644 --- a/src/MusicStore/Mocks/Twitter/TwitterNotifications.cs +++ b/src/MusicStore/Mocks/Twitter/TwitterNotifications.cs @@ -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(); diff --git a/src/MusicStore/Scripts/_references.js b/src/MusicStore/Scripts/_references.js new file mode 100644 index 0000000000..3154c1b5fa --- /dev/null +++ b/src/MusicStore/Scripts/_references.js @@ -0,0 +1 @@ +/// diff --git a/src/MusicStore/wwwroot/Scripts/_references.js b/src/MusicStore/wwwroot/Scripts/_references.js deleted file mode 100644 index ef19a935a021feeb5e5cbbe61003974a253ad2ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 598 zcmcJMK@P$o5Jmsm#5*+Ztws}9>RqVC*rtj?+e8nqKIqm})ethkFz 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); diff --git a/test/E2ETests/project.json b/test/E2ETests/project.json index e204f0439b..f5f334389c 100644 --- a/test/E2ETests/project.json +++ b/test/E2ETests/project.json @@ -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" } } }