public void GetStops_Unknown_Consumables_And_Megalight() { // Arrage var starship = new Starship() { Consumables = unknown, MegaLights = unknown }; // Act string actual = starship.GetStops(distance); // Assert Assert.Equal(unknown, actual); }
public void GetStops_Valid_Weeks() { // Arrage int weeks = 3; int megalights = 80; var starship = new Starship() { Consumables = weeks.ToString() + " weeks", MegaLights = megalights.ToString() }; DateTime startDate = DateTime.UtcNow; DateTime endDate = startDate.AddDays(weeks * 7); double distanceBetweenStops = (endDate - startDate).TotalHours * megalights; string expected = Math.Round(distance / distanceBetweenStops, MidpointRounding.AwayFromZero).ToString(); // Act string actual = starship.GetStops(distance); // Assert Assert.Equal(expected, actual); }