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));
}

549 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 →

    8 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...
      • John TheisenJohn Theisen commented  ·   ·  Flag as inappropriate

        And 5 more months have gone by and still this feature 1) has no reason for having been implemented only for windows store apps 2) missed the market completely by focusing on a segment that needs it less than the other segments 3) and it is YEARS behind the other major frameworks. People, let's get with this! You are forcing devs/tests to cut and paste tests and leads to reduced agility.

      • 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