Example #1
0
        public async Task GetFoafData_StateUnderTest_ExpectedBehavior()
        {
            var     foafWriter = CreateFoafWriter();
            FoafDoc doc        = new FoafDoc
            {
                Name     = "996.icu",
                BlogUrl  = "https://996.icu",
                Email    = "*****@*****.**",
                PhotoUrl = "https://996.icu/fubao.png"
            };
            string currentRequestUrl     = "https://996.icu/fubao";
            IReadOnlyList <Link> friends = new List <Link>
            {
                new(){ Id = Guid.Empty, LinkUrl = "https://greenhat.today", Title = "Work 996 and wear green hat" }
            };

            // Act
            var result = await foafWriter.GetFoafData(
                doc,
                currentRequestUrl,
                friends);

            Assert.IsFalse(string.IsNullOrWhiteSpace(result));
        }
    }
Example #2
0
 public WriterFoafCommand(FoafDoc doc, string currentRequestUrl, IReadOnlyList <Link> links)
 {
     Doc = doc;
     CurrentRequestUrl = currentRequestUrl;
     Links             = links;
 }