public void ToPositionMustBeGreaterThanFromPosition(decimal from, decimal to) { var data = new RequestedRoadSegmentLaneAttribute { FromPosition = from, ToPosition = to }; Validator.ShouldHaveValidationErrorFor(c => c.ToPosition, data); }
public void VerifyValid() { var positionGenerator = new Generator <decimal>(Fixture); var from = positionGenerator.First(candidate => candidate >= 0.0m); var data = new RequestedRoadSegmentLaneAttribute { AttributeId = Fixture.Create <AttributeId>(), FromPosition = from, ToPosition = positionGenerator.First(candidate => candidate > from), Count = Fixture.Create <RoadSegmentLaneCount>(), Direction = Fixture.Create <RoadSegmentLaneDirection>() }; Validator.ValidateAndThrow(data); }