Пример #1
0
        public void Returns_Https_When_Set()
        {
            var sut   = new RandomUri(RandomUri.SchemeType.Https);
            var value = sut.GetValue();

            Assert.IsNotNull(value);

            Assert.AreEqual("https", value.Scheme);
        }
Пример #2
0
        public void Returns_Configured_Domain_When_Set()
        {
            var sut   = new RandomUri(RandomUri.SchemeType.Https, "net");
            var value = sut.GetValue();

            Assert.IsNotNull(value);

            Assert.AreEqual("https", value.Scheme);
            Assert.IsTrue(value.Host.EndsWith(".net"));
        }
Пример #3
0
        public void RandomUriIsReturned()
        {
            var sut   = new RandomUri();
            var value = sut.GetValue();

            Assert.IsNotNull(value);

            Assert.IsFalse(string.IsNullOrEmpty(value.Host));
            Assert.IsFalse(string.IsNullOrEmpty(value.Scheme));
            Assert.IsFalse(string.IsNullOrEmpty(value.PathAndQuery));
        }