示例#1
0
        public void when_registering_multiple_types_then_the_type_can_be_found()
        {
            var sut = new ConfigurableSerializationTypeMap();

            sut.RegisterTypes(typeof(OrderCreated).GetTypeInfo().Assembly, t => t.Namespace != null && t.Namespace.EndsWith("Events"), t => t.Name);

            Assert.That(sut.GetTypeFromName("OrderCreated"), Is.EqualTo(typeof(OrderCreated)));
        }
示例#2
0
        public void when_registering_a_type_then_the_type_can_be_found()
        {
            var sut = new ConfigurableSerializationTypeMap();

            sut.RegisterType("OrderCreated", typeof(OrderCreated));

            Assert.That(sut.GetTypeFromName("OrderCreated"), Is.EqualTo(typeof(OrderCreated)));
        }