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)); }
public void ForwardDayChangesInPlanet_AddMonth() { IDateAndTime date = new DateAndTime(); Galaxy g = new Galaxy(); g.CreateNormalGalaxy(); //One day changes DateTime result = date.AddMonths(g, 1); Assert.AreEqual(result, new DateTime(2492, 6, 6, 1, 0, 0)); //0 days changes result = date.AddMonths(g, 0); Assert.AreEqual(result, new DateTime(2492, 6, 6, 1, 0, 0)); }
public GalaxyWindow(Galaxy galaxy, DateAndTime date) { _date = date; _galaxy = galaxy; _presist = 1; InitializeComponent(); comboBox1.Items.Add("4*X"); comboBox1.Items.Add("3*X"); comboBox1.Items.Add("2*X"); comboBox1.Items.Add("X"); comboBox1.Items.Add("0.5*X"); comboBox1.Items.Add("0.3*X"); comboBox1.Items.Add("0.2*X"); comboBox1.Items.Add("0.15*X"); comboBox1.Items.Add("0.1*X"); comboBox1.Items.Add("0.05*X"); comboBox1.Text = "X"; }