I have read through fluentassertions.com and still confused as to what happens if a var is null or not null.
so for instance if you have
object someitem = null;
then have
someitem.Should().NotBeNull();
what happens if it is null? this example is pretty much the same code I am reviewing of another coder. to me it seems like Should().NotBeNull() should return a boolean value but I am not seeing that in any documentation I have reviewed. If it does simply just return a boolean value I don't understand why the code someitem.Should().NotBeNull(); would be all by itself.
I know some may say well run the code and set a break point to see what it is doing. unfortunately I cannot run the code from my box due to not having a dev db setup and don't have direct access to live db. So running the code does nothing for me.
If someItem
is null an exception will be thrown, otherwise it will pass the assertion and the test will succeed.
You can see how the exception is thrown on each testing framework on the Execution folder https://github.com/fluentassertions/fluentassertions/tree/master/Src/FluentAssertions/Execution