Sha256: 2508abb4eda8613c78233c9e2c2d62355a8f434890362aa304a96a15111601f5
Contents?: true
Size: 1023 Bytes
Versions: 86
Compression:
Stored size: 1023 Bytes
Contents
using System; using System.Linq; using Generators.Input; using Newtonsoft.Json.Linq; namespace Generators.Exercises { public class PascalsTriangle : GeneratorExercise { protected override void UpdateCanonicalData(CanonicalData canonicalData) { //remove null case until canonical data is updated var cases = canonicalData.Cases.ToList(); cases.RemoveAll(x => x.Properties["count"] == null); canonicalData.Cases = cases.ToArray(); foreach (var canonicalDataCase in canonicalData.Cases) { canonicalDataCase.UseVariableForExpected = true; canonicalDataCase.Property = "calculate"; if (!(canonicalDataCase.Expected is JArray)) canonicalDataCase.ExceptionThrown = typeof(ArgumentOutOfRangeException); if (canonicalDataCase.Properties["count"] == null) canonicalDataCase.Properties["count"] = -1; } } } }
Version data entries
86 entries across 86 versions & 1 rubygems