public void Run_FailTest() { NotIfOp op = new NotIfOp(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 } }; NotIfOp op = new NotIfOp(main, other); bool b = op.Run(data, out string error); Assert.Equal(runResult, b); Assert.Equal(expErr, error); }