From 66dbc18c4fceb78ab20333941b5701be612cd701 Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Fri, 27 Sep 2024 09:50:57 -0700 Subject: [PATCH] replace new hashset with set.of() --- .../ext/fares/FareRuleSetTest.java | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/ext-test/java/org/opentripplanner/ext/fares/FareRuleSetTest.java b/src/ext-test/java/org/opentripplanner/ext/fares/FareRuleSetTest.java index ee1365856be..ae318b9ca21 100644 --- a/src/ext-test/java/org/opentripplanner/ext/fares/FareRuleSetTest.java +++ b/src/ext-test/java/org/opentripplanner/ext/fares/FareRuleSetTest.java @@ -72,9 +72,9 @@ void testMatchesWithNoRules() { fareRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ZERO, Duration.ZERO @@ -101,9 +101,9 @@ void testMatchesWithOriginDestination() { fareRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ZERO, Duration.ZERO @@ -113,9 +113,9 @@ void testMatchesWithOriginDestination() { fareRuleSet.matches( "B", "C", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ZERO, Duration.ZERO @@ -135,8 +135,8 @@ void testMatchesWithContains() { "A", "B", zones, - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), 0, Duration.ZERO, Duration.ZERO @@ -146,9 +146,9 @@ void testMatchesWithContains() { fareRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ZERO, Duration.ZERO @@ -167,9 +167,9 @@ void testMatchesWithRoutes() { fareRuleSet.matches( "A", "B", - new HashSet<>(), + Set.of(), routes, - new HashSet<>(), + Set.of(), 0, Duration.ZERO, Duration.ZERO @@ -179,9 +179,9 @@ void testMatchesWithRoutes() { fareRuleSet.matches( "A", "B", - new HashSet<>(), + Set.of(), Set.of(otherRouteId), - new HashSet<>(), + Set.of(), 0, Duration.ZERO, Duration.ZERO @@ -195,9 +195,9 @@ void testMatchesWithTransfers() { fareRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 1, Duration.ZERO, Duration.ZERO @@ -207,9 +207,9 @@ void testMatchesWithTransfers() { fareRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 2, Duration.ZERO, Duration.ZERO @@ -223,9 +223,9 @@ void testMatchesWithTransferDuration() { fareRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ofSeconds(7000), Duration.ZERO @@ -235,9 +235,9 @@ void testMatchesWithTransferDuration() { fareRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ofSeconds(8000), Duration.ZERO @@ -259,9 +259,9 @@ void testMatchesWithJourneyDuration() { journeyRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ZERO, Duration.ofSeconds(7000) @@ -271,9 +271,9 @@ void testMatchesWithJourneyDuration() { journeyRuleSet.matches( "A", "B", - new HashSet<>(), - new HashSet<>(), - new HashSet<>(), + Set.of(), + Set.of(), + Set.of(), 0, Duration.ZERO, Duration.ofSeconds(8000)