public void Should_store_Inc_result(short value, short expected) { Mockery .VariableRetrieves(value); var args = new OperandBuilder() .WithArg(AnyVariable) .Build(); Operation.Execute(args); Mockery .ResultStored(expected); }
public void Should_store_Dec_result(ushort value, ushort expected) { Mockery .VariableRetrieves(value); var args = new OperandBuilder() .WithArg(value) .Build(); Operation.Execute(args); Mockery .ResultDestinationRetrievedFromPC() .ResultStored(expected); }
public void Should_retrieve_variable_and_store() { const ushort value = 1234; Mockery .VariableRetrieves(value); var args = new OperandBuilder() .WithArg(AnyVariable) .Build(); Operation.Execute(args); Mockery .ResultDestinationRetrievedFromPC() .ResultStored(value); }
public void Should_increment_value_and_NOT_jump() { ushort initialValue = 10; ushort comparison = 15; var args = new OperandBuilder() .WithArg(AnyValue) .WithArg(comparison) .Build(); Mockery.VariableRetrieves(initialValue); Operation.Execute(args); var expectedValue = (initialValue + 1); Mockery .ResultStored((ushort)expectedValue) .JumpedWith(false); }