-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test and docs for DurationModifier
- Loading branch information
1 parent
1480ddb
commit 784c433
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/ext-test/java/org/opentripplanner/ext/flex/trip/DurationModifierTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.opentripplanner.ext.flex.trip; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import java.time.Duration; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class DurationModifierTest { | ||
|
||
@Test | ||
void doesNotModify() { | ||
assertFalse(DurationModifier.NONE.modifies()); | ||
} | ||
|
||
@Test | ||
void modifies() { | ||
assertTrue(new DurationModifier(Duration.ofMinutes(1), 1.5f).modifies()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters