SvgTextTests.cs 880 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;

namespace Svg.UnitTests
{
    [TestClass]
    public class SvgTextTests
    {

        [TestMethod]
16
        [Ignore]
17
18
        public void TextPropertyAffectsSvgOutput()
        {
19
            // FIXME: test currently times out, maybe regression
20
21
22
23
24
25
26
27
28
29
30
31
32
33
            var document = new SvgDocument();
            document.Children.Add(new SvgText { Text = "test1" });
            using(var stream = new MemoryStream())
            {
                document.Write(stream);
                stream.Position = 0;

                var xmlDoc = new XmlDocument();
                xmlDoc.Load(stream);
                Assert.AreEqual("test1", xmlDoc.DocumentElement.FirstChild.InnerText);
            }
        }
    }
}