public void GenerateReturnsRandomCompanyTest() { var target = new CompanyValueGenerator(); var first = target.Generate(typeof(string), "company", null); first.Should().BeOfType<string>(); first.As<string>().Should().NotBeNullOrWhiteSpace(); var second = target.Generate(typeof(string), "company", null); first.Should().NotBe(second); }
public void GenerateThrowsExceptionWithNullTypeTest() { var target = new CompanyValueGenerator(); Action action = () => target.Generate(null, null, null); action.ShouldThrow<ArgumentNullException>(); }
public void GenerateThrowsExceptionWithInvalidParametersTest(Type type, string referenceName) { var target = new CompanyValueGenerator(); Action action = () => target.Generate(type, referenceName, null); action.ShouldThrow<NotSupportedException>(); }
public void GenerateReturnsValuesForSeveralNameFormatsTest(Type type, string referenceName, bool expected) { var target = new CompanyValueGenerator(); var actual = (string) target.Generate(type, referenceName, null); actual.Should().NotBeNullOrEmpty(); }