Version 4.11.1 (no reports in 4.11.0)
From rule description I expect such asserts not rise analyzer warning, but probably something doesn't work as expected.
Some examples where I have it:
Assert.That(() =>
{
...
}, Throws.InstanceOf<ArgumentOutOfRangeException>().With.Property(nameof(ArgumentOutOfRangeException.ParamName)).EqualTo("exponentialBase"));
Assert.That(
() => db.GetTable<Child>().ToList(),
Throws.TypeOf<ArgumentException>()
.Or.TypeOf<InvalidOperationException>()
.Or.TypeOf<MySqlException>());
Assert.That(() => query.ToList(), Throws.InvalidOperationException.With.Message.EqualTo("Cannot construct object 'Tests.Linq.EagerLoadingTests+EntityA'. Following members are not assignable: ObjectBRO."));
As all reports are quite complex, I suspect analyzer ignores only simple Throws expressions.
Version 4.11.1 (no reports in 4.11.0)
From rule description I expect such asserts not rise analyzer warning, but probably something doesn't work as expected.
Some examples where I have it:
As all reports are quite complex, I suspect analyzer ignores only simple Throws expressions.