Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

tests: Ghazawiya is the locality without a Hebrew name now that Salihiya has one (#1313) (#1328)

Eyal Golan49933739d2cc
diff --git a/unity/Assets/Tests/EditMode/HebrewUiTests.cs b/unity/Assets/Tests/EditMode/HebrewUiTests.cs
index 661e3e927..9cbbfefc7 100644
--- a/unity/Assets/Tests/EditMode/HebrewUiTests.cs
+++ b/unity/Assets/Tests/EditMode/HebrewUiTests.cs
@@ -376,7 +376,7 @@ public class HebrewUiTests
}
/// <summary>#880: in Hebrew every map name pill shows its row's name_he, and its English name where the row has none (a
- /// 1948 locality such as Salihiya); an English restart puts the English names back. #1008: a GDD v0.2 map location
+ /// 1948 locality such as Ghazawiya); an English restart puts the English names back. #1008: a GDD v0.2 map location
/// (content/map/locations_1948.yaml) is named in both languages too, and the one with a settlement's id (jerusalem)
/// names that settlement's pill: "מערב ירושלים", "West Jerusalem".</summary>
[Test]
@@ -393,7 +393,8 @@ public class HebrewUiTests
Assert.AreEqual("תל אביב", Ui.Q<Label>("label-tel_aviv").text);
Assert.AreEqual("נשר", Ui.Q<Label>("label-nesher").text, "a 1948 locality with a name_he");
Assert.AreEqual("נענה", Ui.Q<Label>("label-naana").text, "#1219: Na'ana has a sourced name_he now");
- Assert.AreEqual("Salihiya", Ui.Q<Label>("label-al_salihiyya").text, "no name_he: the English name stays");
+ Assert.AreEqual("סאלחיה", Ui.Q<Label>("label-al_salihiyya").text, "#1313: Salihiya has a sourced name_he now");
+ Assert.AreEqual("Ghazawiya", Ui.Q<Label>("label-al_ghazzawiyya").text, "no name_he: the English name stays");
var locations = Inputs.Content.MapLocations.ToDictionary(l => l.Id);
Assert.AreEqual("מערב ירושלים", Ui.Q<Label>("label-jerusalem").text, "#1008: Jerusalem's pill is West Jerusalem's");
foreach (var s in map.Settlements)
diff --git a/unity/Assets/Tests/EditMode/KitTests.cs b/unity/Assets/Tests/EditMode/KitTests.cs
index fbd4e9855..270e8ad80 100644
--- a/unity/Assets/Tests/EditMode/KitTests.cs
+++ b/unity/Assets/Tests/EditMode/KitTests.cs
@@ -541,7 +541,8 @@ public class KitTests
Assert.IsTrue(tsv.Places.Single(p => p.Settlement.Id == "nesher").Mixed);
Assert.AreEqual("ביסאן", tsv.Places.Single(p => p.Settlement.Id == "beit_shean").NameHe, "#558: the 1948 form, as the English shows it");
Assert.AreEqual("נענה", tsv.Places.Single(p => p.Settlement.Id == "naana").NameHe, "#1219: the he.wiki-sourced name");
- Assert.IsNull(tsv.Places.Single(p => p.Settlement.Id == "al_salihiyya").NameHe, "#558: no sourced Hebrew name, so none");
+ Assert.AreEqual("סאלחיה", tsv.Places.Single(p => p.Settlement.Id == "al_salihiyya").NameHe, "#1313: the sourced name");
+ Assert.IsNull(tsv.Places.Single(p => p.Settlement.Id == "al_ghazzawiyya").NameHe, "#558: no sourced Hebrew name, so none");
}
/// <summary>A malformed runtime row is an error naming the file and the line.</summary>
diff --git a/unity/Assets/Tests/EditMode/LocalityNameTests.cs b/unity/Assets/Tests/EditMode/LocalityNameTests.cs
index e22480013..80d5d41df 100644
--- a/unity/Assets/Tests/EditMode/LocalityNameTests.cs
+++ b/unity/Assets/Tests/EditMode/LocalityNameTests.cs
@@ -108,18 +108,20 @@ public class LocalityNameTests
}
/// <summary>#899: under Hebrew each 1948 locality is named by its name_he (Beisan is ביסאן), and by the English name where the
- /// row has none (Salihiya). Where the Hebrew 1948 name and the Hebrew today name are one word (Umm el Fahm and Umm al-Fahm
+ /// row has none (Ghazawiya). Where the Hebrew 1948 name and the Hebrew today name are one word (Umm el Fahm and Umm al-Fahm
/// are both אום אל-פחם: 48 rows that would otherwise show a today name), the "today" part would repeat the name, so it is left out. English is unchanged.</summary>
[Test]
public void TheHebrewPanelNamesEach1948LocalityByItsHebrewName()
{
var by = map.Localities.ToDictionary(p => p.Settlement.Id);
- var (beisan, salihiyya, naana, fahm) = (by["beit_shean"], by["al_salihiyya"], by["naana"], by["umm_al_fahm"]);
- Assert.IsNull(salihiyya.NameHe, "Salihiya has no Hebrew name");
+ var (beisan, salihiyya, ghazawiya, naana, fahm) = (by["beit_shean"], by["al_salihiyya"], by["al_ghazzawiyya"], by["naana"], by["umm_al_fahm"]);
+ Assert.IsNull(ghazawiya.NameHe, "Ghazawiya has no Hebrew name");
+ Assert.AreEqual("סאלחיה", salihiyya.NameHe, "#1313: the sourced name");
Assert.AreEqual("נענה", naana.NameHe, "#1219: the he.wiki-sourced name");
Assert.AreEqual(fahm.NameHe, fahm.TodayHe, "one Hebrew word for 1948 and today");
Assert.AreEqual("יישובים ב-1948: ביסאן (היום: בית שאן)", InfoPanelPresenter.LocalitiesText(He, new[] { beisan }));
- Assert.AreEqual(He.Format("info.localities", "Salihiya"), InfoPanelPresenter.LocalitiesText(He, new[] { salihiyya })); // Format marks the Latin run
+ Assert.AreEqual(He.Format("info.localities", "Ghazawiya"), InfoPanelPresenter.LocalitiesText(He, new[] { ghazawiya })); // Format marks the Latin run
+ Assert.AreEqual("יישובים ב-1948: סאלחיה", InfoPanelPresenter.LocalitiesText(He, new[] { salihiyya }));
Assert.AreEqual("יישובים ב-1948: נענה", InfoPanelPresenter.LocalitiesText(He, new[] { naana }));
Assert.AreEqual("יישובים ב-1948: אום אל-פחם", InfoPanelPresenter.LocalitiesText(He, new[] { fahm }));
Assert.AreEqual("1948 localities: Beisan (today: Beit She'an), Salihiya, Na'ana, Umm el Fahm (today: Umm al-Fahm)",