# Question about this unit test - NUnit

**URL:** <https://forum.codewithmosh.com/t/question-about-this-unit-test-nunit/12434>\
**Category:** C#\
**Created:** [May 14, 2022, 12:25am UTC](https://forum.codewithmosh.com/t/question-about-this-unit-test-nunit/12434 "2022-05-14T00:25:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdrianDamiao](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AdrianDamiao](https://forum.codewithmosh.com/u/AdrianDamiao)\
**Post date:** [May 14, 2022, 12:25am UTC](https://forum.codewithmosh.com/t/question-about-this-unit-test-nunit/12434/1 "2022-05-14T00:25:24Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/d/d0dfd675dd28ca4b82151230211f35b9cd094382.jpeg)

---

<div class="post-metadata">

**Author:** ![eelsholz](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@eelsholz](https://forum.codewithmosh.com/u/eelsholz)\
**Post date:** [May 14, 2022, 1:30am UTC](https://forum.codewithmosh.com/t/question-about-this-unit-test-nunit/12434/2 "2022-05-14T01:30:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AdrianDamiao](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AdrianDamiao](https://forum.codewithmosh.com/u/AdrianDamiao)\
**Post date:** [May 14, 2022, 1:49am UTC](https://forum.codewithmosh.com/t/question-about-this-unit-test-nunit/12434/3 "2022-05-14T01:49:40Z")

</div>

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.
