isn/test/isn.tests/UnitTest1.cs

39 lines
1 KiB
C#
Raw Normal View History

2021-08-15 05:31:38 +01:00
using System;
2022-04-09 19:53:26 +01:00
using System.Data;
2021-09-08 01:55:00 +01:00
using System.IO;
2022-04-09 19:53:26 +01:00
using System.Xml;
2021-08-15 05:31:38 +01:00
using NUnit.Framework;
namespace isn.tests
{
public class Tests
{
2022-04-09 19:53:26 +01:00
private DataRow dataRow;
2021-08-15 05:31:38 +01:00
[Test]
2021-09-08 01:55:00 +01:00
public void HAveADefaultDataProtector()
2021-08-15 05:31:38 +01:00
{
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);
2021-09-08 01:55:00 +01:00
Assert.Pass($"Good jod man! (decoding {protectedpass})");
2021-08-15 05:31:38 +01:00
}
2021-09-03 03:07:58 +01:00
2021-09-08 01:55:00 +01:00
[Test]
2022-04-09 19:53:26 +01:00
public void Test()
2021-09-08 01:55:00 +01:00
{
2022-04-09 19:53:26 +01:00
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;
2021-08-15 05:31:38 +01:00
2022-04-09 19:53:26 +01:00
dataTable.Rows.Add(dataRow);
}
2021-08-15 05:31:38 +01:00
}
}