Updated to use the new target framework in project.json
This commit is contained in:
parent
0705d3a5ae
commit
9d26c40144
|
|
@ -1,4 +1,4 @@
|
||||||
using Microsoft.AspNet.Identity;
|
using Microsoft.AspNet.Identity;
|
||||||
using Microsoft.AspNet.Mvc;
|
using Microsoft.AspNet.Mvc;
|
||||||
using IdentitySample.Models;
|
using IdentitySample.Models;
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
|
|
@ -92,7 +92,7 @@ namespace IdentitySample
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
// Generate the token and send it
|
// Generate the token and send it
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), model.Number);
|
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), model.Number);
|
||||||
if (UserManager.SmsService != null)
|
if (UserManager.SmsService != null)
|
||||||
{
|
{
|
||||||
|
|
@ -165,7 +165,7 @@ namespace IdentitySample
|
||||||
{
|
{
|
||||||
// This code allows you exercise the flow without actually sending codes
|
// This code allows you exercise the flow without actually sending codes
|
||||||
// For production use please register a SMS provider in IdentityConfig and generate a code here.
|
// For production use please register a SMS provider in IdentityConfig and generate a code here.
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), phoneNumber);
|
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), phoneNumber);
|
||||||
ViewBag.Status = "For DEMO purposes only, the current code is " + code;
|
ViewBag.Status = "For DEMO purposes only, the current code is " + code;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -377,4 +377,4 @@ namespace IdentitySample
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"run": "run server.urls=http://localhost:5003"
|
"run": "run server.urls=http://localhost:5003"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net451": {
|
"aspnet50": {
|
||||||
},
|
},
|
||||||
"aspnetcore50": {
|
"aspnetcore50": {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
"System.Security.Claims" : "1.0.0-*"
|
"System.Security.Claims" : "1.0.0-*"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net45": {},
|
"aspnet50": {},
|
||||||
"aspnetcore50": {
|
"aspnetcore50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Collections": "4.0.10.0",
|
"System.Collections": "4.0.10.0",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"System.Security.Claims" : "1.0.0-*"
|
"System.Security.Claims" : "1.0.0-*"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net451": {
|
"aspnet50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Collections": "",
|
"System.Collections": "",
|
||||||
"System.Runtime": ""
|
"System.Runtime": ""
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
#endif
|
#endif
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
@ -120,7 +120,7 @@ namespace Microsoft.AspNet.Identity
|
||||||
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email"));
|
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var m = new MailAddress(email);
|
var m = new MailAddress(email);
|
||||||
|
|
@ -139,4 +139,4 @@ namespace Microsoft.AspNet.Identity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
"System.Security.Claims" : "1.0.0-*"
|
"System.Security.Claims" : "1.0.0-*"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net45": {},
|
"aspnet50": {},
|
||||||
"aspnetcore50": {
|
"aspnetcore50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Collections": "4.0.10.0",
|
"System.Collections": "4.0.10.0",
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test
|
||||||
|
|
||||||
public class HttpSignInTest
|
public class HttpSignInTest
|
||||||
{
|
{
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
//[Theory]
|
//[Theory]
|
||||||
//[InlineData(true)]
|
//[InlineData(true)]
|
||||||
//[InlineData(false)]
|
//[InlineData(false)]
|
||||||
|
|
@ -527,4 +527,4 @@ namespace Microsoft.AspNet.Identity.Authentication.Test
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
},
|
},
|
||||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net45": {
|
"aspnet50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Moq" : "4.2.1312.1622",
|
"Moq" : "4.2.1312.1622",
|
||||||
"System.Runtime": "",
|
"System.Runtime": "",
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.InMemory.Test
|
||||||
|
|
||||||
public class HttpSignInTest
|
public class HttpSignInTest
|
||||||
{
|
{
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(true)]
|
[InlineData(true)]
|
||||||
[InlineData(false)]
|
[InlineData(false)]
|
||||||
|
|
@ -63,4 +63,4 @@ namespace Microsoft.AspNet.Identity.InMemory.Test
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
},
|
},
|
||||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net45": {
|
"aspnet50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Moq" : "4.2.1312.1622",
|
"Moq" : "4.2.1312.1622",
|
||||||
"System.Collections": "",
|
"System.Collections": "",
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
},
|
},
|
||||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net451": {
|
"aspnet50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Moq" : "4.2.1312.1622",
|
"Moq" : "4.2.1312.1622",
|
||||||
"System.Collections": "",
|
"System.Collections": "",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
},
|
},
|
||||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net451": {
|
"aspnet50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Moq" : "4.2.1312.1622",
|
"Moq" : "4.2.1312.1622",
|
||||||
"System.Collections": "",
|
"System.Collections": "",
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
|
||||||
"commands": {
|
"commands": {
|
||||||
"test": "Xunit.KRunner"
|
"test": "Xunit.KRunner"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Identity.Test
|
||||||
async () => await factory.CreateAsync(new TestUser(), null));
|
async () => await factory.CreateAsync(new TestUser(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
//TODO: Mock fails in K (this works fine in net45)
|
//TODO: Mock fails in K (this works fine in net45)
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(false, false, false)]
|
[InlineData(false, false, false)]
|
||||||
|
|
@ -102,4 +102,4 @@ namespace Microsoft.AspNet.Identity.Test
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
},
|
},
|
||||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net45": {
|
"aspnet50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Moq" : "4.2.1312.1622",
|
"Moq" : "4.2.1312.1622",
|
||||||
"System.Collections": "",
|
"System.Collections": "",
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ namespace Microsoft.AspNet.Identity.Test
|
||||||
IdentityResultAssert.IsFailure(await manager.CreateAsync(user), "Email cannot be null or empty.");
|
IdentityResultAssert.IsFailure(await manager.CreateAsync(user), "Email cannot be null or empty.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET45
|
#if ASPNET50
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("@@afd")]
|
[InlineData("@@afd")]
|
||||||
[InlineData("bogus")]
|
[InlineData("bogus")]
|
||||||
|
|
@ -1564,4 +1564,4 @@ namespace Microsoft.AspNet.Identity.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue