public void BuildParameterThrowsExceptionWithNullPropertyInfo() { var sut = new BuildParameterWrapper(); Action action = () => sut.RunTest(); action.Should().Throw <ArgumentNullException>(); }
public void BuildParameterThrowsExceptionWhenNotInitialized() { var parameterInfo = typeof(Person).GetConstructors() .First(x => x.GetParameters().FirstOrDefault()?.Name == "firstName").GetParameters().First(); var sut = new BuildParameterWrapper(); Action action = () => sut.RunTest(parameterInfo); action.Should().Throw <InvalidOperationException>(); }