public void ValueCanBeAddedToHistory() { var cultureField = new HistoryField("culture", initialValue: "greek"); cultureField.AddValueToHistory("roman", new Date(100, 1, 1)); Assert.Equal("greek", cultureField.GetValue(new Date(99, 1, 1))); Assert.Equal("roman", cultureField.GetValue(new Date(100, 1, 1))); }
public void InitialValueCanBeChanged() { var cultureField = new HistoryField("culture", initialValue: "greek"); Assert.Equal("greek", cultureField.GetValue(new Date(1, 1, 1))); cultureField.InitialValue = "roman"; Assert.Equal("roman", cultureField.GetValue(new Date(1, 1, 1))); }
public void ValueCanBeAddedToHistory() { var buildingsField = new HistoryField("buildings", initialValue: new List <object> { "temple", "aqueduct" }); buildingsField.AddValueToHistory(new List <object> { "temple", "brothel", "forum" }, new Date(100, 1, 1)); Assert.Equal(new List <object> { "temple", "aqueduct" }, buildingsField.GetValue(new Date(99, 1, 1))); Assert.Equal(new List <object> { "temple", "brothel", "forum" }, buildingsField.GetValue(new Date(100, 1, 1))); }
public void InitialValueCanBeChanged() { var buildingsField = new HistoryField("buildings", initialValue: new List <object> { "temple", "aqueduct" }); Assert.Equal(new List <object> { "temple", "aqueduct" }, buildingsField.GetValue(new Date(1, 1, 1))); buildingsField.InitialValue = new List <object> { "temple", "brothel", "forum" }; Assert.Equal(new List <object> { "temple", "brothel", "forum" }, buildingsField.GetValue(new Date(1, 1, 1))); }