using Irony.Interpreter; using irules.core; namespace test.core; public class ClauseTests : GrammarTester { public ClauseTests() : base() { } [Fact] public void TestA() { AssertParsed("A"); } [Fact] public void TestNotA() { AssertParsed("^A"); } [Fact] public void TestAandB() { AssertParsed("A&B"); } [Fact] public void TestAorB() { AssertParsed("A|B"); } [Fact] public void TestAorNotB() { AssertParsed("A|^B"); } [Fact] public void TestAandNotB() { AssertParsed("A&^B"); } [Fact] public void TestNotAandNotB() { AssertParsed("^A&^B"); } [Fact] public void TestSyntactError() { var ex = Assert.Throws(()=> Parse("B+A")); Assert.Equal(0, ex.Location.Line); Assert.Equal(1, ex.Location.Column); } }