// Methods .............................................

        /// <summary>
        /// Initialize screen
        /// </summary>
        /// <param name="initSelecionBox"></param>
        private void InitializeScreen(bool initSelecionBox)
        {
            // Iitialize values
            DateTime curentTime = DateTime.Now;

            SecondsToConvert = _timeConverterService.ConvertString24HrTimeToSeconds(curentTime.ToString("HH:mm:ss"));
            ConvertedHours   = "";
            HoursToConvert   = curentTime;
            ConvertedSeconds = "";

            if (initSelecionBox)
            {
                // Initialize Selection Box
                ConvertSecondsToHoursAction = true;
                ConvertHoursToSecondsAction = false;
            }
        }
Ejemplo n.º 2
0
        public void ConvertString24HrTimeToSeconds()
        {
            // Arrange
            string target24Time = "12:23:34.235";

            // Act
            double resultSecs = _timeConvService.ConvertString24HrTimeToSeconds(target24Time);

            // Assert
            Assert.AreEqual(_refSeconds, resultSecs);
        }