Beispiel #1
0
        public override void Execute(List <ushort> args)
        {
            var propAddress = args[0] - 1;
            var propInfo    = Memory.Manager.Get((ushort)propAddress);
            var dest        = Memory.GetCurrentByteAndInc();

            var len = ZProperty.GetPropertySize(propInfo);

            Memory.VariableManager.Store(dest, len);
        }
        public void Should_return_property_length()
        {
            byte propInfo = 123;
            var  expected = ZProperty.GetPropertySize(propInfo);

            Mockery
            .SetNextGet(propInfo);

            var args = new OperandBuilder()
                       .WithArg(AnyVariable)
                       .Build();

            Operation.Execute(args);

            Mockery
            .ResultStored(expected);
        }