public static FinwireNew ToFinwireNews(this FinWireData finwireData)
        {
            var imgData = ImageHelper.GetImageData(finwireData.SocialTags, finwireData.Companies);

            var r = new FinwireNew
            {
                Guid             = finwireData.Guid,
                Title            = finwireData.Title,
                Subtitle         = finwireData.SubTitle,
                Date             = finwireData.Date,
                NewsText         = finwireData.HtmlText,
                ImageRelativeUrl = ImageHelper.AbsoluteUrlToRelativeUrl(imgData.ImageAbsoluteUrl),
                ImageSource      = imgData.ImageSource,
                ImageLabel       = imgData.Label,
                Slug             = finwireData.TittleSlug,
                IsFinwireNews    = true
            };

            return(r);
        }
Esempio n. 2
0
 public void AbsoluteUrlToRelativeUrl(string inputPath, string outputPath)
 {
     Assert.AreEqual(outputPath, ImageHelper.AbsoluteUrlToRelativeUrl(inputPath));
 }