public void Setup() { _networkMock = new Mock <INetworkHandler>(); _wideAreaNetworkService = new WideAreaNetworkService(_networkMock.Object); _nodesCount = 5; var nodes = Enumerable .Range(0, _nodesCount) .Select(i => new Node { Id = (uint)i, LinkedNodesId = new SortedSet <uint>() }) .ToArray(); _networkMock.Setup(n => n.Nodes) .Returns(nodes); _networkMock.Setup(n => n.GetNodeById(It.IsAny <uint>())) .Returns((uint nodeId) => nodes.FirstOrDefault(n => n.Id == nodeId)); }
public WideAreaNetworkNodeDrawer(INetworkHandler network) : base(network) { _wideAreaNetworkService = new WideAreaNetworkService(network); }