public void RunShouldDecrementCorrectly()
        {
            var program = new string('-', 191);
            var runner  = new BrainfuckRunner(_memoryMock, program, _readFunc, _writeAction);

            runner.Run();

            A.CallTo(() => _memoryMock.Decrement()).MustHaveHappened(Repeated.Exactly.Times(191));
        }
Example #2
0
 public void Process(IMemory memory)
 {
     memory.Decrement();
 }