public void Format_Same()
        {
            // A
            var builder = new MessageChainBuilder();

            builder.Add(new Source(1024));
            builder.AddPlain("World");
            builder.Add(Image.FromUrl("id", new Uri("https://example.com", UriKind.Absolute)));
            builder.AddPlain("Hello");
            var chain     = builder.Build();
            var formatter = new HyperCodeFormatter();
            // A
            var res = formatter.Format(chain);

            // A
            Assert.AreEqual(res, "[hyper.source(1024)]World[hyper.image(id,https://example.com/)]Hello");
        }
Esempio n. 2
0
        public void Format_Same()
        {
            // A
            MessageChainBuilder builder = new MessageChainBuilder();

            builder.Add(new Source(1024));
            builder.AddPlain("World");
            builder.Add(new Image("id", new Uri("https://example.com")));
            builder.AddPlain("Hello");
            MessageChain       chain     = builder.Build();
            HyperCodeFormatter formatter = new HyperCodeFormatter();
            // A
            string res = formatter.Format(chain);

            // A
            Assert.AreEqual(res, "[hyper.source(1024)]World[hyper.image(id,https://example.com/)]Hello");
        }