473,385 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Complex attributes in MbUnit, Rowtest and Row

MJG
With the MbUnit test framework there's a nice compact syntax for writing an
"array" of tests.

In C# this looks like:

[TestFixture]
public class DivisionFixture
{
[RowTest]
[Row(1000,10,100.0000)]
[Row(-1000,10,-100.0000)]
[Row(1000,7,142.85715)]
[Row(1000,0.00001,100000000)]
[Row(4195835,3145729,1.3338196)]
public void DivTest(double numerator, double denominator, double
result)
{
Assert.AreEqual(result, numerator / denominator, 0.00001 );
}
}

I'm attempting to use this in VB.NET but don't know the equivalent syntax.
Is it even possible?

I've tried things like:
<RowTest()><Row(1000, 10, 100.0)> Public Sub Test...

And a few variations but the syntax checker rejects them all!!
If you know about this I'd appreciate some insight.

Mike.
Nov 21 '05 #1
2 1910
On 2004-12-09, MJG <ny*************@nguruwenospamdecisionz.spamcom> wrote:
With the MbUnit test framework there's a nice compact syntax for writing an
"array" of tests.

In C# this looks like:

[TestFixture]
public class DivisionFixture
{
[RowTest]
[Row(1000,10,100.0000)]
[Row(-1000,10,-100.0000)]
[Row(1000,7,142.85715)]
[Row(1000,0.00001,100000000)]
[Row(4195835,3145729,1.3338196)]
public void DivTest(double numerator, double denominator, double
result)
{
Assert.AreEqual(result, numerator / denominator, 0.00001 );
}
}

I'm attempting to use this in VB.NET but don't know the equivalent syntax.
Is it even possible?

I've tried things like:
<RowTest()><Row(1000, 10, 100.0)> Public Sub Test...


<RowTest(), Row(1000,10,100.0000), Row(-1000,7,142.85715> _
Public Sub DivTest(

or you could still use '_' to put them on separate lines

<RowTest(), _
Row(1000,10,100.0000), _
Row(-1000,7,142.85715> _
Public SUb DivTest(

Nov 21 '05 #2
MJG
I tried that
<RowTest(), Row(1000,10,100.0000), Row(-1000,7,142.85715)>
style of syntax. It chokes on the bracketed parameters in Row.

I'd still like to know how, but this code goes to C#. Another project
needed.
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ramon | last post by:
Hi! I have a fairly complex object (with other objects as attributes (which in turn, have other objects as attributes), methods, etc) and I would like to save it to the disc so I can load it in...
0
by: Ayende Rahien | last post by:
Why does MbUnit insist on checking my floppy? Complete explanation here: http://www.ayende.com/Blog/PermaLink,guid,8d0dfd6b-ba4b-4a7f-a491-62b8d65701b7.aspx
11
by: Sven Neuberg | last post by:
Hi, I have been handed the task of updating and maintaining a web application, written in ASP and Javascript, that takes complex user inputs in HTML form and submits them to server-side ASP...
9
by: Kanchana D S | last post by:
Hi, I have a complex type which has to have its content in the xml instance document as shown below : <CONFIG_INFO> <country resourceNumber="20004" fieldSecurity="5, 5">Great Britain</label>...
17
by: Chris Travers | last post by:
Hi all; I just made an interesting discovery. Not sure if it is a good thing or not, and using it certainly breakes first normal form.... Not even sure if it really works. However, as I am...
2
by: Soren Kuula | last post by:
Looks like a silly question? I'm in doubt! - the Recommendation does it (anyType / anySimple type) - it's possible to restrict away all optional elements and attributes from a mixed complex...
1
by: avanti | last post by:
The framework we use, uses MbUnit and the QE runs the tests through the UI shortcuts. The link to the report then shows up in the output window when the run is completed. Is there a way to write...
0
by: Suppi | last post by:
Hi all, we're doing a lot of xml/java (de)serialization and thus have defined a bigger type hierarchy in xml-schema. It starts with basic complex type as base classes. These are extended via...
0
by: sayor | last post by:
Hi, I am writing a schema to check for empty elements in an XML file. I am able to do so for simple elements such as: <xs:element name="authorname" type ="requiredstring"></xs:element> by...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.