39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using NUnit.Framework;
|
|
|
|
namespace isn.tests
|
|
{
|
|
public class Tests
|
|
{
|
|
[SetUp]
|
|
public void Setup()
|
|
{
|
|
}
|
|
|
|
[Test]
|
|
public void Test1()
|
|
{
|
|
string pass = "a";
|
|
isn.IDataProtector _protector = new isn.DefaultDataProtector();
|
|
string protectedpass = _protector.Protect(pass);
|
|
string unprotectedpass = _protector.UnProtect(protectedpass);
|
|
Console.WriteLine(protectedpass);
|
|
Assert.AreEqual(pass, unprotectedpass);
|
|
Assert.Pass();
|
|
}
|
|
|
|
|
|
[Test]
|
|
public void Test26()
|
|
{
|
|
string pass = "a lame and big pass";
|
|
isn.IDataProtector _protector = new isn.DefaultDataProtector();
|
|
string protectedpass = _protector.Protect(pass);
|
|
string unprotectedpass = _protector.UnProtect(protectedpass);
|
|
Console.WriteLine(protectedpass);
|
|
Assert.AreEqual(pass, unprotectedpass);
|
|
Assert.Pass();
|
|
}
|
|
|
|
}
|
|
} |