Ejemplo n.º 1
0
        public void AddJsonTypeAny_registersSerializers()
        {
            var services = new ServiceCollection();
            var builder  = new SerializerBuilder(services);

            builder.AddJsonTypeAny();

            services.Should().BeEquivalentTo(new[]
            {
                new { ServiceType = typeof(IJsonSerializer), ImplementationType = new { Name = "DefaultJsonSerializer" } },
                new { ServiceType = typeof(ISerializer <>), ImplementationType = new { Name = "TypedJsonSerializer`1" } }
            });
        }