Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void ValidateAssignTimeByCountryUruguay()
 {
     string[] Line = new string[] { " ", "30", "13:21" };
     Assert.AreEqual(30, Uruguay.AssignTimeByCountry(Line));
 }
Exemplo n.º 3
0
 public void ValidateAssignTimeByCountryArgentina()
 {
     string[] Line = new string[] { " ", "11:21", "60" };
     Assert.AreEqual(60, Argentina.AssignTimeByCountry(Line));
 }