39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.IO;
|
|
using System.Xml;
|
|
using NUnit.Framework;
|
|
|
|
namespace isn.tests
|
|
{
|
|
public class Tests
|
|
{
|
|
private DataRow dataRow;
|
|
|
|
[Test]
|
|
public void HAveADefaultDataProtector()
|
|
{
|
|
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($"Good jod man! (decoding {protectedpass})");
|
|
}
|
|
|
|
[Test]
|
|
public void Test()
|
|
{
|
|
System.Data.DataTable dataTable = new System.Data.DataTable();
|
|
dataTable.Columns.Add(new DataColumn("x"));
|
|
dataTable.Columns.Add(new DataColumn("y"));
|
|
dataRow = dataTable.NewRow();
|
|
dataRow[0]= 1;
|
|
dataRow[1]= 2;
|
|
|
|
dataTable.Rows.Add(dataRow);
|
|
|
|
}
|
|
}
|
|
} |