public void TypeRendererMap_AddRenderer_ActuallyAddsRenderer() { var map = new TypeRendererMap(new KeyValuePair <Type, IPropertyRenderer>(typeof(Exception), new ExceptionAsXmlRenderer())); map.AddRenderer(typeof(DateTime), new ToStringRenderer()); Assert.IsNotNull(map.GetRenderer <DateTime>()); }
public void TypeRendererMap_RemoveRenderer_ActuallyRemovesRenderer() { var map = new TypeRendererMap(new KeyValuePair <Type, IPropertyRenderer>(typeof(Exception), new ExceptionAsXmlRenderer())); map.RemoveRenderer(typeof(Exception)); Assert.IsNull(map.GetRenderer <Exception>()); }
public void TypeRendererMap_GetRendererReturnsRenderer() { var map = new TypeRendererMap(new KeyValuePair <Type, IPropertyRenderer>(typeof(Exception), new ExceptionAsXmlRenderer())); Assert.IsNotNull(map.GetRenderer(typeof(Exception))); }