This type contains a collection of inner exceptions which are aggregated. The greater than operator in this class is supposed to throw an exception if either of the objects are null. I'm using fluentassertions with nunit and i realize that the method throw() and other related methods is not listed for me to use
Model's 'tone deaf' advice to a 'lost' follower: Kerri Gribble boasts
Do i have to install any other package to have access to this method?
When writing automated tests, verifying that a certain piece of code throws the expected exception is just as important as verifying positive outcomes
Fluent assertions in c# makes exception. The most basic way to test for exceptions with fluentassertions is to use the should().throw() method This method allows you to specify the type of exception that you expect to be thrown, and it will fail the test if the exception is not thrown or if a different exception is thrown. I always forget the syntax when verifying that async methods throw a particular exception with fluentassertions
I would like to use fluent assertions.should().throw, but do not want to hardcode the type of the expected exception, instead i want it parametrized, so it is in a variable which type is type. There is 2 overload methods on data.should ().contain So in your case it would be something like this When using the code provided within the github repository for this project, i noticed that i am unable to make use of a shouldthrow() method (apparently it should be provided by fluent assertions)
I did find a post on stackoverflow which looked very similar to the problem i am having.
I'm trying to write a unit test for a greater than overridden operator using fluent assertions in c#