public void PostProcessingTest1() { var soba = new Soba(); soba.Register(new StubPrioZComponent()); Assert.Equal ( Value.TRUE, soba.Eval($"#[{nameof(StubPrioZComponent)} ... ]", true) ); Assert.Equal ( Value.FALSE, soba.Eval($"#[{nameof(StubPrioZComponent)} ... ]", false) ); }
public void PriorityTest1() { var soba = new Soba(); soba.Register(new StubUserVariableComponent(soba)); soba.Register(new StubBoxComponent(soba)); Assert.Equal ( string.Empty, soba.Eval($"#[var name = #[{nameof(StubBoxComponent)} ...] ]") ); Assert.Equal ( $"[{nameof(StubBoxComponent)} ......]", soba.Eval($"#[{nameof(StubBoxComponent)} ...#[var name = 123]...]") ); }
public void PriorityTest10() { var soba = new Soba(); var prio = new TPrioAB(); soba.Register(new StubPrioBComponent(prio, true)); soba.Register(new StubPrioAComponent(prio, true)); Assert.Equal ( "A1A>[A ... = #[B ...] ]<A", soba.Eval("#[A ... = #[B ...] ]") ); }
public void PriorityTest3() { var soba = new Soba(); var prio = new TPrioAB(); soba.Register(new StubPrioBComponent(prio, false)); soba.Register(new StubPrioAComponent(prio, false)); Assert.Equal ( "A2A>[A ... = B1B>[B ...]<B ]<A", soba.Eval("#[A ... = #[B ...] ]") ); }