why all the cases always return "didn't work"?
This comment is hidden because it contains spoiler information about the solution
Using random for tests is bad practice.
C# translation kumited. Kata differs just a little bit. If given parameter is 0 or negative, you should return an emtpy array. Different parameter type than integer is not included.
For me it felt a bit weired to return -1 if the function fails, instead of None or throwing an exception (did it in python), Otherwise nice kata.
Nice kata, good instructions and example tests. Randomised tests would be a good addition.
With 0 having infinite factors, I am not sure what a correct output would be so I will change description so 0 should return -1 as well.
edit: test case added too
What is the correct output when the input is 0?