Missing something for Unit Test Renner

Hi JetBrains,

im writing a MbUnit PlugIn for ReSharper (JetBrains blogged about it
http://blogs.jetbrains.com/dotnet/2007/01/mbunit-support-in-resharper/)

But i have a problem which make a full integration of MbUnit not possible.

With MbUnit i can do an RowTest, that means running a Test with different
parameters.





public void CompareIfEqual(int a, int b)
{
Assert.AreEqual(a,b);
}

Which runs the test for each row with the given paramters (very nice!)

Also i can do some Culture Specific Test


[MultipleCulture("de-DE,en-US,en-UK")]
public void Test()
{
// Magic Test
}

Runs the Test for each culture.

For displaying every Test in the Unit Test Runner, i have to generate some
faked Method Signature for ReSharper so that R# displays a Name for each
Test.

Like this

CompareIfEqual(1,2)
CompareIfEqual(2,3)
CompareIfEqual(4,4)

Whitin the PlugIn i can tell the Unit Test Runner for each faked signature
if test is succeedd or failed.

Works so far, but only if i test the complete fixture class, if i want to
test only a specific method (with faked method names) then ReSharper dont
pass the Methodname to the PlugIn. I think ReSharper checks if the method
exists, but there is (of course) only a CompareIfEqual and not a
CompareIfEqual(1,2) method.

I would like to see an option that i can tell ReSharper don't test a
specific methodname, and pass them to the plugin regardless if the method
exists or not.

Or that i can tell ReSharper which name is the real method name (ReSharper
must still display and reacts on the faked ones) so that ReSharper can do
also a check before calling the plugin.

Or ReSharper has allready an option for that :) If not it would be nice if
it can be implemented very shortly, so that the plugin ReSharper can (with
my plugin) support the complete Range of MbUnit Test. If the PlugIn works
well it will be part of MbUnit. For that it will also be great the also
ReSharper 2.0.x will get such option.

--
Freundliche Grüße

Albert Weinert

http://der-albert.com


--
Freundliche Grüße

Albert Weinert
http://der-albert.com

0
2 comments

During assembly exploration, you returns the names of the fuxtures/tests to
the UI.
When user requests to execute test, these names will be passed to unit
runner.
So you have to parse that name to get the method name and its parameters.

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Albert Weinert" <newsH2-06@der-albert.com> wrote in message
news:1jtk7xiwjpv3m.1w01i0bhhd293$.dlg@40tude.net...

Hi JetBrains,

>

im writing a MbUnit PlugIn for ReSharper (JetBrains blogged about it
http://blogs.jetbrains.com/dotnet/2007/01/mbunit-support-in-resharper/)

>

But i have a problem which make a full integration of MbUnit not possible.

>

With MbUnit i can do an RowTest, that means running a Test with different
parameters.

>





public void CompareIfEqual(int a, int b)
{
Assert.AreEqual(a,b);
}

>

Which runs the test for each row with the given paramters (very nice!)

>

Also i can do some Culture Specific Test

>


[MultipleCulture("de-DE,en-US,en-UK")]
public void Test()
{
// Magic Test
}

>

Runs the Test for each culture.

>

For displaying every Test in the Unit Test Runner, i have to generate some
faked Method Signature for ReSharper so that R# displays a Name for each
Test.

>

Like this

>

CompareIfEqual(1,2)
CompareIfEqual(2,3)
CompareIfEqual(4,4)

>

Whitin the PlugIn i can tell the Unit Test Runner for each faked signature
if test is succeedd or failed.

>

Works so far, but only if i test the complete fixture class, if i want to
test only a specific method (with faked method names) then ReSharper dont
pass the Methodname to the PlugIn. I think ReSharper checks if the method
exists, but there is (of course) only a CompareIfEqual and not a
CompareIfEqual(1,2) method.

>

I would like to see an option that i can tell ReSharper don't test a
specific methodname, and pass them to the plugin regardless if the method
exists or not.

>

Or that i can tell ReSharper which name is the real method name (ReSharper
must still display and reacts on the faked ones) so that ReSharper can do
also a check before calling the plugin.

>

Or ReSharper has allready an option for that :) If not it would be nice if
it can be implemented very shortly, so that the plugin ReSharper can (with
my plugin) support the complete Range of MbUnit Test. If the PlugIn works
well it will be part of MbUnit. For that it will also be great the also
ReSharper 2.0.x will get such option.

>

--
Freundliche Grüße

>

Albert Weinert

>

http://der-albert.com

>
>

--
Freundliche Grüße

>

Albert Weinert
http://der-albert.com



0

Hallo Eugene Pasynkov (JetBrains),

During assembly exploration, you returns the names of the fuxtures/tests to
the UI.
When user requests to execute test, these names will be passed to unit
runner.


It will not if the method don't exist.

So you have to parse that name to get the method name and its parameters.



--
Freundliche Grüße

Albert Weinert
http://der-albert.com

0

Please sign in to leave a comment.