public void HasHigherPriorityThanStringValueGeneratorTest()
        {
            var target = new DomainNameValueGenerator();
            var other = new StringValueGenerator();

            target.Priority.Should().BeGreaterThan(other.Priority);
        }
        public void IsSupportedTest(Type type, string referenceName, bool expected)
        {
            var target = new DomainNameValueGenerator();

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

            actual.Should().Be(expected);
        }
        public void GenerateThrowsExceptionWithNullTypeTest()
        {
            var target = new DomainNameValueGenerator();

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

            action.ShouldThrow<ArgumentNullException>();
        }
        public void GenerateThrowsExceptionWithInvalidParametersTest(Type type, string referenceName)
        {
            var target = new DomainNameValueGenerator();

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

            action.ShouldThrow<NotSupportedException>();
        }
        public void GenerateReturnsValuesForSeveralNameFormatsTest(Type type, string referenceName, bool expected)
        {
            var target = new DomainNameValueGenerator();

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

            actual.Should().NotBeNullOrEmpty();
        }
        public void GenerateReturnsRandomDomainTest()
        {
            var target = new DomainNameValueGenerator();

            var first = target.Generate(typeof(string), "domain", null);

            first.Should().BeOfType<string>();
            first.As<string>().Should().NotBeNullOrWhiteSpace();

            var second = target.Generate(typeof(string), "domain", null);

            first.Should().NotBe(second);
        }