jeudi 29 janvier 2015

How to retrieve the data and put in XML file?

This is the first time I do unit testing, TDD. I get my test fail because the error show that "Systen.IO.FileNotFoundException: Could not find the file 'C:...\Application\TestBusinessLogic\ResourceModelinfo.xml'".


I do not have the file "ResourceModelinfo.xml", how do I retrieve the data?



[TestMethod]
public void CreateNewRowTest1()
{
ProjectManagerBL target = new ProjectManagerBL();
target.ProjectManagerDS = new ProjectManagerDS();

target.ProjectManagerDS.MetricModelInput.ReadXml(@"..\\..\\..\\TestBusinessLogic\\ResourceModelinfo.xml");

ProjectManagerDS.MetricModelInputRow MMIrow = target.ProjectManagerDS.MetricModelInput[0];

DataRow Actual = target.CreateNewRow(MMIrow, "To-BE");

Assert.IsNotNull(Actual);

}

Aucun commentaire:

Enregistrer un commentaire