I suggest you ...

Allow use of DataTestMethod / DataRow in all unit testing projects

As I understand it these attributes are limited to use in WinRT/Metro and now with update 2, Windows Phone 8. It would be very helpful to be able to use them in all test projects e.g.

[DataTestMethod]
[DataRow("a", "b")]
[DataRow(" ", "a")]
public void TestMathos1(string value1, string value2)
{
Assert.AreEqual(value1 + value2, string.Concat(value1, value2));
}

476 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Simon VaneSimon Vane shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    7 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Jocke EkJocke Ek commented  ·   ·  Flag as inappropriate

        Please include the feature for all application types, it's very useful when writing tests. Should be included in a unit test framework.

      • Kevin AungKevin Aung commented  ·   ·  Flag as inappropriate

        This would help a lot. I really like mstest but thinking about switching to NUnit because they have this feature.

      • Simon VaneSimon Vane commented  ·   ·  Flag as inappropriate

        We ended up switching to nunit. There are far too many features missing from mstest to bother persevering with it.

      • AA commented  ·   ·  Flag as inappropriate

        People have been requesting this feature for years.
        Its a bit of a slap in the face to see it in Wart/Metro and not have it for real .Net projects.

      • Joshua DeLongJoshua DeLong commented  ·   ·  Flag as inappropriate

        I agree. You can reference the library in your test project now manually but the Test Explorer will not find the test methods. The library on depends on mscorlib, System, and System.Core so there is no reason why we shouldn't be able to use it in other test projects.

      Feedback and Knowledge Base