public void Empty()
        {
            var empty = new ExtensionSubtag();

            Assert.Throws <InvalidOperationException>(() => empty.ToString());
            Assert.Throws <InvalidOperationException>(() => empty.Singleton.GetHashCode());
        }
示例#2
0
        public void Empty()
        {
            var empty = new ExtensionSubtag();

            Assert.IsTrue(empty.IsEmpty);
            Assert.AreEqual("", empty.ToString());
            Assert.That(empty.ToArray(), Is.Empty);
            Assert.Throws <InvalidOperationException>(() => empty.Singleton.GetHashCode());
        }
示例#3
0
        public void ToString(char singleton, string[] subtags, string expected)
        {
            var ext = new ExtensionSubtag(singleton, subtags);

            Assert.AreEqual(expected, ext.ToString());
        }