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); }
public void Display(Octets octets) { var display = _displayDispatcher.Display(this, octets); if (display == false) { NewLine(octets.ToString()); } }