/// <summary> /// Registers a pair (DTO > XML and XML > DTO) of mock mappers in the mapping engine. /// </summary> /// <typeparam name="TDto">The DTO type to register the mock mapper for.</typeparam> protected void MockMappersFor <TDto>(bool outputDefault = false) { // DTO -> XML MappingEngine.RegisterMap(new Mock <IXmlMapper <TDto, XElement> >().Object); // XML -> DTO var mock = new Mock <IXmlMapper <XPathProcessor, TDto> >(); mock.As <IXmlMapper <XPathProcessor> >(); mock.Setup(x => x.MapList(It.IsAny <XPathProcessor>(), It.IsAny <string>(), outputDefault)).Returns(new List <TDto>()); mock.Setup(x => x.MapList(It.IsAny <XPathProcessor>(), It.IsAny <string>(), It.IsAny <string>(), outputDefault)).Returns(new List <TDto>()); mock.Setup(x => x.MapList(It.IsAny <XPathProcessor>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), outputDefault)).Returns(new List <TDto>()); MappingEngine.RegisterMap(mock.Object); }