public void VariablesTests_SetGlobalVariable() { var model = new VariablesTestsModel(); var flow = new Flow <VariablesTestsModel>(); flow.Actions.Set("MyVar1", 200).Set(m => m.Model.Price = m.Variables.Get <Decimal>("MyVar1")); flow.Execute(model); Assert.IsTrue(model.Price == 200); }
public void VariablesTests_ManipulateModelVariable() { var model = new VariablesTestsModel(); var flow = new Flow <VariablesTestsModel>(); flow.Actions.Set(m => m.Model.Price = 500).Set(m => m.Model.Price += 10.5M); flow.Execute(model); Assert.IsTrue(model.Price == 510.5M); }