public void Run_FailTest() { IFOp op = new IFOp(null, null); MockOpData data = new MockOpData() { _itemCount = 0 }; bool b = op.Run(data, out string error); Assert.False(b); Assert.Equal(Err.OpNotEnoughItems, error); }
public void RunTest(IOperation[] main, IOperation[] other, byte[] popData, bool checkRes, bool runResult, string expErr) { MockOpData data = new MockOpData(FuncCallName.Pop) { _itemCount = 1, conditionalBoolCheckResult = checkRes, expectedConditionalBoolBytes = popData, popData = new byte[][] { popData } }; IFOp op = new IFOp(main, other); bool b = op.Run(data, out string error); Assert.Equal(runResult, b); Assert.Equal(expErr, error); }