Exemple #1
0
        public void GetXmlInfoTest()
        {
            string localPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"\Xml\";
            string xmlName   = "Opp";
            string xmlName1  = "AddOpp";
            var    mock      = new Mock <IOoportunityService>();

            mock.Setup(m => m.GetOpportunities()).Returns(new List <OpportunityDTO> {
                new OpportunityDTO
                {
                    OpportunityId = "1"
                }
            });
            SerializerService service = new SerializerService(mock.Object);

            service.CreateXml(xmlName);
            service.CreateXml(xmlName1);
            Assert.AreEqual(localPath + xmlName1 + ".xml", service.GetXmlInfo()[0]);
            Assert.AreEqual(localPath + xmlName + ".xml", service.GetXmlInfo()[1]);
        }
 public List <string> GetXmlInfo()
 {
     return(_serializerService.GetXmlInfo());
 }