public void TrySetValue_FailTest()
        {
            MockOpData data = new MockOpData(FuncCallName.Pop)
            {
                _itemCount = 0,
            };

            MockSingleBase op = new MockSingleBase(0, false);
            bool           b  = op.Run(data, out string error);

            Assert.False(b);
            Assert.Equal(Err.OpNotEnoughItems, error);
        }
        public void TrySetValueTest(int i, byte[] ba)
        {
            MockSingleBase op   = new MockSingleBase(i, true);
            MockOpData     data = new MockOpData(FuncCallName.Pop)
            {
                _itemCount = 1,
                popData    = new byte[][] { ba },
            };

            bool b = op.Run(data, out string error);

            Assert.True(b, error);
            Assert.Null(error);
        }
        public void TrySetValueTest_FailTest2()
        {
            MockOpData data = new MockOpData(FuncCallName.Pop)
            {
                _itemCount           = 1,
                StrictNumberEncoding = true,
                popData = new byte[][] { new byte[] { 0, 0 } },
            };

            MockSingleBase op = new MockSingleBase(0, false);
            bool           b  = op.Run(data, out string error);

            Assert.False(b);
            Assert.Equal("Invalid number format.", error);
        }