mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 14:02:39 +00:00
route tests
This commit is contained in:
@@ -43,7 +43,6 @@ export type Path = {
|
||||
export type Point = {
|
||||
lon: number;
|
||||
lat: number;
|
||||
context?: PointContext;
|
||||
};
|
||||
|
||||
export type SpacetimePoint = Point & {
|
||||
@@ -56,14 +55,6 @@ export enum Role {
|
||||
PASSENGER = 'PASSENGER',
|
||||
}
|
||||
|
||||
export enum PointContext {
|
||||
HOUSE_NUMBER = 'HOUSE_NUMBER',
|
||||
STREET_ADDRESS = 'STREET_ADDRESS',
|
||||
LOCALITY = 'LOCALITY',
|
||||
VENUE = 'VENUE',
|
||||
OTHER = 'OTHER',
|
||||
}
|
||||
|
||||
export enum PathType {
|
||||
GENERIC = 'generic',
|
||||
DRIVER = 'driver',
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
ArgumentOutOfRangeException,
|
||||
ValueObject,
|
||||
} from '@mobicoop/ddd-library';
|
||||
import { PointContext } from '../route.types';
|
||||
|
||||
/** Note:
|
||||
* Value Objects with multiple properties can contain
|
||||
@@ -14,7 +13,6 @@ export interface WaypointProps {
|
||||
position: number;
|
||||
lon: number;
|
||||
lat: number;
|
||||
context?: PointContext;
|
||||
}
|
||||
|
||||
export class Waypoint extends ValueObject<WaypointProps> {
|
||||
@@ -30,10 +28,6 @@ export class Waypoint extends ValueObject<WaypointProps> {
|
||||
return this.props.lat;
|
||||
}
|
||||
|
||||
get context(): PointContext {
|
||||
return this.props.context;
|
||||
}
|
||||
|
||||
protected validate(props: WaypointProps): void {
|
||||
if (props.position < 0)
|
||||
throw new ArgumentInvalidException(
|
||||
|
||||
Reference in New Issue
Block a user