Exemple #1
0
        public void OpenPathTest()
        {
            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);
            service.OpenPath(localPath + xmlName + ".xml");
            service.OpenPath(localPath + xmlName1 + ".xml");
            Assert.IsNotNull(localPath + xmlName + ".xml");
        }
 public void OpenXml([FromUri] string name)
 {
     _serializerService.OpenPath(name);
 }