示例#1
0
        public void Link1(
            string inUrl,
            string finUrl,
            string inMimeTypeStr,
            BasicMimeType inMimeType,
            BasicMimeType finMimeType,
            string inRel,
            bool inIsRssEncl,
            SFRel finRel)
        {
            var lk = new SFLink(inUrl, inMimeTypeStr, inRel, isRssEncl: inIsRssEncl, mimeType: inMimeType);

            True(lk.MimeType == finMimeType);
            True(lk.Rel == finRel);
            True(lk.Url == (finUrl.NullIfEmpty() ?? inUrl));
        }
示例#2
0
        public void FixOrValidateInputUrl(string url, string ext = null, string fixedUrl = null, bool success = true)
        {
            ext      = ext.NullIfEmptyTrimmed();
            fixedUrl = fixedUrl.NullIfEmptyTrimmed();

            bool _success = SFLink.FixOrValidateInputUrl(url, out string _url, out Uri _uri, out string _ext);

            True(success == _success);

            if (!_success)
            {
                return;
            }

            True(_uri != null);
            True(_url == (fixedUrl ?? url));
            True(ext == _ext);
        }