예제 #1
0
        public void when_registering_a_type_then_the_name_can_be_found()
        {
            var sut = new ConfigurableSerializationTypeMap();

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

            Assert.That(sut.GetNameFromType(typeof(OrderCreated)), Is.EqualTo("OrderCreated"));
        }
예제 #2
0
        public void when_registering_a_type_with_a_null_type_then_an_exception_is_thrown()
        {
            var sut = new ConfigurableSerializationTypeMap();

            Assert.Throws <ArgumentNullException>(() => sut.RegisterType("TEST", null));
        }
예제 #3
0
        public void when_registering_a_type_with_a_null_event_type_then_an_exception_is_thrown()
        {
            var sut = new ConfigurableSerializationTypeMap();

            Assert.Throws <ArgumentException>(() => sut.RegisterType(null, typeof(OrderCreated)));
        }