public void CanWriteTest() { var converter = new XmlDictionaryConverter(); Assert.IsTrue(converter.CanWrite(typeof(Dictionary <string, object>))); Assert.IsTrue(converter.CanWrite(typeof(Dictionary <int, int>))); Assert.IsFalse(converter.CanWrite(typeof(object))); Assert.IsFalse(converter.CanWrite(typeof(IDictionary))); Assert.IsFalse(converter.CanWrite(typeof(Dictionary <,>))); }