コード例 #1
0
 public FullyDisconnectedRoadNodeTests()
 {
     _fixture = new Fixture();
     _fixture.CustomizePoint();
     _id       = _fixture.Create <RoadNodeId>();
     _geometry = _fixture.Create <NetTopologySuite.Geometries.Point>();
     _sut      = new RoadNode(_id, _geometry);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        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));
        }