Beispiel #1
0
        public void TestWithErrors(string ipString, string errorStringPattern)
        {
            Ip6Addr ip6Addr = _parser.Parse(ipString);

            Assert.That(ip6Addr.Value, Is.EqualTo(ipString));
            Assert.That(ip6Addr.ErrorCount, Is.EqualTo(1));
            Assert.That(ip6Addr.Errors[0].Message.Contains(errorStringPattern), Is.True);
        }
Beispiel #2
0
        public void Test(string ipString, int errorCount, string errorStringPattern)
        {
            Ip6Addr ip6Addr = _parser.Parse(ipString);

            Assert.That(ip6Addr.Value, Is.EqualTo(ipString));
            Assert.That(ip6Addr.ErrorCount, Is.EqualTo(errorCount));
            Assert.That((ip6Addr.Errors.FirstOrDefault()?.Message ?? string.Empty).Contains(errorStringPattern), Is.True);
        }