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")); }
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)); }
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))); }