...
This commit is contained in:
@ -1,17 +0,0 @@
|
||||
using static isn.tests.Tests;
|
||||
|
||||
namespace isn.tests
|
||||
{
|
||||
internal class Engine : INeedEngine
|
||||
{
|
||||
public Engine()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public object Parse(string code)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
namespace isn.tests
|
||||
{
|
||||
internal interface IBody
|
||||
{
|
||||
/// <summary>
|
||||
/// The mult
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
T Action<T>(T v);
|
||||
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
namespace isn.tests
|
||||
{
|
||||
internal interface IRing : IBody
|
||||
{
|
||||
|
||||
|
||||
IRing Add(IRing other);
|
||||
IRing Mult<TBody>(TBody v);
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
namespace isn.tests
|
||||
{
|
||||
internal class Body : IBody
|
||||
{
|
||||
static public Ring One { get ;}
|
||||
|
||||
public T Action<T>(T v)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
internal class Ring : Body, IRing
|
||||
{
|
||||
public static IRing Zero => throw new System.NotImplementedException();
|
||||
|
||||
|
||||
public IRing Add(IRing unity)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public IRing Mult<TBody>(TBody v)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,25 +1,14 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace isn.tests
|
||||
{
|
||||
public class Tests
|
||||
{
|
||||
private const int V = 0;
|
||||
private const int V1 = 1;
|
||||
|
||||
public interface INeedEngine
|
||||
{
|
||||
object Parse(string code);
|
||||
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
}
|
||||
private DataRow dataRow;
|
||||
|
||||
[Test]
|
||||
public void HAveADefaultDataProtector()
|
||||
@ -32,43 +21,19 @@ namespace isn.tests
|
||||
Assert.AreEqual(pass, unprotectedpass);
|
||||
Assert.Pass($"Good jod man! (decoding {protectedpass})");
|
||||
}
|
||||
|
||||
// Not a [Test]
|
||||
public void TestParseCplus()
|
||||
{
|
||||
INeedEngine engine = new Engine();
|
||||
IRing c = new Ring();
|
||||
Assert.Equals((INeedEngine)engine.Parse("c+"), c.Add(Ring.One));
|
||||
}
|
||||
|
||||
|
||||
public void AssertIRingIsABody()
|
||||
{
|
||||
Ring c = new Ring();
|
||||
Ring one = Ring.One;
|
||||
Assert.True(c.Mult(one).Equals(c));
|
||||
}
|
||||
|
||||
public void AssertIRingIsARing()
|
||||
{
|
||||
AssertIRingIsABody();
|
||||
Ring c = new Ring();
|
||||
IRing zero = Ring.Zero;
|
||||
Assert.True(c.Add(zero).Equals(c));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AssertReadInput()
|
||||
public void Test()
|
||||
{
|
||||
var oldOut = Console.Out;
|
||||
StringBuilder censoredTxt = new StringBuilder();
|
||||
var newOut = new StringWriter(censoredTxt);
|
||||
Console.SetOut(newOut);
|
||||
Console.WriteLine("~~censored~~");
|
||||
Console.SetOut(oldOut);
|
||||
Console.Write("Hello ");
|
||||
Console.Write(censoredTxt);
|
||||
}
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>net6</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
Reference in New Issue
Block a user