Question about this unit test - NUnit

I was watching a video class from the Unit Testing for C# Developers course and in that class, Mosh said that there were two ways to test the type of a return. I did it in a third way that looks a lot like the first one, could someone tell me if it’s wrong to do it this way?

Why do you think yours might be wrong? I think both styles are easy to read.

1 Like

Thanks for your answer, I’m new to using the GetType method and the typeof operator so I was a little suspicious about how they would work.