Authentication added. Login/Logout operational.

This commit is contained in:
2012-12-20 21:39:13 -05:00
parent b30d3068e7
commit f129142dab
24 changed files with 640 additions and 65 deletions
+26
View File
@@ -0,0 +1,26 @@
using MileageTraker.Web.Membership;
using NUnit.Framework;
namespace Web.Tests.Membership
{
[TestFixture]
public class CryptoTests
{
[Test]
public void HashPassword_Test()
{
const string password = "1da";
var hashPassword = Crypto.HashPassword(password);
Assert.That(hashPassword, Is.Not.EqualTo(password));
}
[Test]
public void VerifyHashPassword_Test()
{
const string password = "1daFH2k1jv!3dsa";
var hashPassword = Crypto.HashPassword(password);
bool verifyHashedPassword = Crypto.VerifyHashedPassword(hashPassword, password);
Assert.IsTrue(verifyHashedPassword);
}
}
}
+1
View File
@@ -84,6 +84,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DAL\VehicleImporterTests.cs" />
<Compile Include="Membership\CryptoTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utility\AlgorithmsTests.cs" />
<Compile Include="Utility\CustomExtensionsTests.cs" />