예제 #1
0
        public void Should_increment_program_counter_by_offset_minus_two(short offset, short expected)
        {
            Mockery
            .StartingPC(100);

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

            Operation.Execute(args);

            Mockery
            .ProgramCounterEquals(expected);
        }
예제 #2
0
        public void Should_store_return_value_when_asked()
        {
            Mockery
                .StartingPC(100, true);

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

            Operation.Execute(args);

            Mockery
                .ResultDestinationRetrievedFromPC()
                .ResultStored(AnyValue);
        }
예제 #3
0
        public void Should_not_store_when_routine_does_not_store()
        {
            Mockery
                .StartingPC(100);

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

            Operation.Execute(args);

            Mockery
                .NoResultDestinationRetrieved()
                .NoResultWasStored();
        }