public void Should_NOT_jump_when_first_arg_less_than_or_equal_second_arg(ushort firstArg, ushort secondArg) { var args = new OperandBuilder() .WithArg(firstArg) .WithArg(secondArg) .Build(); Operation.Execute(args); Mockery.JumpedWith(false); }
public void Should_jump_when_a_value_matches_first_argument(ushort firstValue, params ushort[] toMatch) { var args = new OperandBuilder() .WithArg(firstValue) .WithArgs(toMatch) .Build(); Operation.Execute(args); Mockery.JumpedWith(true); }
public void Should_jump_when_first_arg_greater_than_second_arg(ushort firstArg, ushort secondArg) { var args = new OperandBuilder() .WithArg(firstArg) .WithArg(secondArg) .Build(); Operation.Execute(args); Mockery.JumpedWith(true); }
public void Should_not_jump_when_arg_is_non_zero() { var args = new OperandBuilder() .WithArg(1) .Build(); Operation.Execute(args); Mockery .JumpedWith(false) ; }
public void Should_NOT_jump_if_any_flags_NOT_set() { ushort bitmap = 0x0E; ushort flags = 0x0F; var args = new OperandBuilder() .WithArg(bitmap) .WithArg(flags) .Build(); Operation.Execute(args); Mockery.JumpedWith(false); }
public void Should_not_jump_if_objectA_is_NOT_child_of_objectB() { const ushort parent = 1234; const ushort notParent = 4321; Mockery.SetNextObject( new ZMachineObjectBuilder() .WithParent(parent) .Build() ); Operation.Execute(new OperandBuilder() .WithArgs(parent, notParent) .Build()); Mockery.JumpedWith(false); }
public void Should_jump_if_objectA_is_child_of_objectB() { ushort parent = 1234; Mockery.SetNextObject( new ZMachineObjectBuilder() .WithParent(parent) .Build() ); var operands = new OperandBuilder() .WithAnyArg() .WithArg(parent) .Build(); Operation.Execute(operands); Mockery.JumpedWith(true); }
public void Should_do_nothing() { Operation.Execute(null); Mockery.JumpedWith(true); }