Esempio n. 1
0
 public static void HasFeatureReturnsTrueForSupportedVersion()
 {
     var target = new XmlImplementation();
     Assert.True(target.HasFeature(SupportedFeature, null));
     Assert.True(target.HasFeature(SupportedFeature, "1.0"));
     Assert.True(target.HasFeature(SupportedFeature, "2.0"));
 }
Esempio n. 2
0
 public static void HasFeatureReturnsTrueForSupportedFeature()
 {
     var target = new XmlImplementation();
     // verify that it's also case-insensitive
     Assert.True(target.HasFeature(SupportedFeature.ToUpper(), null));
     Assert.True(target.HasFeature(SupportedFeature.ToLower(), null));
 }
Esempio n. 3
0
        public static void HasFeatureReturnsTrueForSupportedVersion()
        {
            var target = new XmlImplementation();

            Assert.True(target.HasFeature(SupportedFeature, null));
            Assert.True(target.HasFeature(SupportedFeature, "1.0"));
            Assert.True(target.HasFeature(SupportedFeature, "2.0"));
        }
Esempio n. 4
0
        public static void HasFeatureReturnsTrueForSupportedFeature()
        {
            var target = new XmlImplementation();

            // verify that it's also case-insensitive
            Assert.True(target.HasFeature(SupportedFeature.ToUpper(), null));
            Assert.True(target.HasFeature(SupportedFeature.ToLower(), null));
        }
Esempio n. 5
0
        public static void TestForFeatureSome()
        {
            var imp = new XmlImplementation();

            Assert.False(imp.HasFeature("some", "1.0"));
            Assert.False(imp.HasFeature("some", "2.0"));
            Assert.False(imp.HasFeature("some", "3.0"));
        }
Esempio n. 6
0
 public static void HasFeatureReturnsFalseForUnsupportedVersion()
 {
     var target = new XmlImplementation();
     Assert.False(target.HasFeature(SupportedFeature, "1.2"));
 }
Esempio n. 7
0
 public static void HasFeatureReturnsFalseForUnsupportedFeature()
 {
     var target = new XmlImplementation();
     Assert.False(target.HasFeature("Unsupported", null));
 }
Esempio n. 8
0
        public static void HasFeatureReturnsFalseForUnsupportedVersion()
        {
            var target = new XmlImplementation();

            Assert.False(target.HasFeature(SupportedFeature, "1.2"));
        }
Esempio n. 9
0
        public static void HasFeatureReturnsFalseForUnsupportedFeature()
        {
            var target = new XmlImplementation();

            Assert.False(target.HasFeature("Unsupported", null));
        }
Esempio n. 10
0
 /// <summary>
 /// Tests if this DOM implementation implements a specific feature.
 /// </summary>
 /// <param name="feature">The feature.</param>
 /// <param name="version">The feature version.</param>
 /// <returns><B>True</B> or <B>false</B>.</returns>
 public bool hasFeature(string feature, string version) => XmlImplementation.HasFeature(feature, version);
Esempio n. 11
0
        public static object hasFeature([This] DOMImplementation instance, string feature, string version)
        {
            XmlImplementation impl = (instance != null ? instance.XmlImplementation : new XmlImplementation());

            return(impl.HasFeature(feature, version));
        }