That's because you are multiply the matches of 'DataFixture/annuity' times '//annuity': 24 x 24 =  526.
 
use this to solve your problem:
    [ForEachTest(".")]


 
On 9/21/06, Jay <[EMAIL PROTECTED]> wrote:

I'm using MbUnit ver 2.3.72 (MbUnit.Framework.dll ver 1.0.2419.37446).
I have an xml document with 24 elements in it. Each element looks like
this:
<annuity distChannel="1" prodLine="20" plan="1" billingMode="60"
initialPrem = "10000.00" billingPrem="10000.00" />

with varying data in the first couple of attributes. The test looks
something like this:

[DataFixture()]
[XmlDataProvider("annuitytest.xml", "DataFixture/annuity")]
public class AnnuityPresentorTest
{
....declare local var

[ForEachTest("//annuity")]
public void AnnuityTest(XmlNode node)
{
//<annuity distChannel="1" prodLine="20" plan="4" billingMode="998"
initialPrem = "10000.00" billingPrem="10000.00 " />

   _distChannel =
Convert.ToInt32(node.Attributes["distChannel"].Value);
   _prodLine = Convert.ToInt32(node.Attributes["prodLine"].Value);
   _plan = Convert.ToInt32(node.Attributes ["plan"].Value);
   _billMode = Convert.ToInt32(node.Attributes["billingMode"].Value);
   _initPay = Convert.ToDecimal(node.Attributes["initialPrem"].Value);
   _billPayment =
Convert.ToDecimal (node.Attributes["billingPrem"].Value);

   ...run through a handful of asserts
}

Problem is that when I load this up in the MbUnit gui it tells me I
have 576 tests. I would expect to see 24 tests. I've stepped through
the code in the tests and it does try and execute the tests 576 times.
It appears to be squaring the number of elements in the XML document.
It also appears to be running through the document completely and then
starting over again, not running each element x number of times.

Any ideas.

Jay







--
This posting is provided "AS IS" with no warranties, and confers no rights.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/MbUnitUser
-~----------~----~----~----~------~----~------~--~---

Reply via email to