Sha256: 8677445738f5dccb77ccc94cd1c7b023e99b32d884e5eee0d58c2a9375c4d8b1

Contents?: true

Size: 1023 Bytes

Versions: 7

Compression:

Stored size: 1023 Bytes

Contents

using System.Collections.Generic;
using Generators.Input;

namespace Generators.Exercises
{
    public class Anagram : Exercise
    {
        protected override void UpdateCanonicalData(CanonicalData canonicalData)
        {
            foreach (var canonicalDataCase in canonicalData.Cases)
            {
                canonicalDataCase.ConstructorInput = new Dictionary<string, object>
                {
                    ["subject"] = canonicalDataCase.Input["subject"]
                };
                canonicalDataCase.Input.Remove("subject");
                canonicalDataCase.Input["candidates"] = canonicalDataCase.Input["candidates"].ConvertToEnumerable<string>();
                canonicalDataCase.Expected = canonicalDataCase.Expected.ConvertToEnumerable<string>();

                canonicalDataCase.UseVariablesForInput = true;
                canonicalDataCase.UseVariableForExpected = true;
                canonicalDataCase.TestedMethodType = TestedMethodType.Instance;
            }
        }
    }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
trackler-2.2.1.22 tracks/csharp/generators/Exercises/Anagram.cs
trackler-2.2.1.21 tracks/csharp/generators/Exercises/Anagram.cs
trackler-2.2.1.20 tracks/csharp/generators/Exercises/Anagram.cs
trackler-2.2.1.19 tracks/csharp/generators/Exercises/Anagram.cs
trackler-2.2.1.18 tracks/csharp/generators/Exercises/Anagram.cs
trackler-2.2.1.17 tracks/csharp/generators/Exercises/Anagram.cs
trackler-2.2.1.16 tracks/csharp/generators/Exercises/Anagram.cs