Example #1
0
        public void Skips_BothMacOSXAndWindows()
        {
            // Act
            var osSkipAttribute       = new SkipOnOSAttribute(OS.Windows | OS.MacOS, OS.Windows, string.Empty);
            var osSkipAttributeMacOSX = new SkipOnOSAttribute(OS.Windows | OS.MacOS, OS.MacOS, string.Empty);

            // Assert
            Assert.False(osSkipAttribute.IsMet);
            Assert.False(osSkipAttributeMacOSX.IsMet);
        }
Example #2
0
        public void Skips_BothWindowsAndLinux()
        {
            // Act
            var osSkipAttribute      = new SkipOnOSAttribute(OS.Linux | OS.Windows, OS.Windows, string.Empty);
            var osSkipAttributeLinux = new SkipOnOSAttribute(OS.Linux | OS.Windows, OS.Linux, string.Empty);

            // Assert
            Assert.False(osSkipAttribute.IsMet);
            Assert.False(osSkipAttributeLinux.IsMet);
        }
Example #3
0
        public void Skips_BothMacOSXAndLinux()
        {
            // Act
            var osSkipAttributeLinux  = new SkipOnOSAttribute(OS.Linux | OS.MacOS, OS.Linux, string.Empty);
            var osSkipAttributeMacOSX = new SkipOnOSAttribute(OS.Linux | OS.MacOS, OS.MacOS, string.Empty);

            // Assert
            Assert.False(osSkipAttributeLinux.IsMet);
            Assert.False(osSkipAttributeMacOSX.IsMet);
        }
Example #4
0
        public void DoesNotSkip_WhenOperatingSystemDoesNotMatch()
        {
            // Act
            var osSkipAttribute = new SkipOnOSAttribute(
                OS.Linux,
                OS.Windows,
                "2.5");

            // Assert
            Assert.True(osSkipAttribute.IsMet);
        }
Example #5
0
        public void Skips_WhenOnlyOperatingSystemIsSupplied()
        {
            // Act
            var osSkipAttribute = new SkipOnOSAttribute(
                OS.Windows,
                OS.Windows,
                "2.5");

            // Assert
            Assert.False(osSkipAttribute.IsMet);
        }
Example #6
0
        public void DoesNotSkip_WhenVersionsDoNotMatch()
        {
            // Act
            var osSkipAttribute = new SkipOnOSAttribute(
                OS.Windows,
                OS.Windows,
                "2.5",
                "10.0");

            // Assert
            Assert.True(osSkipAttribute.IsMet);
        }
Example #7
0
        public void DoesNotSkip_WhenOnlyVersionsMatch()
        {
            // Act
            var osSkipAttribute = new SkipOnOSAttribute(
                OS.Linux,
                OS.Windows,
                "2.5",
                "2.5");

            // Assert
            Assert.True(osSkipAttribute.IsMet);
        }
Example #8
0
        public void Skips_WhenVersionsMatches(string currentOSVersion, string skipVersion)
        {
            // Act
            var osSkipAttribute = new SkipOnOSAttribute(
                OS.Windows,
                OS.Windows,
                currentOSVersion,
                skipVersion);

            // Assert
            Assert.False(osSkipAttribute.IsMet);
        }
Example #9
0
        public void Skips_WhenVersionsMatchesOutOfMultiple()
        {
            // Act
            var osSkipAttribute = new SkipOnOSAttribute(
                OS.Windows,
                OS.Windows,
                "2.5",
                "10.0", "3.4", "2.5");

            // Assert
            Assert.False(osSkipAttribute.IsMet);
        }