Exemple #1
0
        private static bool CanRunOnCurrentRuntime(Runtimes skippedRuntimes)
        {
            if (skippedRuntimes == Runtimes.None)
            {
                return(true);
            }

            if (TestPlatformHelper.IsNETCore)
            {
                if (skippedRuntimes.HasFlag(Runtimes.NETCore))
                {
                    return(false);
                }
            }
            else if (TestPlatformHelper.IsMono)
            {
                if (skippedRuntimes.HasFlag(Runtimes.Mono))
                {
                    return(false);
                }
            }
            else if (TestPlatformHelper.IsNETFramework)
            {
                if (skippedRuntimes.HasFlag(Runtimes.NETFramework))
                {
                    return(false);
                }
            }

            return(true);
        }