Beispiel #1
0
        private static void CheckWindows7CompatMode()
        {
            switch (AstoriaTestProperties.WindowsCompatFlag)
            {
            case WindowsCompatFlag.None:
                return;

            case WindowsCompatFlag.Vista:
                throw new NotImplementedException("Vista Compatible Mode Check Not Implemented");

            case WindowsCompatFlag.Win7:
                // Check that if we are running on Win7 then we are in Win7 compat mode
                if (OsCompatibility.IsWindows7CompatibilitySupported)
                {
                    try
                    {
                        OsCompatibility.EnsureWindows7DynamicContextIsActive();
                    }
                    catch (Exception e)
                    {
                        AstoriaTestLog.Warning(false, e.ToString());
                    }
                    AstoriaTestLog.WriteLineIgnore("Verified that we are running in Win7 compat mode");
                }
                else
                {
                    AstoriaTestLog.WriteLineIgnore("Win7 compat mode not supported");
                }
                break;

            case WindowsCompatFlag.Win8:
                throw new NotImplementedException("Windows 8 Compatible Mode Check Not Implemented");

            default:
                throw new NotImplementedException("Unknown Compatible Mode Check Not Implemented");
            }
        }