public void CpuArchitecture_Windows()
        {
            var task = new CpuArchitecture();

            Assert.That(task.Execute(), Is.True);
            Assert.That(task.Value, Is.EqualTo(Environment.Is64BitOperatingSystem ? "x64" : "x86"));
        }
示例#2
0
        public void Test_CpuArchitecture()
        {
            var task = new CpuArchitecture();

            Assert.IsTrue(task.Execute());
            if (Environment.OSVersion.Platform == System.PlatformID.Unix)
            {
                if (Environment.Is64BitOperatingSystem)
                {
                    Assert.AreEqual("x86_64", task.Value);
                }
                else
                {
                    Assert.AreEqual("i686", task.Value);
                }
            }
            else
            {
                if (Environment.Is64BitOperatingSystem)
                {
                    Assert.AreEqual("x64", task.Value);
                }
                else
                {
                    Assert.AreEqual("x86", task.Value);
                }
            }
        }