public void BuildWhenCalledOnIndirectNextWordOffsetOperandBuilderSetsRegisterToRightTokenContent()
        {
            var leftToken = new HexToken { Content = "0xF" };

            var builder = new IndirectNextWordOffsetOperandBuilder(leftToken);

            var rigthToken = new RegisterToken { Content = "A" };

            var operand = builder.Build(rigthToken);

            Assert.That(operand.RegisterValue, Is.EqualTo((int)RegisterIdentifier.RegA));
        }
        public void MatchWhenCalledWhithPcRegisterReturnsTokenPosition()
        {
            var tokenMatcher = new RegisterToken();

            Assert.That(tokenMatcher.Match("PC"), Is.EqualTo("PC"));
        }
        public void BuildWhenCalledOnIndirectNextWordOffsetOperandBuilderSetsNextWordValueToTokenContentForHexValue()
        {
            var leftToken = new HexToken { Content = "0xF" };

            var builder = new IndirectNextWordOffsetOperandBuilder(leftToken);

            var rigthToken = new RegisterToken { Content = "A" };

            var operand = builder.Build(rigthToken);

            Assert.That(operand.NextWord, Is.EqualTo(15));
        }
        public void MatchWhenCalledWhithLowerCasePopReturnsTokenPosition()
        {
            var tokenMatcher = new RegisterToken();

            Assert.That(tokenMatcher.Match("pop"), Is.EqualTo("pop"));
        }