public void ShouldThrowExceptionWithNameOfVariable() { var localVariable = new WriteOnce <int>(); new Action(() => localVariable.Should().HaveValue()) .Should() .Throw <Exception>() .And.Message.Should().ContainAll(nameof(localVariable)); }
public void ShouldNotThrowException() => new Action(() => _sutWithoutValue.Should().NotHaveValue()).Should().NotThrow();
public void ShouldNotThrowException() => new Action(() => { _sutWithValue .Should() .HaveValue(); }).Should().NotThrow();