public void GenerateThrowsExceptionWithNullTypeTest()
        {
            var target = new PostCodeValueGenerator();

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

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

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

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

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

            actual.Should().NotBeNullOrEmpty();
        }
        public void GenerateReturnsValueForPostCodeTypeTest()
        {
            var target = new PostCodeValueGenerator();

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

            actual.Should().BeOfType<string>();
        }
        public void GenerateReturnsRandomValueTest()
        {
            var target = new PostCodeValueGenerator();

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

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

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

            first.Should().NotBe(second);
        }
        public void IsSupportedTest(Type type, string referenceName, bool expected)
        {
            var target = new PostCodeValueGenerator();

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

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

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