Exemple #1
0
        public void TestInvalidInput1()
        {
            var uriData          = new InvalidUriModel0();
            UriFormatException e = null;

            try
            {
                var uri = uriData.ToUri();
            }
            catch (UriFormatException exception)
            {
                e = exception;
            }
            Assert.That(e, Is.Not.Null);
            Assert.That(e.Message, Is.EqualTo("The object did not have Base URI."));
        }
Exemple #2
0
        public void TestIgnoredPropertyTest3()
        {
            var uriData = new InvalidUriModel0();

            Exception e = null;

            try
            {
                var parameters = uriData.ToUriString();
            }
            catch (Exception exception)
            {
                e = exception;
            }
            Assert.That(e, Is.Not.Null);
            Assert.That(e.GetType(), Is.EqualTo(typeof(UriFormatException)));
            Assert.That(e.Message, Is.EqualTo("The object did not have Base URI."));
        }