Add documentation output
This commit is contained in:
parent
df63111009
commit
b877fff2b5
19 changed files with 643 additions and 441 deletions
|
@ -10,37 +10,37 @@ namespace AspectedRouting.Test
|
|||
[Fact]
|
||||
public void MustMatch_SimpleInput()
|
||||
{
|
||||
var mapValue = new Mapping(new[] {"residential", "living_street"},
|
||||
var mapValue = new Mapping(new[] { "residential", "living_street" },
|
||||
new[] {
|
||||
new Constant("yes"),
|
||||
new Constant("no")
|
||||
});
|
||||
var mapTag = new Mapping(new[] {"highway"}, new[] {mapValue});
|
||||
var mapTag = new Mapping(new[] { "highway" }, new[] { mapValue });
|
||||
var mm = Funcs.MustMatch
|
||||
.Apply(
|
||||
new Constant(new[] {new Constant("highway")}),
|
||||
new Constant(new[] { new Constant("highway") }),
|
||||
Funcs.StringStringToTags.Apply(mapTag)
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
var residential = mm.Apply(new Constant(new Dictionary<string, string> {
|
||||
{"highway", "residential"}
|
||||
{ "highway", "residential" }
|
||||
})).Evaluate(new Context());
|
||||
Assert.Equal("yes", residential);
|
||||
|
||||
var living = mm.Apply(new Constant(new Dictionary<string, string> {
|
||||
{"highway", "living_street"}
|
||||
{ "highway", "living_street" }
|
||||
})).Evaluate(new Context());
|
||||
Assert.Equal("no", living);
|
||||
|
||||
var unknown = mm.Apply(new Constant(new Dictionary<string, string> {
|
||||
{"highway", "unknown_type"}
|
||||
{ "highway", "unknown_type" }
|
||||
})).Evaluate(new Context());
|
||||
Assert.Equal("yes", unknown);
|
||||
|
||||
var missing = mm.Apply(new Constant(new Dictionary<string, string> {
|
||||
{"proposed:highway", "unknown_type"}
|
||||
{ "proposed:highway", "unknown_type" }
|
||||
})).Evaluate(new Context());
|
||||
Assert.Equal("no", missing);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue