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. 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(
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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
|
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...
|
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>...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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$) {
}
...
|
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...
|
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...
|
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
|
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...
|
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...
| | |