public void DuplicateKey()
        {
            var registry = new ConverterRegistry {
                new GuidConverter()
            };

            Assert.Throws <ArgumentException>(() => registry.Add(new AnotherGuidConverter()));
        }
        public void ToConverterDictionary()
        {
            var registry = new ConverterRegistry
            {
                new GuidConverter(),
                new EmailConverter()
            };
            var dictionary = registry.ToConverterDictionary();

            registry.Add(new CustomPlayerConverter());

            // We shouldn't have CustomPlayer in the dictionary, but we should have the other two.
            Assert.Equal(new[] { typeof(Email), typeof(Guid) }, dictionary.Keys.OrderBy(t => t.FullName));
        }