public void Initialize_Input_Serializers()
        {
            // arrange
            var serializer = new InputSerializer();

            // act
            var resolver = new ValueSerializerCollection(
                new IValueSerializer[] { serializer }.ToDictionary(t => t.Name));

            // assert
            Assert.True(serializer.IsInitialized);
        }
        public void Resolve_Serializer_Not_Found()
        {
            // arrange
            var resolver = new ValueSerializerCollection(
                ValueSerializers.All.ToDictionary(t => t.Name));

            // act
            Action action = () => resolver.Get("Foo");

            // assert
            Assert.Throws <ArgumentException>(action);
        }
        public void Resolve_TypeName_Is_Null()
        {
            // arrange
            var resolver = new ValueSerializerCollection(
                ValueSerializers.All.ToDictionary(t => t.Name));

            // act
            Action action = () => resolver.Get(null);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
        public void Resolve_Serializer()
        {
            // arrange
            var resolver = new ValueSerializerCollection(
                ValueSerializers.All.ToDictionary(t => t.Name));

            // act
            IValueSerializer serializer = resolver.Get("String");

            // assert
            Assert.NotNull(serializer);
            Assert.Equal("String", serializer.Name);
        }