protect
This commit is contained in:
39
test/isn.tests/UnitTest1.cs
Normal file
39
test/isn.tests/UnitTest1.cs
Normal file
@ -0,0 +1,39 @@
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user