• ###### eb110commented on "Product of Array Items" csharp solution

Yes indeed - there is a H U G E paragraph named EXCEPTIONS - i havn't checked that earlier on - thanks pal.

• ###### Danacommented on "Product of Array Items" csharp solution

The exceptions are generated from the Aggregate function.

This link defines the function and there is a section describing the exceptions: https://msdn.microsoft.com/en-us/library/bb548651(v=vs.110).aspx

• ###### eb110commented on "Product of Array Items" csharp solution

how come it works without argument exceptions which were a part of this kata?

• ###### Voilecommented on "Sort Letters Sum Numbers" kata

Well, you just need to generate the expected and the actual result, then use the appropriate method in `Test` to compare them, like `Test.assertEquals(actual, expected)` for primitive values and `Test.assertDeepEquals` for objects and arrays.

• ###### mattdavidacommented on "Sort Letters Sum Numbers" kata

Thanks! I'm trying to figure it out, and came up with this..
I can generate random test with a loop, but don't know how to make it work
in the test fixture...Would anyone be able to look at this below and let me know if i'm on the rght track?

``````function random(min, max) {
const random = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
const LENGTH = random(min, (max / 2));
const letters = "abcdefghijklmnopqrstuvwxyz";
let arr = [];
for(let i = 0; i < LENGTH; i++) {
arr.push(random(min, max), letters[random(min, 26)]);
}
return arr.filter(val => val !== undefined);

}

function randomTest() {
var results = random(1, 100);
randomTest.finals = sortAndSum.apply(this, results);
return results;
}

console.log("random test is: ", sortAndSum(randomTest()));
console.log("Final resuls is: ", randomTest.finals);
``````
• ###### Voilecommented on "Sort Letters Sum Numbers" kata

Random tests

Maybe this might help? It's probably not for beginners, though.

• ###### mattdavidaresolved a suggestion on "Sort Letters Sum Numbers" kata

This issue was resolved!

• ###### mattdavidaresolved an issue on "Sort Letters Sum Numbers" kata

Null issue resolved!

• ###### mattdavidacommented on "Sort Letters Sum Numbers" kata

Good catch, I will fix the null issue. Regarding Random tests.... Would anyone be willing to share any links to tutorials / documentation on how to get them set up? I am new to testing and want to make sure to do it right!

thanks!

• ###### Voilecreated an issue for "Sort Letters Sum Numbers" kata
• Random tests?
• Why suddenly `null` in the arguments?
• ###### ZozoFouchtraresolved an issue on "Sort Letters Sum Numbers" kata

"`Test.expect`-issue" solved!
; ) )

• ###### ZozoFouchtracreated an issue for "Sort Letters Sum Numbers" kata

This comment is hidden because it contains spoiler information about the solution

• ###### user8476848created a suggestion for "Sort Letters Sum Numbers" kata

This comment is hidden because it contains spoiler information about the solution