public MessageRouterTests() { _route1 = new Mock <NmeaSinkAndSource>(MockBehavior.Strict, "1"); _route2 = new Mock <NmeaSinkAndSource>(MockBehavior.Strict, "2"); _router = new MessageRouter(); _router.AddEndPoint(_route1.Object); _router.AddEndPoint(_route2.Object); }
public void RoutingCanBeConstructed() { var route1 = new Mock <NmeaSinkAndSource>(MockBehavior.Strict, "1"); var route2 = new Mock <NmeaSinkAndSource>(MockBehavior.Strict, "2"); MessageRouter mr = new MessageRouter(); Assert.Equal(2, mr.EndPoints.Count); // Already has the default internal end point and the logger mr.AddEndPoint(route1.Object); mr.AddEndPoint(route2.Object); Assert.Equal(4, mr.EndPoints.Count); }