public void Empty() { var empty = new ExtensionSubtag(); Assert.Throws <InvalidOperationException>(() => empty.ToString()); Assert.Throws <InvalidOperationException>(() => empty.Singleton.GetHashCode()); }
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()); }
public void ToString(char singleton, string[] subtags, string expected) { var ext = new ExtensionSubtag(singleton, subtags); Assert.AreEqual(expected, ext.ToString()); }