subject.Invoking(y => y.Foo("Hello"))
.Should().Throw<InvalidOperationException>()
.WithMessage("Hello is not allowed at this moment");
[Test]
public void GreaterThan_NullAsRhs_ThrowsException()
{
var lhs = new ClassWithOverriddenOperator();
var rhs = (ClassWithOverriddenOperator) null;
Action comparison = () => { var res = lhs > rhs; };
comparison.Should().Throw<Exception>();
}