Authentication added. Login/Logout operational.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user