C
C#6mo 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
Pobiega6mo 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
canton76mo ago
One problem is that you've added NUnit to your Calculator project, and it should just be added to your test project
Pobiega
Pobiega6mo ago
true, good point
qqdev
qqdev6mo ago
Factorial does also look wrong to me
Pobiega
Pobiega6mo ago
the class/assembly being tested should not be aware of the tests at all
canton7
canton76mo ago
Yep, that'll give you a very big number! Those loop conditions are wrong.
Yasaki Kondo
Yasaki KondoOP6mo ago
nvm I found the problem
Yasaki Kondo
Yasaki KondoOP6mo ago
I deleted the program.cs and now I have to create it again and leave it there
No description
Pobiega
Pobiega6mo ago
if Calculator is not a class library, yes non-classlib projects need an entrypoint
Yasaki Kondo
Yasaki KondoOP6mo ago
Well I just code a long, didn't realise I did the factorial wrong thanks for the notice
canton7
canton76mo ago
It would have helped a lot if you had said what your error actually was!
Yasaki Kondo
Yasaki KondoOP6mo ago
wait didn't the error shown below? :v
Pobiega
Pobiega6mo ago
you did not 🙂
Yasaki Kondo
Yasaki KondoOP6mo ago
well it said cs5001 I think yeah Compiler Error CS5001
canton7
canton76mo 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!
Pobiega
Pobiega6mo ago
also, error codes just tell us what type of error it was, not what the variables are. stuff like, what file, method names, file names etc
canton7
canton76mo ago
Anyway, looks like this is resolved? $close
MODiX
MODiX6mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server