Пример #1
0
        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)));
        }
Пример #2
0
        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)));
        }