Files
isn/test/isn.tests/UnitTest1.cs
Paul Schneider f6f3473346 protect
2021-08-15 05:32:08 +01:00

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();
}
}
}