Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The test looks if the exception is raised, not the text returned. You can just divide by 0 there and it will pass the test.
Division by zero should raise an error. In C# when I use a try catch statement, I get
Expected: < System.DivideByZeroException >
But was: null
example:
try
{
a / b; // b is 0
}
catch(DivideByZeroException e)
{
return e.ToString();
}
Test is not passed when doing it this way. Why? :)