Sha256: 288a5c558b3339192cd054a4a18f56493905bce8553691f6ce26286e2e4a485d
Contents?: true
Size: 1.08 KB
Versions: 86
Compression:
Stored size: 1.08 KB
Contents
using System.Collections.Generic; using System.Linq; using Generators.Input; using Generators.Output; using Humanizer; namespace Generators.Exercises { public class KindergartenGarden : GeneratorExercise { protected override void UpdateCanonicalData(CanonicalData canonicalData) { foreach (var canonicalDataCase in canonicalData.Cases) { canonicalDataCase.TestedMethodType = TestedMethodType.Instance; canonicalDataCase.UseFullDescriptionPath = true; if (canonicalDataCase.Properties.ContainsKey("students")) canonicalDataCase.SetConstructorInputParameters("diagram", "students"); else canonicalDataCase.SetConstructorInputParameters("diagram"); var plants = (IEnumerable<string>)canonicalDataCase.Properties["expected"]; canonicalDataCase.Properties["expected"] = plants .Select(x => new UnescapedValue($"Plant.{x.Humanize()}")) .ToArray(); } } } }
Version data entries
86 entries across 86 versions & 1 rubygems