That did the trick. I figured it had something to do with that.

Jay

Jonathan de Halleux wrote:
> 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.
>
> ------=_Part_3598_2067034.1158906255626
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2712
>
> <div>That's because you are multiply the matches of 'DataFixture/annuity' 
> times&nbsp;'//annuity': 24 x 24 =&nbsp;&nbsp;526.</div>
> <div>&nbsp;</div>
> <div>use this to solve your problem:</div>
> <div>&nbsp;&nbsp;&nbsp; 
> [ForEachTest(<strong>&quot;.&quot;</strong>)]<br><br><br>&nbsp;</div>
> <div><span class="gmail_quote">On 9/21/06, <b 
> class="gmail_sendername">Jay</b> &lt;<a href="mailto:[EMAIL 
> PROTECTED]">[EMAIL PROTECTED]</a>&gt; wrote:</span>
> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 
> 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>I'm using MbUnit ver 2.3.72 
> (MbUnit.Framework.dll ver 1.0.2419.37446).<br>I have an xml document with 24 
> elements in it. Each element looks like
> <br>this:<br>&lt;annuity distChannel=&quot;1&quot; prodLine=&quot;20&quot; 
> plan=&quot;1&quot; billingMode=&quot;60&quot;<br>initialPrem = 
> &quot;10000.00&quot; billingPrem=&quot;10000.00&quot; /&gt;<br><br>with 
> varying data in the first couple of attributes. The test looks
> <br>something like 
> this:<br><br>[DataFixture()]<br>[XmlDataProvider(&quot;annuitytest.xml&quot;, 
> &quot;DataFixture/annuity&quot;)]<br>public class 
> AnnuityPresentorTest<br>{<br>....declare local 
> var<br><br>[ForEachTest(&quot;//annuity&quot;)]
> <br>public void AnnuityTest(XmlNode node)<br>{<br>//&lt;annuity 
> distChannel=&quot;1&quot; prodLine=&quot;20&quot; plan=&quot;4&quot; 
> billingMode=&quot;998&quot;<br>initialPrem = &quot;10000.00&quot; 
> billingPrem=&quot;10000.00
> &quot; /&gt;<br><br>&nbsp;&nbsp; _distChannel 
> =<br>Convert.ToInt32(node.Attributes[&quot;distChannel&quot;].Value);<br>&nbsp;&nbsp;
>  _prodLine = 
> Convert.ToInt32(node.Attributes[&quot;prodLine&quot;].Value);<br>&nbsp;&nbsp; 
> _plan = Convert.ToInt32(node.Attributes
> [&quot;plan&quot;].Value);<br>&nbsp;&nbsp; _billMode = 
> Convert.ToInt32(node.Attributes[&quot;billingMode&quot;].Value);<br>&nbsp;&nbsp;
>  _initPay = 
> Convert.ToDecimal(node.Attributes[&quot;initialPrem&quot;].Value);<br>&nbsp;&nbsp;
>  _billPayment =<br>Convert.ToDecimal
> (node.Attributes[&quot;billingPrem&quot;].Value);<br><br>&nbsp;&nbsp; ...run 
> through a handful of asserts<br>}<br><br>Problem is that when I load this up 
> in the MbUnit gui it tells me I<br>have 576 tests. I would expect to see 24 
> tests. I've stepped through
> <br>the code in the tests and it does try and execute the tests 576 
> times.<br>It appears to be squaring the number of elements in the XML 
> document.<br>It also appears to be running through the document completely 
> and then
> <br>starting over again, not running each element x number of 
> times.<br><br>Any 
> ideas.<br><br>Jay<br><br><br><br><br></blockquote></div><br><br 
> clear="all"><br>-- <br>This posting is provided &quot;AS IS&quot; with no 
> warranties, and confers no rights.
> 
> ------=_Part_3598_2067034.1158906255626--


--~--~---------~--~----~------------~-------~--~----~
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