Commit Graph
28 Commits
Author SHA1 Message Date
Chris Webb 1a3ec8c3b3 Fixed issue related to fully qualified namespaces being used for XmlEnumAttribute values. 2014-08-07 06:15:55 +00:00
Eberhard Beilharz c0ef1fcb02 [Sys.Xml] Add unit test for Novell bug #594490
The unit test demonstrates the problem of serializing the
xml:lang attribute.
2014-02-27 15:57:57 +01:00
Sebastien Pouliot c3b782f4ec Do not assume the unit tests can write in the application directory (e.g. iOS devices). Use the temporary directory and open files in read-only 2013-03-18 17:38:28 -04:00
scott fluto 207ce0bccc [708178] - Type check invalid and breaks XmlSerialization if serializing ICollection<> types 2011-07-28 15:19:43 -06:00
Atsushi Eno 2cc686a3af Fix bug 704813: just ignore members of type IEnumerable`1 without Add(). 2011-07-16 06:48:41 -07:00
Atsushi Eno ae6c7511d1 Fix for bug #430759.
svn path=/trunk/mcs/; revision=117965
2008-11-05 11:54:29 +00:00
Atsushi Eno 6959e0c1d3 2007-09-25 Atsushi Enomoto <[email protected]>
* XmlSerializerTests.cs : added deserialization test for
	  XmlSchemaProviderAttribute use.
	* XmlReflectionImporterTests.cs : added test for conclict resolution
	  between defaultNamespace and XmlSchemaProvider() namespace.
	* XmlSchemaExporterTests.cs : use Infoset() comparison.

	* XmlTypeMapping.cs : Namespace and XmlTypeNamespace could be
	  different when an explicit namespace is specified (e.g. at
	  XmlReflectionImporter.ctor).
	* SerializationCodeGenerator.cs,
	  XmlSerializationWriterInterpreter.cs :
	  revert XmlTypeMapping.XmlTypeNamsepace usage. Now with the fix
	  above, original code should work fine.


svn path=/trunk/mcs/; revision=86346
2007-09-25 17:35:18 +00:00
Atsushi Eno 1e597c4439 2007-09-25 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, XmlSerializationWriterInterpreter.cs,
	  SerializationCodeGenerator.cs :
	  More XmlSchemaProviderAttribute method check. Use QName returned
	  by the method for the output root name.

	* XmlSerializerTests.cs, XmlReflectionImporterTests.cs :
	  added tests for XmlSchemaProviderAttribute and how its qname works.


svn path=/trunk/mcs/; revision=86340
2007-09-25 15:55:48 +00:00
Atsushi Eno 6f08261d8a 2007-08-21 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs : do not reject XmlArrayAttribute on
	  byte[] (processed as primitive SchemaType). Fixed bug #81880.

	* XmlReflectionImporterTest.cs : test for bug #81880.


svn path=/trunk/mcs/; revision=84548
2007-08-21 13:10:37 +00:00
Konstantin Triger 0ad165b0d7 TARGET_JVM: #7461 is fixed
svn path=/trunk/mcs/; revision=76892
2007-05-08 06:53:02 +00:00
Konstantin Triger 5147da7b64 TARGET_JVM: Ignore failing tests
svn path=/trunk/mcs/; revision=73607
2007-03-01 16:39:21 +00:00
Atsushi Eno 2e220d6ca3 2007-02-19 Atsushi Enomoto <[email protected]>
* XmlTypeMapElementInfo.cs : set nullable if the type is Nullable<T>.

	* XmlReflectionImporterTests.cs : added another test for nullable
	  container.


svn path=/trunk/mcs/; revision=73120
2007-02-19 15:44:36 +00:00
Atsushi Eno ad569e528f 2007-02-19 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs : CanBeNull() should return true when the
	  argument is generic nullable value type.

	* XmlReflectionImporterTests.cs : added test for nullable int import.


svn path=/trunk/mcs/; revision=73117
2007-02-19 13:56:15 +00:00
Atsushi Eno 11124928cd 2007-01-15 Atsushi Enomoto <[email protected]>
* TypeData.cs : reject generic type definitions.
	* TypeTranslator.cs : Make generic type names in XML compatible with
	  .net: foo_x0060_1 -> fooOfString.

	* XmlSerializerTests.cs : most of generic tests are working now.
	* XmlReflectionImporterTests.cs : test for rejecting generic type
	  definition.


svn path=/trunk/mcs/; revision=71001
2007-01-15 05:26:35 +00:00
Atsushi Eno 53fe340a95 2006-11-22 Atsushi Enomoto <[email protected]>
Fixed bug #78611.
	* TypeData.cs, TypeTranslator.cs: improved TypeData to actually store
	  "nullable" information. Introduced new primitiveNullableTypes pool
	  whose TypeData has 'true' for new IsNullable property. This
	  property is also used for non-primitive types.
	* XmlReflectionImporter.cs : there, use TypeData.IsNullable instead
	  of IsValueType, to handle nullable types.

	* XmlReflectionImporterTests.cs : added test for class that contains
	  nullable value type field whose XmlElementAttribute IsNullable.


svn path=/trunk/mcs/; revision=68341
2006-11-22 11:37:28 +00:00
Atsushi Eno 3b1767cacf eol-style:native.
svn path=/trunk/mcs/; revision=67663
2006-11-10 10:13:46 +00:00
Gert Driesen b5eb88c87f * DeserializeTest.cs: Added several tests.
* XmlSerializerTestClasses.cs: Added test classes for encoded SOAP.
* XmlSerializerTests.cs: Added new tests and fixed existing test.
* XmlReflectionImporterTests.cs: Added test for invalid default
values.
* SoapReflectionImporterTests.cs: Fixed numbering of tests.
* XmlSerializer.cs: Corrected exception message when deserialization
fails.
* SerializationCodeGenerator.cs: Added support for flag enums.
* XmlReflectionImporter.cs: Use InvalidOperationException wrapper for
all exceptions that occur while reflecting member. Validate default
values to match MS.
* SoapReflectionImporter.cs: Revert small part of previous patch as
XmlSerializer expects enum value.

svn path=/trunk/mcs/; revision=66524
2006-10-10 17:53:49 +00:00
Gert Driesen 4262df8c45 * XmlReflectionImporterTests.cs: Added ImportTypeMapping tests for
void and null type argument. Improved WrongChoices test to make sure
the exception(s) we throw match those of MSFT. Added test for bug
#77591.
* XmlReflectionImporter.cs: Throw NotSupportException instead of
InvalidOperationException (IOE) if void is specified as type in
ImportTypeMapping. To match MS.NET, surround importing of type in
try/catch block, and wrap any IOE in another IOE adding information
on the type that was being reflected. In CreateTypeMapping, surround
creating of map member in try/catch block, and wrap any IOE in another
IOE adding information on the member that was being reflected.
Modified exception message for missing enumeration value to match
MS.NET. In ImportTextElementInfo, throw IOE if Type is set in
XmlTextAttribute, and it differs from type of reflected member when
schema type of member is primitive or enum. Fixed bug #77591.

svn path=/trunk/mcs/; revision=58314
2006-03-22 20:25:21 +00:00
Gert Driesen e9f16365f6 * TypeData.cs: Fixed the following issues when dealing with Array
SchemaType:
- if a type implements IDictionary, throw a NotSupportedException
- if a type implements ICollection, then an Add method must exist
  which takes a single argument of a type to which the listitem type
  is assignable (meaning a base type or an interface that it
  implements). If such a method does not exist, then throw an
  InvalidOperationException.
- if a type implements IEnumerable, then the listitem type is
  determined by the type of the Current property of the (IEnumerator)
  type returned by the GetEnumerator() method or the private
  implementation of IEnumerable.GetEnumerator(). If there's no
  public Current property on the IEnumerator, then System.Object
  is assumed as listitem type. Similar as for types implementing
  ICollection, an Add method must exist which takes a single argument
  of a type to which the listitem type is assignable (meaning a base
  type or an interface that it implements). If such a method does not
  exist, then throw an InvalidOperationException.
* XmlReflectionImporter.cs: Enabled few tests for bug #77531.
* SoapReflectionImporter.cs: Enabled few tests for bug #77531.

svn path=/trunk/mcs/; revision=56956
2006-02-16 18:46:54 +00:00
Gert Driesen 919663d3dd * XmlReflectionImporterTests.cs: Added test for IDictionary import. Set eol
style to CRLF.
* SoapReflectionImporterTests.cs: Added test for IDictionary import.

svn path=/trunk/mcs/; revision=56800
2006-02-11 14:16:27 +00:00
Gert Driesen 514da3a616 * XmlReflectionImporterTests.cs: Marked tests NotWorking until fixes have
landed in svn.
* SoapReflectionImporterTests.cs: Added numerous tests.
* XmlSchemaImporterTests.cs: Added numerous tests.
* XmlSchemaExporterTests.cs: Added numerous tests.
* SoapSchemaExporterTests.cs: Added numerous tests.
* XmlSerializerTestClasses.cs: Added test classes for
XmlSchemaExporter. Fixed line endings (to CRLF).

svn path=/trunk/mcs/; revision=55929
2006-01-23 07:17:04 +00:00
Gert Driesen 91a95ca4e1 * System.Xml_test.dll.sources: Added SoapSchemaExporterTests.cs,
SoapReflectionImporterTests.cs, XmlSchemaImporterTests.cs.
* XmlReflectionImporterTests.cs: Added numerous tests. No longer
derive from Assertion.
* SoapReflectionImporterTests.cs: Added numerous tests.
* XmlSchemaImporterTests.cs: Added numerous tests.
* XmlSchemaExporterTests.cs: Added numerous tests.
* SoapSchemaExporterTests.cs: Added numerous tests.

svn path=/trunk/mcs/; revision=55191
2006-01-07 18:52:24 +00:00
Lluis Sanchez 539cf95e9c 2005-03-30 Lluis Sanchez Gual <[email protected]>
* XmlSerializerTests.cs:
	* XmlReflectionImporterTests.cs:
	* DeserializeTests.cs:
	* XmlSerializerTestClasses.cs: Added tests for serialization of choices.


svn path=/trunk/mcs/; revision=42417
2005-03-31 08:40:30 +00:00
Atsushi Eno da23068c98 2005-02-28 Atsushi Enomoto <[email protected]>
* XmlSchemaTests.cs : just set NotWorking for trivial comparison tests.

	* XmlReflectionImporterTests.cs : set NotWorking for trivial empty
	  string comparison.

	* MsxslScriptTests.cs,
	  XslTransformTests.cs : set NotWorking for msxsl:script tests (they
	  premise runnable compilers existence which actually might not exist.)


svn path=/trunk/mcs/; revision=41273
2005-02-28 05:13:56 +00:00
David Sheldon 9524252976 2004-03-13 David Sheldon <[email protected]>
* XmlReflectionImporterTests.cs: Switched the AssertEquals around
   the other way, so that the expecteed value was the first parameter.
   This makes the error messages you get out of it better.

svn path=/trunk/mcs/; revision=23971
2004-03-13 01:44:59 +00:00
Lluis Sanchez 06cd746bed * DeserializeTests.cs: Added test for empty enum deserialization (bug #55509).
* XmlAttributesTests.cs, XmlReflectionImporterTests.cs,
	  XmlSerializationWriterTests.cs, XmlSerializerTests.cs:
	  Simplified namespace hierarchy.
	* XmlSerializerTestClasses.cs: Added more test classes.

svn path=/trunk/mcs/; revision=23956
2004-03-12 15:55:33 +00:00
Martin Willemoes Hansen ba234c2a4a * Tests inherits from Assertion and Assertion. prefixes removed
svn path=/trunk/mcs/; revision=14558
2003-05-13 20:41:56 +00:00
Atsushi Eno 551cf034be 2003-04-25 Atsushi Enomoto <[email protected]>
* added XmlReflectionImporterTests.cs : added. (by Erik)

svn path=/trunk/mcs/; revision=13996
2003-04-25 03:17:46 +00:00