Hi,
 
Try the following xpath
 
   [XmlDataProvider("C:/sample.xml", "DataFixture/Customers")]
 
if that does'nt work I would also try
 
   [XmlDataProvider("C:\\sample.xml", "DataFixture/Customers")]
 
Let me know if its still not working for you.
 
Andy

 
On 12/8/05, GatoRat <[EMAIL PROTECTED]> wrote:

I cannot get DataFixture tests to run. I even created a small test
(dll) assembly using your sample code with the same xml file. I am
using 2.3.7 and TestDriven 1256d. I am using .NET 2.0 and Visual Studio
2005 release. A standard test worked fine. My .cs test file is:

using System;
using System.Text;
using MbUnit.Framework;
using System.Xml;

namespace MbUnitTest
{
       [DataFixture]
       [XmlDataProvider("C:/sample.xml", "DataFixture/Customers")]
       public class DataDrivenTests
       {
               [ForEachTest("/User")]
               public void ForEachTest(XmlNode node)
               {
                       Assert.IsNotNull(node);
                       Assert.AreEqual("User", node.Name);
                       Console.WriteLine(node.OuterXml);
               }
       }
}

My XML file is:

<DataFixture>
<Employees>
   <User Name="Mickey" LastName="Mouse" />
</Employees>
<Customers>
   <User Name="Jonathan" LastName="de Halleux" />
   <User Name="Voldo" LastName="Unkown" />
</Customers>
</DataFixture>


Reply via email to