Sha256: 325c796efdac61e09009015fb4690bc9ee9cf04e1e6f5b17235b6edd80c39dfc

Contents?: true

Size: 1.04 KB

Versions: 28

Compression:

Stored size: 1.04 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.Input.ContainsKey("students"))
                    canonicalDataCase.SetConstructorInputParameters("diagram", "students");
                else
                    canonicalDataCase.SetConstructorInputParameters("diagram");

                var plants = (IEnumerable<string>)canonicalDataCase.Expected;
                canonicalDataCase.Expected = plants
                    .Select(x => new UnescapedValue($"Plant.{x.Humanize()}"))
                    .ToArray();
            }
        }
    }
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/csharp/generators/Exercises/KindergartenGarden.cs
trackler-2.2.1.158 tracks/csharp/generators/Exercises/KindergartenGarden.cs
trackler-2.2.1.157 tracks/csharp/generators/Exercises/KindergartenGarden.cs
trackler-2.2.1.156 tracks/csharp/generators/Exercises/KindergartenGarden.cs
trackler-2.2.1.155 tracks/csharp/generators/Exercises/KindergartenGarden.cs
trackler-2.2.1.154 tracks/csharp/generators/Exercises/KindergartenGarden.cs
trackler-2.2.1.153 tracks/csharp/generators/Exercises/KindergartenGarden.cs
trackler-2.2.1.152 tracks/csharp/generators/Exercises/KindergartenGarden.cs