diff --git a/test/isn.tests/Engine.cs b/test/isn.tests/Engine.cs
new file mode 100644
index 0000000..74627c5
--- /dev/null
+++ b/test/isn.tests/Engine.cs
@@ -0,0 +1,17 @@
+using static isn.tests.Tests;
+
+namespace isn.tests
+{
+ internal class Engine : INeedEngine
+ {
+ public Engine()
+ {
+
+ }
+
+ public object Parse(string code)
+ {
+ throw new System.NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/isn.tests/IBody.cs b/test/isn.tests/IBody.cs
new file mode 100644
index 0000000..2869069
--- /dev/null
+++ b/test/isn.tests/IBody.cs
@@ -0,0 +1,12 @@
+namespace isn.tests
+{
+ internal interface IBody
+ {
+ ///
+ /// The mult
+ ///
+ ///
+ T Action(T v);
+
+ }
+}
\ No newline at end of file
diff --git a/test/isn.tests/IRing.cs b/test/isn.tests/IRing.cs
new file mode 100644
index 0000000..026a637
--- /dev/null
+++ b/test/isn.tests/IRing.cs
@@ -0,0 +1,11 @@
+namespace isn.tests
+{
+ internal interface IRing : IBody
+ {
+
+
+ IRing Add(IRing other);
+ IRing Mult(TBody v);
+ }
+
+}
\ No newline at end of file
diff --git a/test/isn.tests/Ring.cs b/test/isn.tests/Ring.cs
new file mode 100644
index 0000000..0089db7
--- /dev/null
+++ b/test/isn.tests/Ring.cs
@@ -0,0 +1,29 @@
+namespace isn.tests
+{
+ internal class Body : IBody
+ {
+ static public Ring One { get ;}
+
+ public T Action(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 v)
+ {
+ throw new System.NotImplementedException();
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/test/isn.tests/UnitTest1.cs b/test/isn.tests/UnitTest1.cs
index bbce537..946718a 100644
--- a/test/isn.tests/UnitTest1.cs
+++ b/test/isn.tests/UnitTest1.cs
@@ -5,6 +5,15 @@ 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()
{
@@ -22,7 +31,7 @@ namespace isn.tests
Assert.Pass();
}
-
+
[Test]
public void Test26()
{
@@ -34,6 +43,26 @@ namespace isn.tests
Assert.AreEqual(pass, unprotectedpass);
Assert.Pass();
}
+ 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));
+ }
}
}
\ No newline at end of file