Sha256: 605ea2df8c655589013398c16e76518800f312e84a3aa17ffc64f44cfb449448

Contents?: true

Size: 878 Bytes

Versions: 8

Compression:

Stored size: 878 Bytes

Contents

using Generators.Input;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;

namespace Generators.Exercises
{
    public class WordCount : Exercise
    {
        protected override void UpdateCanonicalData(CanonicalData canonicalData)
        {
            foreach (var canonicalDataCase in canonicalData.Cases)
            {
                canonicalDataCase.UseVariableForExpected = true;
                canonicalDataCase.UseVariableForTested = true;
                canonicalDataCase.Expected = ((JObject)canonicalDataCase.Expected).ToObject<Dictionary<string, int>>();
            }
        }

        protected override HashSet<string> GetUsingNamespaces()
        {
            var usingNamespaces = base.GetUsingNamespaces();
            usingNamespaces.Add(typeof(Dictionary<string, int>).Namespace);

            return usingNamespaces;
        }
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

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