public void Instance_WithConfiguration_TypeSetAsExpected() { var configuration = A.Dummy <ITwaddleConfiguration>(); var instance = Twaddle.WithConfiguration(configuration); if (instance is Twaddle twaddle) { twaddle.Configuration.Should().BeSameAs(configuration); } else { Assert.Fail(); } Twaddle.WithDefaults.Name.GenerateFirstName(); }
public void Instance_WithConfiguration_HasDefaultTypes() { Twaddle.WithConfiguration(null, null, null, null, null, null) .Should() .BeOfType(typeof(Twaddle)); var instance = Twaddle.WithDefaults; if (instance is Twaddle twaddle) { twaddle.Configuration.Should().BeOfType(typeof(TwaddleConfiguration)); } else { Assert.Fail(); } }