public void GenerateReturnsRandomValueTest() { var target = new StringValueGenerator(); var first = target.Generate(typeof(string), null, null); var second = target.Generate(typeof(string), null, null); first.Should().NotBeNull(); second.Should().NotBeNull(); first.Should().NotBe(second); }
public void GenerateThrowsExceptionWithNullTypeTest() { var target = new StringValueGenerator(); Action action = () => target.Generate(null, null, null); action.ShouldThrow<ArgumentNullException>(); }
public void GenerateReturnsValidatesTypeSupportTest(Type type, bool supported) { var target = new StringValueGenerator(); Action action = () => target.Generate(type, null, null); if (supported) { action.ShouldNotThrow(); } else { action.ShouldThrow<NotSupportedException>(); } }