public void ParserRecognizesMemoryModeCommand2() { // --- Act var p = new MemoryCommandParser("m"); // --- Assert p.Command.ShouldBe(MemoryCommandType.MemoryMode); }
public void ParserRefusesInvalidGotoCommand() { // --- Act var p = new MemoryCommandParser("45BQ"); // --- Assert p.Command.ShouldBe(MemoryCommandType.Invalid); }
public void ParserRefusesInvalidRamBankCommand2() { // --- Act var p = new MemoryCommandParser("S8"); // --- Assert p.Command.ShouldBe(MemoryCommandType.Invalid); }
public void ParserRefusesInvalidRomCommand1() { // --- Act var p = new MemoryCommandParser("R5"); // --- Assert p.Command.ShouldBe(MemoryCommandType.Invalid); }
public void ParserRecognizesRomCommand4() { // --- Act var p = new MemoryCommandParser("R3"); // --- Assert p.Command.ShouldBe(MemoryCommandType.SetRomPage); p.Address.ShouldBe((ushort)0x03); }
public void ParserRecognizesGotoCommand3() { // --- Act var p = new MemoryCommandParser("G 45BF"); // --- Assert p.Command.ShouldBe(MemoryCommandType.Goto); p.Address.ShouldBe((ushort)0x45BF); }
public void ParserRecognizesRamBankCommand3() { // --- Act var p = new MemoryCommandParser("B7"); // --- Assert p.Command.ShouldBe(MemoryCommandType.SetRamBank); p.Address.ShouldBe((ushort)0x07); }
public void ParserRecognizesEmptyCommand() { // --- Act var p1 = new MemoryCommandParser(null); var p2 = new MemoryCommandParser(" "); // --- Assert p1.Command.ShouldBe(MemoryCommandType.None); p2.Command.ShouldBe(MemoryCommandType.None); }