Skip to content

Commit

Permalink
Rename STOP_MODEL to SITE_REPOSITORY
Browse files Browse the repository at this point in the history
  • Loading branch information
vpaturet committed Oct 21, 2024
1 parent bee2a97 commit 029d96c
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,40 @@ public class FareModelForTest {
.of(FeedScopedId.ofNullable("F2", "other-feed-zone"))
.build();

private static final SiteRepositoryBuilder STOP_MODEL_BUILDER = SiteRepository.of();
private static final SiteRepositoryBuilder SITE_REPOSITORY_BUILDER = SiteRepository.of();

static final RegularStop AIRPORT_STOP = STOP_MODEL_BUILDER
static final RegularStop AIRPORT_STOP = SITE_REPOSITORY_BUILDER
.regularStop(id("airport"))
.withCoordinate(new WgsCoordinate(1, 1))
.addFareZones(AIRPORT_ZONE)
.withName(I18NString.of("Airport"))
.build();

static final RegularStop CITY_CENTER_A_STOP = STOP_MODEL_BUILDER
static final RegularStop CITY_CENTER_A_STOP = SITE_REPOSITORY_BUILDER
.regularStop(id("city-center-a"))
.withCoordinate(new WgsCoordinate(1, 2))
.addFareZones(CITY_CENTER_ZONE)
.withName(I18NString.of("City center: stop A"))
.build();
static final RegularStop CITY_CENTER_B_STOP = STOP_MODEL_BUILDER
static final RegularStop CITY_CENTER_B_STOP = SITE_REPOSITORY_BUILDER
.regularStop(id("city-center-b"))
.withCoordinate(new WgsCoordinate(1, 3))
.addFareZones(CITY_CENTER_ZONE)
.withName(I18NString.of("City center: stop B"))
.build();
static final RegularStop CITY_CENTER_C_STOP = STOP_MODEL_BUILDER
static final RegularStop CITY_CENTER_C_STOP = SITE_REPOSITORY_BUILDER
.regularStop(id("city-center-c"))
.withCoordinate(new WgsCoordinate(1, 4))
.addFareZones(CITY_CENTER_ZONE)
.withName(I18NString.of("City center: stop C"))
.build();
static final RegularStop SUBURB_STOP = STOP_MODEL_BUILDER
static final RegularStop SUBURB_STOP = SITE_REPOSITORY_BUILDER
.regularStop(id("suburb"))
.withCoordinate(new WgsCoordinate(1, 4))
.withName(I18NString.of("Suburb"))
.build();

static final RegularStop OTHER_FEED_STOP = STOP_MODEL_BUILDER
static final RegularStop OTHER_FEED_STOP = SITE_REPOSITORY_BUILDER
.regularStop(FeedScopedId.ofNullable("F2", "other-feed-stop"))
.withCoordinate(new WgsCoordinate(1, 5))
.withName(I18NString.of("Other feed stop"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class AreaStopsToVerticesMapperTest {
.areaStop("berlin")
.withGeometry(Polygons.BERLIN)
.build();
public static final SiteRepository STOP_MODEL = TEST_MODEL
public static final SiteRepository SITE_REPOSITORY = TEST_MODEL
.siteRepositoryBuilder()
.withAreaStop(AreaStopsToVerticesMapperTest.BERLIN_AREA_STOP)
.build();

public static final TimetableRepository TRANSIT_MODEL = new TimetableRepository(
STOP_MODEL,
SITE_REPOSITORY,
new Deduplicator()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class StopClusterMapperTest {
private static final RegularStop STOP_B = TEST_MODEL.stop("B").build();
private static final RegularStop STOP_C = TEST_MODEL.stop("C").build();
private static final List<RegularStop> STOPS = List.of(STOP_A, STOP_B, STOP_C);
private static final SiteRepository STOP_MODEL = TEST_MODEL
private static final SiteRepository SITE_REPOSITORY = TEST_MODEL
.siteRepositoryBuilder()
.withRegularStops(STOPS)
.build();
private static final TimetableRepository TRANSIT_MODEL = new TimetableRepository(
STOP_MODEL,
SITE_REPOSITORY,
new Deduplicator()
);
private static final List<StopLocation> LOCATIONS = STOPS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@ public class TransferMapperTest {

private static StationMapper STATION_MAPPER;

private static final SiteRepositoryBuilder STOP_MODEL_BUILDER = SiteRepository.of();
private static final SiteRepositoryBuilder SITE_REPOSITORY_BUILDER = SiteRepository.of();

private static final StopMapper STOP_MAPPER = new StopMapper(
TRANSLATION_HELPER,
stationId -> null,
STOP_MODEL_BUILDER
SITE_REPOSITORY_BUILDER
);
private static final BookingRuleMapper BOOKING_RULE_MAPPER = new BookingRuleMapper();

private static final LocationMapper LOCATION_MAPPER = new LocationMapper(
STOP_MODEL_BUILDER,
SITE_REPOSITORY_BUILDER,
ISSUE_STORE
);

private static final LocationGroupMapper LOCATION_GROUP_MAPPER = new LocationGroupMapper(
STOP_MAPPER,
LOCATION_MAPPER,
STOP_MODEL_BUILDER
SITE_REPOSITORY_BUILDER
);
private static StopTimeMapper STOP_TIME_MAPPER;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AddedTripBuilderTest {
private static final RegularStop STOP_B = MODEL_TEST.stop("B").build();
private static final RegularStop STOP_C = MODEL_TEST.stop("C").build();
private static final RegularStop STOP_D = MODEL_TEST.stop("D").build();
private final SiteRepository STOP_MODEL = MODEL_TEST
private final SiteRepository SITE_REPOSITORY = MODEL_TEST
.siteRepositoryBuilder()
.withRegularStop(STOP_A)
.withRegularStop(STOP_B)
Expand All @@ -78,7 +78,7 @@ class AddedTripBuilderTest {

private final Deduplicator DEDUPLICATOR = new Deduplicator();
private final TimetableRepository TRANSIT_MODEL = new TimetableRepository(
STOP_MODEL,
SITE_REPOSITORY,
DEDUPLICATOR
);
private TransitEditorService transitService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface RealtimeTestConstants {
RegularStop STOP_B2 = TEST_MODEL.stop("B2").withParentStation(STATION_B).build();
RegularStop STOP_C1 = TEST_MODEL.stop(STOP_C1_ID).withParentStation(STATION_C).build();
RegularStop STOP_D1 = TEST_MODEL.stop("D1").withParentStation(STATION_D).build();
SiteRepository STOP_MODEL = TEST_MODEL
SiteRepository SITE_REPOSITORY = TEST_MODEL
.siteRepositoryBuilder()
.withRegularStop(STOP_A1)
.withRegularStop(STOP_B1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class RealtimeTestEnvironmentBuilder implements RealtimeTestConstants {

private RealtimeTestEnvironment.SourceType sourceType;
private final TimetableRepository timetableRepository = new TimetableRepository(
STOP_MODEL,
SITE_REPOSITORY,
new Deduplicator()
);

Expand Down

0 comments on commit 029d96c

Please sign in to comment.