public void GenerateReturnsUriTest()
        {
            var target = new UriValueGenerator();

            var actual = target.Generate(typeof(Uri), null, null);

            actual.Should().NotBeNull();
            actual.As<Uri>().ToString().Should().NotBeNullOrEmpty();
        }
        public void GenerateReturnsStringForUrlParameterNameTest()
        {
            var target = new UriValueGenerator();

            var actual = target.Generate(typeof(string), "url", null);

            actual.Should().NotBeNull();
            actual.As<string>().Should().NotBeNullOrEmpty();
        }
        public void GenerateThrowsExceptionWithNullTypeTest()
        {
            var buildChain = new LinkedList<object>();

            buildChain.AddFirst(Guid.NewGuid().ToString());

            var target = new UriValueGenerator();

            Action action = () => target.Generate(null, Guid.NewGuid().ToString(), buildChain);

            action.ShouldThrow<ArgumentNullException>();
        }
        public void GenerateValidatesUnsupportedScenariosTest(Type type, string referenceName, bool supported)
        {
            var target = new UriValueGenerator();

            Action action = () => target.Generate(type, referenceName, null);

            if (supported)
            {
                action.ShouldNotThrow();
            }
            else
            {
                action.ShouldThrow<NotSupportedException>();
            }
        }
        public void IsSupportedReturnsWhetherScenarioIsValidTest(Type type, string referenceName, bool supported)
        {
            var target = new UriValueGenerator();

            var actual = target.IsSupported(type, referenceName, null);

            actual.Should().Be(supported);
        }
        public void PriorityIsHigherThanStringValueGeneratorProprityTest()
        {
            var target = new UriValueGenerator();
            var other = new StringValueGenerator();

            target.Priority.Should().BeGreaterThan(other.Priority);
        }