Jonas Nyrup

Results 305 comments of Jonas Nyrup

For ```c# car.Should().NotBeNull(); ``` the return type of `NotBeNull` in this example `AndConstraint`, which is used to chain multiple assertions. The return type is independent of whether I'm using an...

By default the analogy holds, but consumers are able to override that behavior. So we can't statically guarantee `car` to *always* be not `null`. I'm not deep into using these...

I'm not sure I follow. Replacing `Assert.IsNotNull()` with `Should().NotBeNull()` will work, i.e. checking whether the subject is `null`. If that case should be documented for `NotBeNull`, then *all* assertions should...

Some thoughts I think we should have in mind: Just because SemVer allows us breaking everything doesn't mean we have to - or should. The more exposed an API is,...

Interesting use case, I definitely see why you want a higher-level assertion. I'm not sure the recursive search should be the default behavior of `WithInnerException`, as it might be slightly...

If we could change `ContainItemsAssignableTo` to return an `AndWhichConstraint` we could do this. ```cs action.Should().Throw() .WhoseInnerExceptionChain.Should().ContainItemsAssignableTo() .Which.Should().HaveCount(42); ``` But I'm not sure this is possible since we also support checking...

@ITaluone I'm not sure what you're asking for? I'm still in a brain storming phase exploring different shapes for the feature, both in terms of functionality and naming.

If `WhoseInnerExceptionChain` returns an `IEnumerable` and we want to be able to write `action.Should().Throw().WhoseInnerExceptionChain.Should().XYZ()` I guess we have to look at both exceptions and collections in general at the same...

I bluntly admit it's not at all visible, but you should also test cases to `Fake_should_method_throws` and `ClassesWithGuardEquals`.

> I'm really wondering on this report. I did not change only one line. > > What target framework is analyzed? According to my analysis net6 seems to be used!?...