diff --git a/EcosApp/theme/RailwayEssential.Test.html b/EcosApp/theme/RailwayEssential.Test.html
index eadf712..6d3dd72 100644
--- a/EcosApp/theme/RailwayEssential.Test.html
+++ b/EcosApp/theme/RailwayEssential.Test.html
@@ -1 +1 @@
-
Track |
| |
Straight
10 | Straight
10 |
| | | |
Curve
11 | Curve
11 | Curve
11 | Curve
11 |
| |
DoubleCurve
12 | DoubleCurve
12 |
| | | |
Buffer
13 | Buffer
13 | Buffer
13 | Buffer
13 |
| | | |
Direction
14 | Direction
14 | Direction
14 | Direction
14 |
| |
Direction (all)
15 | Direction (all)
15 |
| |
Decoupler
16 | Decoupler
16 |
| | | |
Connector
17 | Connector
17 | Connector
17 | Connector
17 |
| | | |
Connector Curve Right
18 | Connector Curve Right
18 | Connector Curve Right
18 | Connector Curve Right
18 |
| | | |
Connector Curve Left
19 | Connector Curve Left
19 | Connector Curve Left
19 | Connector Curve Left
19 |
Switch |
| | | |
Turnout Left
50 | Turnout Left
50 | Turnout Left
50 | Turnout Left
50 |
| | | |
Turnout Right
51 | Turnout Right
51 | Turnout Right
51 | Turnout Right
51 |
| | | |
Threeway
52 | Threeway
52 | Threeway
52 | Threeway
52 |
| | | |
Twoway
53 | Twoway
53 | Twoway
53 | Twoway
53 |
| |
Crossing A
54 | Crossing A
54 |
|
Crossing B
55 |
| |
Crossing Right 0m
56 | Crossing Right 0m
56 |
| |
Crossing Left 0m
57 | Crossing Left 0m
57 |
| |
Crossing Right sr
58 | Crossing Right sr
58 |
| |
Crossing Left sr
59 | Crossing Left sr
59 |
Signal |
| | | |
Distant Signal
100 | Distant Signal
100 | Distant Signal
100 | Distant Signal
100 |
| | | |
Main Signal A
101 | Main Signal A
101 | Main Signal A
101 | Main Signal A
101 |
| | | |
Main Signal B
102 | Main Signal B
102 | Main Signal B
102 | Main Signal B
102 |
| | | |
Dwarf Signal
103 | Dwarf Signal
103 | Dwarf Signal
103 | Dwarf Signal
103 |
| | | |
Shunting Signal
104 | Shunting Signal
104 | Shunting Signal
104 | Shunting Signal
104 |
| | | |
Distant Semaphore
105 | Distant Semaphore
105 | Distant Semaphore
105 | Distant Semaphore
105 |
| | | |
Main Semaphore A
106 | Main Semaphore A
106 | Main Semaphore A
106 | Main Semaphore A
106 |
| | | |
Main Semaphore B
107 | Main Semaphore B
107 | Main Semaphore B
107 | Main Semaphore B
107 |
| | | |
Shunting Semaphore
108 | Shunting Semaphore
108 | Shunting Semaphore
108 | Shunting Semaphore
108 |
| |
Block State
109 | Block State
109 |
Block |
| |
Block
150 | Block
150 |
| |
Short Block
151 | Short Block
151 |
| |
Stage
152 | Stage
152 |
Sensor |
| |
Sensor
200 | Sensor
200 |
| | | |
Curve Sensor
201 | Curve Sensor
201 | Curve Sensor
201 | Curve Sensor
201 |
|
General Sensor
202 |
Accessory |
|
Output A
250 |
|
Output B
251 |
|
Output C
252 |
| |
Level Crossing A
253 | Level Crossing A
253 |
| |
Level Crossing B
254 | Level Crossing B
254 |
| |
Level Crossing C
255 | Level Crossing C
255 |
|
Text
1010 |
|
Building
1011 |
|
Platform
1011 |
|
Building
1012 |
|
Industry
1013 |
|
Building
1013 |
\ No newline at end of file
+Track |
| |
Straight
10 | Straight
10 |
| | | |
Curve
11 | Curve
11 | Curve
11 | Curve
11 |
| |
DoubleCurve
12 | DoubleCurve
12 |
| | | |
Buffer
13 | Buffer
13 | Buffer
13 | Buffer
13 |
| | | |
Direction
14 | Direction
14 | Direction
14 | Direction
14 |
| |
Direction (all)
15 | Direction (all)
15 |
| |
Decoupler
70 | Decoupler
70 |
| | | |
Connector
17 | Connector
17 | Connector
17 | Connector
17 |
| | | |
Connector Curve Right
18 | Connector Curve Right
18 | Connector Curve Right
18 | Connector Curve Right
18 |
| | | |
Connector Curve Left
19 | Connector Curve Left
19 | Connector Curve Left
19 | Connector Curve Left
19 |
Switch |
| | | |
Turnout Left
50 | Turnout Left
50 | Turnout Left
50 | Turnout Left
50 |
| | | |
Turnout Right
51 | Turnout Right
51 | Turnout Right
51 | Turnout Right
51 |
| | | |
Threeway
52 | Threeway
52 | Threeway
52 | Threeway
52 |
| | | |
Twoway
53 | Twoway
53 | Twoway
53 | Twoway
53 |
| |
Crossing A
54 | Crossing A
54 |
|
Crossing B
55 |
| |
Crossing Right 0m
56 | Crossing Right 0m
56 |
| |
Crossing Left 0m
57 | Crossing Left 0m
57 |
| |
Crossing Right sr
58 | Crossing Right sr
58 |
| |
Crossing Left sr
59 | Crossing Left sr
59 |
Signal |
| | | |
Distant Signal
100 | Distant Signal
100 | Distant Signal
100 | Distant Signal
100 |
| | | |
Main Signal A
101 | Main Signal A
101 | Main Signal A
101 | Main Signal A
101 |
| | | |
Main Signal B
102 | Main Signal B
102 | Main Signal B
102 | Main Signal B
102 |
| | | |
Dwarf Signal
103 | Dwarf Signal
103 | Dwarf Signal
103 | Dwarf Signal
103 |
| | | |
Shunting Signal
104 | Shunting Signal
104 | Shunting Signal
104 | Shunting Signal
104 |
| | | |
Distant Semaphore
105 | Distant Semaphore
105 | Distant Semaphore
105 | Distant Semaphore
105 |
| | | |
Main Semaphore A
106 | Main Semaphore A
106 | Main Semaphore A
106 | Main Semaphore A
106 |
| | | |
Main Semaphore B
107 | Main Semaphore B
107 | Main Semaphore B
107 | Main Semaphore B
107 |
| | | |
Shunting Semaphore
108 | Shunting Semaphore
108 | Shunting Semaphore
108 | Shunting Semaphore
108 |
| |
Block State
109 | Block State
109 |
Block |
| |
Block
150 | Block
150 |
| |
Short Block
151 | Short Block
151 |
| |
Stage
152 | Stage
152 |
Sensor |
| |
Sensor
200 | Sensor
200 |
| | | |
Curve Sensor
201 | Curve Sensor
201 | Curve Sensor
201 | Curve Sensor
201 |
|
General Sensor
202 |
Accessory |
|
Output A
71 |
|
Output B
72 |
|
Output C
73 |
| |
Level Crossing A
253 | Level Crossing A
253 |
| |
Level Crossing B
254 | Level Crossing B
254 |
| |
Level Crossing C
255 | Level Crossing C
255 |
|
Text
1010 |
|
Building
1011 |
|
Platform
1011 |
|
Building
1012 |
|
Industry
1013 |
|
Building
1013 |
\ No newline at end of file
diff --git a/Testing/TrackPlanerTest/TestMetamodel.cs b/Testing/TrackPlanerTest/TestMetamodel.cs
index 7857d98..43743bc 100644
--- a/Testing/TrackPlanerTest/TestMetamodel.cs
+++ b/Testing/TrackPlanerTest/TestMetamodel.cs
@@ -14,6 +14,9 @@ namespace TrackPlanerTest
[TestClass]
public class TestMetamodel
{
+ public static string WorkspaceRoot = @"..\..\..\..\..\Workspaces\";
+ public static string ThemeRoot = @"..\..\..\..\..\EcosApp\theme\";
+
private PlanField LoadPlanFieldFile(string path)
{
File.Exists(path).Should().BeTrue();
@@ -189,7 +192,7 @@ public void TestSerializationPlanField()
[TestMethod]
public void TestCheckTrack()
{
- var path = @"..\..\..\..\rocrail2ecosApp\Demos\metamodel.RocrailDemo.json";
+ var path = WorkspaceRoot + @"RocrailDemo\metamodel.json";
var field = LoadPlanFieldFile(path);
var tr0 = field["14x4"];
@@ -471,7 +474,7 @@ public void TestRoutingD()
[TestMethod]
public void TestRoutingRocrailDemo()
{
- var path = @"..\..\..\..\rocrail2ecosApp\Demos\metamodel.RocrailDemo.json";
+ var path = WorkspaceRoot + @"RocrailDemo\metamodel.json";
var field = LoadPlanFieldFile(path);
var bk5_1 = field["5x1"];
@@ -533,12 +536,12 @@ public void TestRoutingConnectorDemo()
[TestMethod]
public void TestRoutingBasementDemo()
{
- var path = @"..\..\..\..\rocrail2ecosApp\Demos\metamodel.BasementDemo.json";
+ var path = WorkspaceRoot + @"Basement\metamodel.json";
var field = LoadPlanFieldFile(path);
var startBlock = field["8x9"];
var r8_9 = field.GetRoutes(startBlock);
- var targetBlock = field["14x18"];
+ var targetBlock = field["21x18"];
foreach (var itR in r8_9)
{
if (itR.Target.identifier == targetBlock.identifier)
@@ -557,7 +560,7 @@ public void TestRoutingBasementDemo()
}
var allBlocks = field.GetBlocks();
- allBlocks.Count.Should().Be(22);
+ allBlocks.Count.Should().Be(21);
var step = 0;
var maxStep = allBlocks.Count;
@@ -574,7 +577,7 @@ public void TestRoutingBasementDemo()
ShowProgress(step, maxStep, $"Analyzing Basement (Current routes: {totalRoutes})");
}
- totalRoutes.Should().Be(142);
+ totalRoutes.Should().Be(210);
Trace.WriteLine($"Found {totalRoutes} routes.");
}
@@ -685,7 +688,7 @@ public void TestCrossingSwitchDirections2()
[TestMethod]
public void TestAnalyzer()
{
- var path = @"..\..\..\..\rocrail2ecosApp\Demos\metamodel.BasementDemo.json";
+ var path = WorkspaceRoot + @"Basement\metamodel.json";
var field = LoadPlanFieldFile(path);
var analyzer = new Analyze(field);
@@ -693,7 +696,7 @@ public void TestAnalyzer()
{
ShowProgress(step, maxSteps, "Analyzing Basement");
});
- analyzerResult.NumberOfRoutes.Should().Be(142);
+ analyzerResult.NumberOfRoutes.Should().Be(210);
var json = analyzerResult.ToJson();
json.Length.Should().BeGreaterThan(0);
diff --git a/Testing/TrackPlanerTest/TestSerializations.cs b/Testing/TrackPlanerTest/TestSerializations.cs
index f735272..c09d608 100644
--- a/Testing/TrackPlanerTest/TestSerializations.cs
+++ b/Testing/TrackPlanerTest/TestSerializations.cs
@@ -16,7 +16,7 @@ public class TestSerializations
[TestMethod]
public void TestSerializationPlanField()
{
- var path = @"..\..\..\..\rocrail2ecosApp\Demos\metamodel.RocrailDemo.json";
+ var path = TestMetamodel.WorkspaceRoot + @"RocrailDemo\metamodel.json";
File.Exists(path).Should().BeTrue();
var json = File.ReadAllText(path, Encoding.UTF8);
@@ -27,7 +27,7 @@ public void TestSerializationPlanField()
[TestMethod]
public void TestDeserializationOfTheme()
{
- var path = @"..\..\..\..\EcosApp\theme\RailwayEssential.json";
+ var path = TestMetamodel.ThemeRoot + @"RailwayEssential.json";
File.Exists(path).Should().BeTrue();
var json = File.ReadAllText(path, Encoding.UTF8);
diff --git a/Testing/TrackPlanerTest/TestTheme.cs b/Testing/TrackPlanerTest/TestTheme.cs
index fa83741..fbdf6d2 100644
--- a/Testing/TrackPlanerTest/TestTheme.cs
+++ b/Testing/TrackPlanerTest/TestTheme.cs
@@ -15,8 +15,8 @@ public class TestTheme
[TestMethod]
public void TestIconsRendering()
{
- var path = @"C:\tfs\cbriesGitHub\ecoslib\ecoslib\EcosApp\theme\RailwayEssential.json";
- var pathToFiles = @"C:\tfs\cbriesGitHub\ecoslib\ecoslib\EcosApp\theme\RailwayEssential";
+ var path = TestMetamodel.ThemeRoot + @"RailwayEssential.json";
+ var pathToFiles = TestMetamodel.ThemeRoot + @"RailwayEssential";
var targetHtmlFile = Path.Combine(Path.GetDirectoryName(path), "RailwayEssential.Test.html");
File.Exists(path).Should().BeTrue();