-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add backwards compatibility for dvrp matrix and drt zone system confi…
…gs (#3294) * add backwards compatibility for dvrp matrix and drt zone system config params * fix test issue * addresses #3173 (comment)
- Loading branch information
Showing
4 changed files
with
496 additions
and
1 deletion.
There are no files selected for viewing
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
26 changes: 26 additions & 0 deletions
26
contribs/drt/src/test/java/org/matsim/contrib/drt/analysis/zonal/ReadOldConfigTest.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,26 @@ | ||
package org.matsim.contrib.drt.analysis.zonal; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import org.matsim.contrib.drt.run.MultiModeDrtConfigGroup; | ||
import org.matsim.contrib.dvrp.run.DvrpConfigGroup; | ||
import org.matsim.core.config.Config; | ||
import org.matsim.core.config.ConfigUtils; | ||
import org.matsim.core.utils.io.IOUtils; | ||
import org.matsim.examples.ExamplesUtils; | ||
|
||
import java.net.URL; | ||
|
||
/** | ||
* @author nkuehnel / MOIA | ||
*/ | ||
public class ReadOldConfigTest { | ||
|
||
@Test | ||
public void test() { | ||
URL context = ExamplesUtils.getTestScenarioURL("kelheim"); | ||
Config config = ConfigUtils.loadConfig(IOUtils.extendUrl(context, "config-with-drt_old.xml")); | ||
Assertions.assertThatNoException().isThrownBy(() -> ConfigUtils.addOrGetModule(config, MultiModeDrtConfigGroup.class)); | ||
Assertions.assertThatNoException().isThrownBy(() -> ConfigUtils.addOrGetModule(config, DvrpConfigGroup.class)); | ||
} | ||
} |
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
Oops, something went wrong.