public void StOutParseTest2() { var target = new OwpComponent(new Soba(), new NullOwpEnv ( "raw", new List <string>() { "err1" }, new List <string>() { "warn1", "warn2" } )); Assert.Equal("raw", target.Eval("[OWP out.All]")); Assert.Equal("raw", target.Eval("[OWP out]")); Assert.Equal("raw", target.Eval("[OWP out.Warnings.Raw]")); Assert.Equal("raw", target.Eval("[OWP out.Warnings]")); Assert.Equal("2", target.Eval("[OWP out.Warnings.Count]")); Assert.Equal("warn1,warn2", target.Eval("[OWP out.Warnings.Codes]")); Assert.Equal("raw", target.Eval("[OWP out.Errors.Raw]")); Assert.Equal("raw", target.Eval("[OWP out.Errors]")); Assert.Equal("1", target.Eval("[OWP out.Errors.Count]")); Assert.Equal("err1", target.Eval("[OWP out.Errors.Codes]")); }
public void StItemActivateParseTest2() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Equal(Value.From(false), target.Eval("[OWP item(\"name\").activate = false]")); Assert.Equal(Value.From(true), target.Eval("[OWP item(\"name\").activate = true]")); }
public void StLogParseTest3() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Equal(Value.Empty, target.Eval("[OWP log.Message]")); Assert.Equal(Value.Empty, target.Eval("[OWP log.Level]")); }
public void StItemActivateParseTest1() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <IncorrectNodeException>(() => Assert.Equal(Value.Empty, target.Eval("[OWP item(\"name\").activate]")) ); }
public void StItemWriteParseTest1() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <IncorrectNodeException>(() => target.Eval("[OWP item(\"name\").write(\"false\"): ]") ); }
public void StItemParseTest4() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <PMLevelException>(() => target.Eval("[OWP item(name).write(false): ]") ); }
public void StItemParseTest3() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <NotSupportedOperationException>(() => target.Eval("[OWP item(\"\").write(false): ]") ); }
public void StItemParseTest2() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <IncorrectNodeException>(() => target.Eval("[OWP item(\"name\").NotSupportedTest]") ); }
public void StLogParseTest1() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <IncorrectNodeException>(() => target.Eval("[OWP log]") ); }
public void StOutParseTest7() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <NotFoundException>(() => target.Eval($"[OWP out(\"{NullOwpEnv.MOCK_ITEM_NAME}\").Warnings.Raw]") ); }
public void StOutParseTest4() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <IncorrectNodeException>(() => target.Eval("[OWP out.NotRealPropertyTest]") ); }
public void StItemWriteParseTest3() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Equal(Value.Empty, target.Eval("[OWP item(\"name\").write(false): multi\nline\" \n 'data'.]")); Assert.Equal(Value.Empty, target.Eval("[OWP item(\"name\").write(true): multi\nline\" \n 'data'.]")); Assert.Equal(Value.Empty, target.Eval("[OWP item(\"name\").writeLine(false): multi\nline\" \n 'data'.]")); Assert.Equal(Value.Empty, target.Eval("[OWP item(\"name\").writeLine(true): multi\nline\" \n 'data'.]")); }
public void StOutParseTest5() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <PMLevelException>(() => target.Eval("[OWP out()]") ); Assert.Throws <PMLevelException>(() => target.Eval("[OWP out().All]") ); }
public void StOutParseTest1() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Equal(Value.Empty, target.Eval("[OWP out.All]")); Assert.Equal(Value.Empty, target.Eval("[OWP out]")); Assert.Equal(Value.Empty, target.Eval("[OWP out.Warnings.Raw]")); Assert.Equal(Value.Empty, target.Eval("[OWP out.Warnings]")); Assert.Equal("0", target.Eval("[OWP out.Warnings.Count]")); Assert.Equal(Value.Empty, target.Eval("[OWP out.Warnings.Codes]")); Assert.Equal(Value.Empty, target.Eval("[OWP out.Errors.Raw]")); Assert.Equal(Value.Empty, target.Eval("[OWP out.Errors]")); Assert.Equal("0", target.Eval("[OWP out.Errors.Count]")); Assert.Equal(Value.Empty, target.Eval("[OWP out.Errors.Codes]")); }
public void ParseTest1() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <IncorrectSyntaxException>(() => target.Eval("#[OWP out.Warnings.Count]") ); Assert.Throws <IncorrectSyntaxException>(() => target.Eval("OWP out.Warnings.Count") ); Assert.Throws <SubtypeNotFoundException>(() => target.Eval("[OWP NotFound.Test]") ); }
public void StOutParseTest6() { var target = new OwpComponent(new Soba(), new NullOwpEnv()); Assert.Throws <NotSupportedOperationException>(() => target.Eval("[OWP out.All.NotRealProperty]") ); Assert.Throws <NotSupportedOperationException>(() => target.Eval("[OWP out.Warnings.NotRealProperty]") ); Assert.Throws <NotSupportedOperationException>(() => target.Eval("[OWP out.Warnings.Codes.NotRealProperty]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[OWP out.NotRealProperty]") ); Assert.Throws <NotSupportedOperationException>(() => target.Eval("[OWP out.Warnings.Count = 12]") ); }