C
C#3mo ago
Yasaki Kondo

✅ Trying out NUnit test, I need help!

Help I don't understand what I'm doing wrong here
No description
No description
18 Replies
Pobiega
Pobiega3mo ago
why would anything be wrong here? it seems fine, at a glance. @Yasaki Kondo can you explain what the problem you are having is?
canton7
canton73mo ago
One problem is that you've added NUnit to your Calculator project, and it should just be added to your test project
Pobiega
Pobiega3mo ago
true, good point
qqdev
qqdev3mo ago
Factorial does also look wrong to me
Pobiega
Pobiega3mo ago
the class/assembly being tested should not be aware of the tests at all
canton7
canton73mo ago
Yep, that'll give you a very big number! Those loop conditions are wrong.
Yasaki Kondo
Yasaki Kondo3mo ago
nvm I found the problem
Yasaki Kondo
Yasaki Kondo3mo ago
I deleted the program.cs and now I have to create it again and leave it there
No description
Pobiega
Pobiega3mo ago
if Calculator is not a class library, yes non-classlib projects need an entrypoint
Yasaki Kondo
Yasaki Kondo3mo ago
Well I just code a long, didn't realise I did the factorial wrong thanks for the notice
canton7
canton73mo ago
It would have helped a lot if you had said what your error actually was!
Yasaki Kondo
Yasaki Kondo3mo ago
wait didn't the error shown below? :v
Pobiega
Pobiega3mo ago
you did not 🙂
Yasaki Kondo
Yasaki Kondo3mo ago
well it said cs5001 I think yeah Compiler Error CS5001
canton7
canton73mo ago
Yep, that doesn't appear in your screenshots. Also I don't have 1000's of error codes memorised, so the error text is very useful!
Want results from more Discord servers?
Add your server