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 ValidateWroteHourAndMinutesByCountryArgentina() { string[] Line = new string[] { " ", "11:21", "60" }; Assert.AreEqual(true, Argentina.WroteHourAndMinutesByCountry(Line)); }
public void ValidateWroteAndMinutesByCountryUruguay() { string[] Line = new string[] { " ", "60", "11:21" }; Assert.AreEqual(true, Uruguay.WroteHourAndMinutesByCountry(Line)); }