Example #1
0
    public static void OSID_Name_Formats_Correctly()
    {
        OSID   id        = OSID.Windows_7 | OSID.Ubuntu_14_04;
        string formatted = id.Name();

        Assert.True(formatted.Contains("Windows_7") && formatted.Contains("Ubuntu_14_04"),
                    String.Format("FrameworkID.Name should have contained Windows_7 and Ubuntu_14_04, but actual was \"{0}\"", formatted));
    }
Example #2
0
    public static void ListAllOSRIDs()
    {
        string testRuntime          = OSHelper.GetRuntimeIdentifier();
        OSID   id                   = OSHelper.OSIDfromRuntimeEnvironment();
        string runtimeOSDescription = RuntimeInformation.OSDescription;

        Assert.True(false, string.Format("Detected the current Runtime Identifier as: '{0}'\n" +
                                         "Which maps to OSID: '{1}'\n" +
                                         "Detected the current runtimeOSDescription as: '{2}'", testRuntime, id.Name(), runtimeOSDescription));
    }