Ejemplo n.º 1
0
        public void ParseFail(string text)
        {
            var pu1 = ExtensionSubtag.TryParse(text);

            Assert.That(pu1.HasValue, Is.False);

            Assert.That(ExtensionSubtag.TryParse(text, out _), Is.False);

            Assert.Throws <FormatException>(() => ExtensionSubtag.Parse(text));
        }
Ejemplo n.º 2
0
        public void Contains(string?subtagText, string tag, bool expected)
        {
            var pu = subtagText == null ? new ExtensionSubtag() : ExtensionSubtag.Parse(subtagText);

            Assert.That(pu.Contains(tag), Is.EqualTo(expected));
        }