Question

I trying to remove my xmlSerializer dependency, and use a xmlSerializer mock using rhinomocks. But it seems like IXmlSerializer doesnt get implimented by XmlSerializer. Am I wrong? How do I inject my xmlserializer dependency?

Was it helpful?

Solution

Do write a wrapper around the XmlSerializer and use the wrapper as in

 public class XmlSerializerWrapper:IXmlSerializerWrapper
  {
       private XmlSerializer _serializer;

      //implement some methods that you need from XmlSerializer
  }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top