private void AssignValues(string RestOfMessage) { string[] LineOfRestOfMessage = RestOfMessage.Split(' '); int HourOfPurchase = DateTime.Now.Hour; int MinutesOfPurchase = DateTime.Now.Minute; if (CountryHandler.WroteHourAndMinutesByCountry(LineOfRestOfMessage)) { HourOfPurchase = CountryHandler.AssignHourByCountry(LineOfRestOfMessage); MinutesOfPurchase = CountryHandler.AssignMinutesByCountry(LineOfRestOfMessage); } int TimeOfPurchase = CountryHandler.AssignTimeByCountry(LineOfRestOfMessage); DateTime DateOfPurchase = AssignTimesToDate(HourOfPurchase, MinutesOfPurchase); ValidateTimeMultipleOf30(TimeOfPurchase, DateOfPurchase); }
public void ValidateAssignMinutesByCountryUruguay() { string[] Line = new string[] { " ", "60", "13:45" }; Assert.AreEqual(45, Uruguay.AssignMinutesByCountry(Line)); }
public void ValidateAssignMinutesByCountryArgentina() { string[] Line = new string[] { " ", "11:21", "60" }; Assert.AreEqual(21, Argentina.AssignMinutesByCountry(Line)); }