public void TestParseHtmlMessage(string htmlMessage,
                                         string referenceCompany,
                                         string referenceDriver,
                                         string referenceCarColor,
                                         string referenceCarModel,
                                         string referenceCarNumber,
                                         string referenceTariff,
                                         int referenceTimeInMinutes,
                                         int referenceCost,
                                         string[] referenceWaypoints,
                                         int referenceOrderDateTimeUnix)
        {
            var htmlMessages = new List <string>()
            {
                htmlMessage
            };
            var result      = _htmlParserService.ParseHtmlMessages(htmlMessages);
            var firstResult = result.FirstOrDefault();

            Assert.IsNotNull(firstResult);
            Assert.IsNotNull(firstResult.ContractorInformation);
            Assert.IsNotNull(firstResult.OrderInformation);
            Assert.IsNotNull(firstResult.RouteInformation);

            Assert.AreEqual(referenceCompany, firstResult.ContractorInformation.Company);
            Assert.AreEqual(referenceDriver, firstResult.ContractorInformation.Driver);
            Assert.AreEqual(referenceCarColor, firstResult.ContractorInformation.CarColor);
            Assert.AreEqual(referenceCarModel, firstResult.ContractorInformation.CarModel);
            Assert.AreEqual(referenceCarNumber, firstResult.ContractorInformation.CarNumber);

            Assert.AreEqual(referenceTariff, firstResult.OrderInformation.Tariff);
            Assert.AreEqual(TimeSpan.FromMinutes(referenceTimeInMinutes), firstResult.OrderInformation.Duration);
            Assert.AreEqual(referenceCost, firstResult.OrderInformation.Cost);

            CollectionAssert.AreEqual(referenceWaypoints, firstResult.RouteInformation.Waypoints.ToArray());
            Assert.AreEqual(DateTimeOffset.FromUnixTimeSeconds(referenceOrderDateTimeUnix).DateTime, firstResult.RouteInformation.OrderDateTime);
        }
        private IList <DataItem> GetData()
        {
            var htmlMessages = _imapService.GetHtmlMessages();

            return(_htmlParserService.ParseHtmlMessages(htmlMessages));
        }