C
C#5mo 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
Pobiega5mo 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
canton75mo ago
One problem is that you've added NUnit to your Calculator project, and it should just be added to your test project
Pobiega
Pobiega5mo ago
true, good point
qqdev
qqdev5mo ago
Factorial does also look wrong to me
Pobiega
Pobiega5mo ago
the class/assembly being tested should not be aware of the tests at all
canton7
canton75mo ago
Yep, that'll give you a very big number! Those loop conditions are wrong.
Yasaki Kondo
Yasaki KondoOP5mo ago
nvm I found the problem
Yasaki Kondo
Yasaki KondoOP5mo ago
I deleted the program.cs and now I have to create it again and leave it there
No description
Pobiega
Pobiega5mo ago
if Calculator is not a class library, yes non-classlib projects need an entrypoint
Yasaki Kondo
Yasaki KondoOP5mo ago
Well I just code a long, didn't realise I did the factorial wrong thanks for the notice
canton7
canton75mo ago
It would have helped a lot if you had said what your error actually was!
Yasaki Kondo
Yasaki KondoOP5mo ago
wait didn't the error shown below? :v
Pobiega
Pobiega5mo ago
you did not 🙂
Yasaki Kondo
Yasaki KondoOP5mo ago
well it said cs5001 I think yeah Compiler Error CS5001
canton7
canton75mo 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
Pobiega5mo 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
canton75mo ago
Anyway, looks like this is resolved? $close
MODiX
MODiX5mo 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