Ejemplo n.º 1
0
        public void Goto_WhenIsNotRunning_ThrowsInvalidOperationException()
        {
            var rte = MakeRunTimeEnvironment();

            var @goto = new Goto(new Constant("100"));

            var result = @goto.Execute(rte);
        }
Ejemplo n.º 2
0
 public void GotoSetsCurrentLineToTarget()
 {
     SetupSut();
     _runEnvironment.CurrentLine = new ProgramLine(10, new List <IToken> {
         new Token("100")
     });
     _sut.Execute();
     _mockProgramRepository.Verify(mpr => mpr.GetLine(100), Times.Once);
     Assert.AreEqual(100, _runEnvironment.CurrentLine.LineNumber.Value);
     Assert.AreEqual(_targetProgramLine, _runEnvironment.CurrentLine);
 }