Пример #1
0
        public void BackwardDayChangesInPlanet_SubYears()
        {
            IDateAndTime date = new DateAndTime();
            Galaxy       g    = new Galaxy();

            g.CreateNormalGalaxy();
            //One day changes
            DateTime result = date.SubtractYears(g, 1);

            Assert.AreEqual(result, new DateTime(2491, 5, 6, 1, 0, 0));
            //0 days changes
            result = date.SubtractYears(g, 0);
            Assert.AreEqual(result, new DateTime(2491, 5, 6, 1, 0, 0));
        }
Пример #2
0
 private void Button2_Click(object sender, EventArgs e)
 {
     _date.SubtractYears(_galaxy, 1);
     this.Invalidate();
 }