Beispiel #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"));
 }
Beispiel #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));
 }
Beispiel #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"));
        }
Beispiel #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));
        }
Beispiel #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"));
        }
Beispiel #6
0
 public static void HasFeatureReturnsFalseForUnsupportedVersion()
 {
     var target = new XmlImplementation();
     Assert.False(target.HasFeature(SupportedFeature, "1.2"));
 }
Beispiel #7
0
 public static void HasFeatureReturnsFalseForUnsupportedFeature()
 {
     var target = new XmlImplementation();
     Assert.False(target.HasFeature("Unsupported", null));
 }
Beispiel #8
0
        public static void HasFeatureReturnsFalseForUnsupportedVersion()
        {
            var target = new XmlImplementation();

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

            Assert.False(target.HasFeature("Unsupported", null));
        }
Beispiel #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);
Beispiel #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));
        }