public void HasHigherPriorityThanStringValueGeneratorTest() { var target = new CountryValueGenerator(); var other = new StringValueGenerator(); target.Priority.Should().BeGreaterThan(other.Priority); }
public void IsSupportedTest(Type type, string referenceName, bool expected) { var target = new CountryValueGenerator(); var actual = target.IsSupported(type, referenceName, null); actual.Should().Be(expected); }
public void GenerateThrowsExceptionWithNullTypeTest() { var target = new CountryValueGenerator(); Action action = () => target.Generate(null, null, null); action.ShouldThrow<ArgumentNullException>(); }
public void GenerateThrowsExceptionWithInvalidParametersTest(Type type, string referenceName) { var target = new CountryValueGenerator(); Action action = () => target.Generate(type, referenceName, null); action.ShouldThrow<NotSupportedException>(); }
public void GenerateReturnsValuesForSeveralNameFormatsTest(Type type, string referenceName, bool expected) { var target = new CountryValueGenerator(); var actual = (string) target.Generate(type, referenceName, null); actual.Should().NotBeNullOrEmpty(); }
public void GenerateReturnsRandomCountryTest() { var target = new CountryValueGenerator(); var first = target.Generate(typeof(string), "country", null); first.Should().BeOfType<string>(); first.As<string>().Should().NotBeNullOrWhiteSpace(); var second = target.Generate(typeof(string), "country", null); first.Should().NotBe(second); }