public void Char_Int_GetAllPatterns_Duplicate()
        {
            var target = new InsertOnlyTrie <char, int>();

            target.Add("abc", 1);
            target.Add("abc", 1);
            target.Add("abc", 1);

            var result = target.GetAllPatterns().ToList();

            result.Count.Should().Be(1);
            result[0].Should().BeEquivalentTo(new[] { 'a', 'b', 'c' });
        }
        public void Char_Int_GetAllPatterns()
        {
            var target = new InsertOnlyTrie <char, int>();

            target.Add("abc", 1);
            target.Add("abd", 2);
            target.Add("aef", 3);
            target.Add("aeg", 4);
            target.Add("hij", 5);

            var result = target.GetAllPatterns().ToList();

            result.Count.Should().Be(5);
            result[0].Should().BeEquivalentTo(new[] { 'a', 'b', 'c' });
            result[1].Should().BeEquivalentTo(new[] { 'a', 'b', 'd' });
            result[2].Should().BeEquivalentTo(new[] { 'a', 'e', 'f' });
            result[3].Should().BeEquivalentTo(new[] { 'a', 'e', 'g' });
            result[4].Should().BeEquivalentTo(new[] { 'h', 'i', 'j' });
        }