public FullyDisconnectedRoadNodeTests() { _fixture = new Fixture(); _fixture.CustomizePoint(); _id = _fixture.Create <RoadNodeId>(); _geometry = _fixture.Create <NetTopologySuite.Geometries.Point>(); _sut = new RoadNode(_id, _geometry); }
public ConnectedRoadNodeTests() { _fixture = new Fixture(); _fixture.CustomizePoint(); _id = _fixture.Create <RoadNodeId>(); _geometry = _fixture.Create <NetTopologySuite.Geometries.Point>(); _link1 = _fixture.Create <RoadSegmentId>(); _link2 = _fixture.Create <RoadSegmentId>(); _sut = new RoadNode(_id, _geometry).ConnectWith(_link1).ConnectWith(_link2); }
private RoadNetworkView With(AddRoadNode command) { var node = new RoadNode(command.Id, command.Geometry); return(new RoadNetworkView( _nodes.Add(command.Id, node), _segments, RoadNodeId.Max(command.Id, _maximumNodeId), _maximumSegmentId, _maximumGradeSeparatedJunctionId, _maximumEuropeanRoadAttributeId, _maximumNationalRoadAttributeId, _maximumNumberedRoadAttributeId, _maximumLaneAttributeId, _maximumWidthAttributeId, _maximumSurfaceAttributeId, _segmentReusableLaneAttributeIdentifiers, _segmentReusableWidthAttributeIdentifiers, _segmentReusableSurfaceAttributeIdentifiers)); }
private RoadNetworkView Given(Messages.RoadNodeAdded @event) { var id = new RoadNodeId(@event.Id); var node = new RoadNode(id, GeometryTranslator.Translate(@event.Geometry)); return(new RoadNetworkView( _nodes.Add(id, node), _segments, RoadNodeId.Max(id, _maximumNodeId), _maximumSegmentId, _maximumGradeSeparatedJunctionId, _maximumEuropeanRoadAttributeId, _maximumNationalRoadAttributeId, _maximumNumberedRoadAttributeId, _maximumLaneAttributeId, _maximumWidthAttributeId, _maximumSurfaceAttributeId, _segmentReusableLaneAttributeIdentifiers, _segmentReusableWidthAttributeIdentifiers, _segmentReusableSurfaceAttributeIdentifiers)); }
public RoadNetworkView Given(Messages.ImportedRoadNode @event) { if (@event == null) { throw new ArgumentNullException(nameof(@event)); } var id = new RoadNodeId(@event.Id); var node = new RoadNode(id, GeometryTranslator.Translate(@event.Geometry)); return(new RoadNetworkView( _nodes.Add(id, node), _segments, RoadNodeId.Max(id, _maximumNodeId), _maximumSegmentId, _maximumGradeSeparatedJunctionId, _maximumEuropeanRoadAttributeId, _maximumNationalRoadAttributeId, _maximumNumberedRoadAttributeId, _maximumLaneAttributeId, _maximumWidthAttributeId, _maximumSurfaceAttributeId, _segmentReusableLaneAttributeIdentifiers, _segmentReusableWidthAttributeIdentifiers, _segmentReusableSurfaceAttributeIdentifiers)); }