unit testing .net.standard for all platforms RRS feed

  • Question

  • Hello,

    I have a simple Problem:

    I have an own large library with many classes as .net.standard library.

    Now I want to unit test it.

    For this I want to use Visual Studio Testtools UnitTesting.

    I want to write the unit-test-Code ONE-TIME.

    Best would be as .net.standard-lib.

    After this I want to raise the Tests from .net47, xamarin.droid, and so on.

    I cannot only test it from .net47 - because I have injections from Special platforms as .net47, xamarin.droid-native, uwp.

    Because .net.standard is only a specification this means, that each platform implements the functionality of .net.standard.

    So, I must raise the Tests from each platform.

    As I see, it is not possible to use

    Microsoft.VisualStudio.TestTools.UnitTesting; Namespace in a net.standard.lib.

    So, how to do it - write the Tests once - test for all platforms?

    Remark: I cannot use .net.core - because this would not be the implemenation of .net.standard for net47 or xamarin, and would not have my platform-specific injections.

    Thank you for any help.


    Tuesday, June 13, 2017 6:35 PM

All replies