divyang4481 / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Row Tests with enum are not recognized in VS2010 #791

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create an enum as follows:
  public enum Platform
  {
    Prometeo,
    P10
  }

2.Create a row test as follows:
    [Test]
    [Row(Platform.P10)]
    [Row(Platform.Prometeo)]
    public void TestName(Platform platform)
    {
      Assert.IsTrue(true);
    }

3.Run the tests with Visual Studio 2010
4.Run the tests with TestDriven.NET (or Icarus)

What is the expected output? What do you see instead?
Visual Studio doesn't recognize the rows and, in fact, do nothing; 
TestDriven.NET and Icarus, instead, do the 2 tests.

What version of the product are you using? On what operating system?
Gallio v3.2 RTM (build 603) - x86
Visual Studio 2010
Windows XP SP3 32bit

Please provide any additional information below.
At the beginning, I thought it was that MbUnit does not allow to use enums with 
Row attributes but I couldn't find any hint in that direction; moreover, if 
Icarus executes the tests, I conclude that MbUnit supports enums with Row.

Original issue reported on code.google.com by ivan.muz...@gmail.com on 23 Dec 2010 at 11:20

GoogleCodeExporter commented 8 years ago
MbUnit indeed supports tests with enums but the Visual Studio add in has some 
problems enumerating them because of the way it uses Cecil to explore the tests.

Original comment by jeff.br...@gmail.com on 24 Dec 2010 at 7:52

GoogleCodeExporter commented 8 years ago
OK! I see! ...but, are there any plans to fix this?

Original comment by ivan.muz...@gmail.com on 18 Jan 2011 at 1:57

GoogleCodeExporter commented 8 years ago
We accept patches :)

Original comment by grahamr...@gmail.com on 26 Feb 2011 at 1:36

GoogleCodeExporter commented 8 years ago
Is any update on this?  Will this be a Microsoft bug instead?  I am using the 
latest Gallio 3.2.3 and having the same problem.  The workaround is to use 
either string or int values and then parse them back into enum in the test body.

Original comment by giavinh....@gmail.com on 29 Mar 2011 at 8:49