Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
hazzik committed Jun 27, 2024
1 parent 5f50ef1 commit 8165934
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions projects/GKTests/GDModel/GDMLocationRecordTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,32 @@ public void Test_Carbuna()
, result);
}

[Test]
public void Test_Carbuna2()
{
var tree = new GDMTree();
var ussr = tree.CreateLocation();
ussr.AddLocName("СССР", "FROM 30 DEC 1922 TO 26 DEC 1991");

var moldova = tree.CreateLocation();
moldova.AddLocName("Молдавская ССР", "FROM 2 AUG 1940 TO 27 AUG 1991");
moldova.AddLocName("Молдова", "FROM 28 AUG 1991");
moldova.AddLocLink(ussr, "FROM 2 AUG 1940 TO 27 AUG 1991");

var carbuna = tree.CreateLocation();
carbuna.AddLocName("Карбуна", "FROM 1775");
carbuna.AddLocLink(moldova, "FROM 2 AUG 1940");

var names = carbuna.GetFullNames(tree, ATDEnumeration.fLtS);
var result = string.Join("\n", names.OrderBy(x => x.Date).Select(x => string.Format("'{0}': '{1}'", x.Date.ToString(), x.StringValue)));

Assert.AreEqual(
"'__.__.1775 [G] - 01.08.1940 [G]': 'Карбуна'\n" +
"'02.08.1940 [G] - 27.08.1991 [G]': 'СССР, Молдавская ССР, Карбуна'\n" +
"'28.08.1991 [G] >': 'Молдова, Карбуна'"
, result);
}

[Test]
public void Test_DateIntersections()
{
Expand Down

0 comments on commit 8165934

Please sign in to comment.