using System.Collections.Generic; using NUnit.Framework; [TestFixture] public class ETLTest { [Ignore] [Test] public void Transforms_one_value() { var old = new Dictionary> { { 1, new List { "A" } } }; var expected = new Dictionary { { "a", 1 } }; Assert.That(ETL.Transform(old), Is.EqualTo(expected)); } [Ignore] [Test] public void Transforms_multiple_values() { var old = new Dictionary> { { 1, new List { "A", "E", "I", "O", "U" } } }; var expected = new Dictionary { { "a", 1 }, { "e", 1 }, { "i", 1 }, { "o", 1 }, { "u", 1 } }; Assert.That(ETL.Transform(old), Is.EqualTo(expected)); } [Ignore] [Test] public void Transforms_multiple_keys() { var old = new Dictionary> { { 1, new List { "A", "E" } }, { 2, new List { "D", "G" } } }; var expected = new Dictionary { { "a", 1 }, { "e", 1 }, { "d", 2 }, { "g", 2 } }; Assert.That(ETL.Transform(old), Is.EqualTo(expected)); } [Ignore] [Test] public void Transforms_a_full_dataset() { var old = new Dictionary> { { 1, new List { "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" } }, { 2, new List { "D", "G" } }, { 3, new List { "B", "C", "M", "P" } }, { 4, new List { "F", "H", "V", "W", "Y" } }, { 5, new List { "K" } }, { 8, new List { "J", "X" } }, { 10, new List { "Q", "Z" } }, }; var expected = new Dictionary { { "a", 1 }, { "b", 3 }, { "c", 3 }, { "d", 2 }, { "e", 1 }, { "f", 4 }, { "g", 2 }, { "h", 4 }, { "i", 1 }, { "j", 8 }, { "k", 5 }, { "l", 1 }, { "m", 3 }, { "n", 1 }, { "o", 1 }, { "p", 3 }, { "q", 10 }, { "r", 1 }, { "s", 1 }, { "t", 1 }, { "u", 1 }, { "v", 4 }, { "w", 4 }, { "x", 8 }, { "y", 4 }, { "z", 10 } }; Assert.That(ETL.Transform(old), Is.EqualTo(expected)); } }