Hi Phil,
 
Rollback is for 1.1 only as it uses COM+ and that has all changed for 2.0.  If your using 1.1 I would recommend using C# for your tests and keep your production code in VB, you could also mix your tests so for row tests only you use C# and keep VB for all your other tests.
 
Andy
 
On 2/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:


Hi,



Thanks Andy, I tried it on 2005 and it works fine, not an ideal solution though as the app is deployed on a 1.1 Framework. Also when I converted my project to 2005 it now doesnt recognise the rollback attribute, was this 1.1 specific?



I was using:



<Test(), Rollback()> Public Sub...

.....

End Sub



but it now complains that type Rollback is not defined, I've tried referencing the different assemblies with no joy.



Thanks for the help.



Phil













--- On Wed 02/08, Andrew Stopford < [EMAIL PROTECTED] > wrote:

From: Andrew Stopford [mailto: [EMAIL PROTECTED]]

To: [EMAIL PROTECTED], [email protected]

Date: Wed, 8 Feb 2006 17:00:23 +0000

Subject: MbUnit Re: VB.NET



<div>I tried this on VS2003 and it looks like a limitaion of the VB compiler to let you do this. Objects are passed into this function and then cast further down the chain. Due to this limitaion I know of no way around this other than using C# for these kind of tests and using VB for others (far from ideal I know). I can confirm it works ok on VS2005 (again not much to you also) for C# and VB. If anyone does have a wrok around for this then please share.

</div>

<div></div>

<div>Andy</div>

<div><br></div>

<div><span class="gmail_quote">On 2/8/06, <b class="gmail_sendername">Andrew Stopford</b> <<a href="" [EMAIL PROTECTED]">[EMAIL PROTECTED]</a>> wrote:</span>

<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">

<div>Hi Phil,</div>

<div></div>

<div>Are you running this on VS2003? It works ok on 2005.</div>

<div></div>

<div>I guess the issue is VB, you will need to make the input values constants</div>

<div></div>

<div>Andy<br><br></div>

<div><span class="e" id="q_1094a83f716df060_1">

<div><span class="gmail_quote">On 2/8/06, <b class="gmail_sendername"><a top.js.OpenExtLink(window,event,this)" href="" href="mailto:[EMAIL PROTECTED]"> [EMAIL PROTECTED]" target="_blank">[EMAIL PROTECTED]</a></b> <

<a top.js.OpenExtLink(window,event,this)" href="" [EMAIL PROTECTED]" target="_blank">[EMAIL PROTECTED]</a> > wrote:</span>

<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><br>Hi,<br><br><br><br>Thanks for that Andy but the same problem persists.. did you actually get this to run for you?

<br><br><br><br>When I put this code in the<br><br><br><br><RowTest(), Row(1000, 10, 100.0)><br><br><br><br>portion of code underlines the numbers in blue and the hover over information states that<br><br><br><br>' Conversion from 'Double' to '

System.Object' cannot occur in a constant _expression_ '<br><br><br><br>Any ideas?<br><br><br><br>Phil<br><br><br><br><br><br><br><br><br><br>--- On Wed 02/08, Andrew Stopford < <a top.js.OpenExtLink(window,event,this)" href="" href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]" target="_blank">

[EMAIL PROTECTED] </a>> wrote:<br><br>From: Andrew Stopford [mailto: <a top.js.OpenExtLink(window,event,this)" href="" href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED] " target="_blank">[EMAIL PROTECTED]</a>]<br><br>To: <a top.js.OpenExtLink(window,event,this)" href="" [EMAIL PROTECTED]" target="_blank">

[EMAIL PROTECTED]</a><br><br>Date: Wed, 8 Feb 2006 15:43:54 +0000 <br><br>Subject: MbUnit Re: <a top.js.OpenExtLink(window,event,this)" href="" href="http://vb.net/">http://vb.net/" target="_blank">VB.NET</a><br><br><br>

<br><div>Hi,</div><br><br><div></div><br><br><div>The code you need is</div><br><br><div></div><br><br><div><font color="#0000ff" size="2"><br>

<br><p>Imports</p></font><font size="2"> MbUnit.Framework</font><font color="#0000ff" size="2"> <br><br><p>Imports</p></font><font size="2">

MbUnit.Core.Framework<br><br><p><TestFixture()> _</p></font><font color="#0000ff" size="2"><br><br><p>Public</p></font><font size="2"> </font><font color="#0000ff" size="2">Class</font><font size="2"> Class1

<br><br><p><strong><RowTest(), Row(1000, 10, 100.0)> _</strong></p><br><br><p></p></font><strong><font color="#0000ff" size="2">Public</font><font size="2"> </font><font color="#0000ff" size="2">Sub</font><font size="2"> DivTest(</font><font color="#0000ff" size="2">ByVal</font><font size="2"> numerator

<br><br></font><font color="#0000ff" size="2">As</font><font size="2"> </font><font color="#0000ff" size="2">Double</font><font size="2">, </font><font color="#0000ff" size="2">ByVal</font><font size="2"> denominator </font><font color="#0000ff" size="2">

<br><br>As</font><font size="2"> </font><font color="#0000ff" size="2">Double</font><font size="2">, </font><font color="#0000ff" size="2">ByVal</font><font size="2"> result </font><font color="#0000ff" size="2">As</font><font size="2">

<br><br></font><font color="#0000ff" size="2">Double</font></strong><font size="2"><strong>)</strong><br><br><p><strong> Assert.AreEqual(result, numerator / denominator,

0.00001)</strong></p><br><br><p></p></font><strong><font color="#0000ff" size="2">End</font><font size="2"> </font></strong><font color="#0000ff" size="2"><strong>Sub</strong>

<br><br><p>End</p></font><font size="2"> </font><font color="#0000ff" size="2">Class</font></div><br><br><div>HTH</div><br><br><div></div>

<br><br><div>Andy<br></div><br><br><div><span class="gmail_quote">On 2/8/06, <b class="gmail_sendername">Phil</b> <<a href="" top.js.OpenExtLink(window,event,this)" href="" href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]" target="_blank">

[EMAIL PROTECTED]</a>"><a top.js.OpenExtLink(window,event,this)" href="" href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]" target="_blank"> [EMAIL PROTECTED]</a></a>> wrote:</span><br>

<br><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Hi All, I'm new to MBUnit and would really appreciate it if someone<br>could provide me with a bit of help. I can use rowtest in c# like:

<br><br><br><br>[RowTest]<br>[Row(1000,10, 100.0000)]<br>[Row(-1000,10,-100.0000)]<br>[Row(1000,7,142.85715)]<br>[Row(1000,0.00001,100000000)]<br>[Row(4195835,3145729,1.3338196)]<br>public void DivTest(double numerator, double denominator, double

<br><br><br>result)<br>{<br> Assert.AreEqual(result, numerator / denominator, 0.00001 );<br>}<br><br>and it runs no problem, however I want to convert this to <a href="" top.js.OpenExtLink(window,event,this)" href="" href="http://vb.net/">http://vb.net/" target="_blank">

http://VB.NET</a>"><a top.js.OpenExtLink(window,event,this)" href="" href="http://vb.net/">http://vb.net/" target="_blank">VB.NET</a></a>, i<br>have tried numerous ways but cant get it.<br><br><br><br><RowTest, Row(1000,10,

100.0000)> public sub DivTest(byval numerator as<br>double, byval denominator as double, byval result as double)<br>{<br> Assert.AreEqual(result, numerator / denominator, 0.00001<br><br>);<br>}<br><br>complains about converting the numbers in the row() attribute to<br>objects and<br><br><br><RowTest()> _<br><Row(1000,10,

100.0000)> _<br>public sub DivTest(byval numerator as double, byval denominator as<br><br><br>double, byval result as double)<br>{<br> Assert.AreEqual(result, numerator / denominator, 0.00001 );<br>}<br><br>complains about the line continuation, please could someone point out<br>where I'm being stupid, thanks.

<br><br><br><br>Phil<br><br></blockquote></div><br><br><br><p><br><br>_______________________________________________<br>Join Excite! - <a top.js.OpenExtLink(window,event,this)" href="" href="http://www.excite.com/">http://www.excite.com/" target="_blank">

http://www.excite.com </a><br>The most personalized portal on the Web!<br><br><br></blockquote></div><br></span></div></blockquote></div><br>

<p>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



Reply via email to