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

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

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