using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Runtime.InteropServices;

namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter21.Listing21_20.Tests
{
    [TestClass]
    public class Listing21_20_Tests
    {

        [TestMethod]
        public void GetProcessorIdReturnsCorrectValue()
        {
            string expected = @"Identyfikator procesora: GenuineIntel";
            if (!System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                expected = "Ten przykład jest poprawny tylko w systemie Windows";
            }

                IntelliTect.TestTools.Console.ConsoleAssert.Expect(expected,
            () =>
            {
                Program.Main();
            });
        }
    }
}
