public void Dispatch()
        {
            var displayDispatcher = new DisplayDispatcher(typeof(DisplayDispatcher_Test));

            displayDispatcher.DisplayMethods.Count.Should().Be(1);

            displayDispatcher.Display(this, new Octets()).Should().Be(false);

            _ethernetFrameResult.Should().Be(null);
            displayDispatcher.Display(this, new EthernetFrame()).Should().Be(true);
            _ethernetFrameResult.Should().Be("EthernetFrame");

            displayDispatcher.Display(this, new PPPFrame()).Should().Be(false);
        }
Esempio n. 2
0
 public TextDisplayer(TextWriter textWriter, DisplayDispatcher displayDispatcher)
 {
     _textWriter        = textWriter;
     _displayDispatcher = displayDispatcher;
 }