-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
17,071 additions
and
7 deletions.
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
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
4,595 changes: 4,595 additions & 0 deletions
4,595
server/src/test/resources/case-studies/monitor/16786092.xml
Large diffs are not rendered by default.
Oops, something went wrong.
8,257 changes: 8,257 additions & 0 deletions
8,257
server/src/test/resources/case-studies/monitor/16827727.xml
Large diffs are not rendered by default.
Oops, something went wrong.
4,120 changes: 4,120 additions & 0 deletions
4,120
server/src/test/resources/case-studies/monitor/16842517.xml
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
File renamed without changes
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
65 changes: 65 additions & 0 deletions
65
...src/test/scala/kpn/server/analyzer/engine/monitor/structure/Structure_73_Split_Test.scala
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,65 @@ | ||
package kpn.server.analyzer.engine.monitor.structure | ||
|
||
import kpn.core.util.UnitTest | ||
|
||
// reproduces situation in route 16786092 (EV1 Morlaix — Carhaix-Plouguer) | ||
class Structure_73_Split_Test extends UnitTest { | ||
|
||
private def setup = new StructureTestSetupBuilder() { | ||
memberWay(11, "forward", 1, 2) | ||
memberWay(12, "forward", 2, 3) | ||
memberWay(13, "forward", 3, 4) | ||
memberWay(14, "backward", 1, 5) | ||
memberWay(15, "backward", 5, 6) | ||
memberWay(16, "backward", 6, 4) | ||
memberWay(17, "", 4, 7) | ||
}.build | ||
|
||
test("reference") { | ||
setup.reference(traceEnabled = true).shouldMatchTo( | ||
Seq( | ||
"1 p n ■ loop fp ■ bp head ■ tail d forward", | ||
"2 p ■ n ■ loop fp ■ bp head tail d forward", | ||
"3 p ■ n ■ loop fp ■ bp head tail d forward", | ||
"4 p ■ n ■ loop fp bp ■ head tail d forward", | ||
"5 p ■ n ■ loop fp bp ■ head tail d forward", | ||
"6 p ■ n ■ loop fp bp ■ head tail ■ d forward", | ||
"7 p ■ n loop fp bp head tail d forward", | ||
) | ||
) | ||
} | ||
|
||
test("elements") { | ||
setup.elementGroups(traceEnabled = true).shouldMatchTo( | ||
Seq( | ||
Seq( | ||
"1>4 (Down)", | ||
"4>1 (Up)", | ||
"4>7", | ||
), | ||
) | ||
) | ||
} | ||
|
||
test("structure") { | ||
val structure = setup.structure() | ||
structure.shouldMatchTo( | ||
TestStructure( | ||
forwardPath = Some( | ||
TestStructurePath( | ||
startNodeId = 1, | ||
endNodeId = 7, | ||
nodeIds = Seq(1, 2, 3, 4, 7) | ||
) | ||
), | ||
backwardPath = Some( | ||
TestStructurePath( | ||
startNodeId = 7, | ||
endNodeId = 1, | ||
nodeIds = Seq(7, 4, 6, 5, 1) | ||
) | ||
) | ||
) | ||
) | ||
} | ||
} |