diff options
Diffstat (limited to 'mcs/class/System.XML/Test')
13 files changed, 54 insertions, 43 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs index 0e91387a4be..779c8bd1e1e 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs @@ -173,6 +173,7 @@ namespace MonoTests.System.Xml } [Test] + [Category ("MobileNotWorking")] public void TestSimpleMutualImport () { XmlReader r = new XmlTextReader ("Test/XmlFiles/xsd/inter-inc-1.xsd"); diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs index 718e62c1fff..20b0d5dbaf8 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 +#if !MOBILE using System; using System.CodeDom; diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs index 5b8d9de6dcc..7311fbb27e8 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 +#if !MOBILE using System; using System.CodeDom; diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs index 9f0e0191135..b1c7597c150 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs @@ -7,6 +7,8 @@ // (C) 2005 Novell // +#if !MOBILE + using System; using System.Collections; using System.Globalization; @@ -1159,3 +1161,5 @@ namespace MonoTests.System.XmlSerialization } } } + +#endif
\ No newline at end of file diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs index 25a1ecf74bf..91f0ed1d282 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs @@ -8,6 +8,8 @@ // (C) 2006 Novell // +#if !MOBILE + using System; using System.CodeDom; using System.CodeDom.Compiler; @@ -1304,3 +1306,5 @@ namespace MonoTests.System.XmlSerialization } } } + +#endif diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs index f8713258a0f..fc55852869d 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs @@ -1783,11 +1783,9 @@ namespace MonoTests.System.XmlSerialization [Test] #if NET_2_0 [Category ("NotWorking")] // support for XmlSchemaProvider is not implemented -#else - [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn #endif public void ExportXmlSerializable_SchemaProvider1 () { - XmlSchemas schemas = schemas = Export (typeof (PrimitiveSchemaProvider)); + XmlSchemas schemas = Export (typeof (PrimitiveSchemaProvider)); Assert.AreEqual (1, schemas.Count, "#1"); StringWriter sw = new StringWriter (); diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs index 80958667639..fe4838cb2e9 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs @@ -39,8 +39,9 @@ using System.IO; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; +#if !MOBILE using Microsoft.CSharp; - +#endif using NUnit.Framework; using MonoTests.System.Xml.TestClasses; @@ -891,6 +892,8 @@ namespace MonoTests.System.Xml.Serialization Assert.AreEqual ("UInt16", map.TypeName, "#6"); } +#if !MOBILE + [Test] public void ImportTypeMapping_EnumSimpleContent () { @@ -1075,30 +1078,6 @@ namespace MonoTests.System.Xml.Serialization return null; } - private static XmlSchemas ExportType (Type type) - { - XmlReflectionImporter ri = new XmlReflectionImporter ("NS" + type.Name); - XmlSchemas schemas = new XmlSchemas (); - XmlSchemaExporter sx = new XmlSchemaExporter (schemas); - XmlTypeMapping tm = ri.ImportTypeMapping (type); - sx.ExportTypeMapping (tm); - return schemas; - } - - private static ArrayList GetXmlQualifiedNames (XmlSchemas schemas) - { - ArrayList qnames = new ArrayList (); - - foreach (XmlSchema schema in schemas) { - if (!schema.IsCompiled) schema.Compile (null); - foreach (XmlSchemaObject ob in schema.Items) - if (ob is XmlSchemaElement) - qnames.Add (((XmlSchemaElement) ob).QualifiedName); - } - - return qnames; - } - [Test] [ExpectedException (typeof (InvalidOperationException))] public void ImportTypeMappingNonExistent () @@ -1238,5 +1217,31 @@ namespace MonoTests.System.Xml.Serialization xss.Add (XmlSchema.Read (new XmlTextReader (new StringReader (xsd)), null)); return new XmlSchemaImporter (xss); } + +#endif + + private static ArrayList GetXmlQualifiedNames (XmlSchemas schemas) + { + ArrayList qnames = new ArrayList (); + + foreach (XmlSchema schema in schemas) { + if (!schema.IsCompiled) schema.Compile (null); + foreach (XmlSchemaObject ob in schema.Items) + if (ob is XmlSchemaElement) + qnames.Add (((XmlSchemaElement) ob).QualifiedName); + } + + return qnames; + } + + private static XmlSchemas ExportType (Type type) + { + XmlReflectionImporter ri = new XmlReflectionImporter ("NS" + type.Name); + XmlSchemas schemas = new XmlSchemas (); + XmlSchemaExporter sx = new XmlSchemaExporter (schemas); + XmlTypeMapping tm = ri.ImportTypeMapping (type); + sx.ExportTypeMapping (tm); + return schemas; + } } } diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs index a7f00ab1e24..ed63ede99fa 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs @@ -2187,8 +2187,7 @@ namespace MonoTests.System.XmlSerialization ser.Deserialize (new XmlTextReader (xml, XmlNodeType.Document, null)); } -#if NET_2_0 -#if !TARGET_JVM +#if !TARGET_JVM && !MOBILE [Test] public void GenerateSerializerGenerics () { @@ -2266,7 +2265,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (TestEnumWithNulls.bb, w.nenum.Value); Assert.AreEqual (t, w.ndate.Value); } -#endif [Test] public void SerializeBase64Binary() diff --git a/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs index 4df96725fbb..657d672e5bc 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs @@ -18,11 +18,6 @@ namespace MonoTests.System.Xml [TestFixture]
public class XmlDocumentEventTests
{
- public static void Main ()
- {
- new XmlDocumentEventTests ().InsertingOrder ();
- }
-
private StringBuilder eventLogBuilder = new StringBuilder ();
private XmlDocument GetEventDocument ()
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs index d8035e4d010..52de90d1414 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs @@ -27,6 +27,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +#if !MOBILE + using NUnit.Framework; using System; @@ -82,3 +84,5 @@ namespace MonoCasTests.System.Xml { } } } + +#endif
\ No newline at end of file diff --git a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs index 0603a694d42..c97407de984 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs @@ -8,6 +8,8 @@ // Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) // +#if !MOBILE + using System; using System.Collections; using System.IO; @@ -132,3 +134,4 @@ namespace MonoTestsXml } } +#endif diff --git a/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs index 17e94fc1567..59752547bc0 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs @@ -104,19 +104,17 @@ namespace MonoTests.System.Xml #if NET_4_5
[Test]
- [Category("Async")]
public void TestAsync ()
{
var loc = Assembly.GetExecutingAssembly ().Location;
Uri resolved = resolver.ResolveUri (null, loc);
Assert.AreEqual ("file", resolved.Scheme);
var task = resolver.GetEntityAsync (resolved, null, typeof (Stream));
- Assert.That (task.Wait (3000));
- Assert.IsInstanceOfType (typeof (Stream), task.Result);
+ Assert.IsTrue (task.Wait (3000));
+ Assert.IsTrue (task.Result is Stream);
}
[Test]
- [Category("Async")]
public void TestAsyncError ()
{
var loc = Assembly.GetExecutingAssembly ().Location;
@@ -129,7 +127,7 @@ namespace MonoTests.System.Xml } catch (Exception ex) {
if (ex is AggregateException)
ex = ((AggregateException) ex).InnerException;
- Assert.IsInstanceOfType (typeof (XmlException), ex);
+ Assert.IsTrue (ex is XmlException);
}
}
#endif
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs index 6ade78b4461..bd5cb6af26f 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs @@ -47,6 +47,7 @@ namespace MonoTests.System.Xml } [Test] + [Category ("MobileNotWorking")] public void EncodingTest () { // For Stream it makes sense |