Commit Graph
55 Commits
Author SHA1 Message Date
Alexander Köplinger 98cf04084a [bcl] Remove NET_4_0 defines from class libs
NET_4_0 is always defined now, so the ifdefs are redundant.
I verified the libs are exactly the same after this change, so this is effectively a no-op.
2015-07-26 15:01:49 +02:00
Jo Shields 775ce53a74 Use random port numbers for ServiceModel tests.
This prevents race conditions when running multiple test suites at once on the same computer, as happens on our ARM builders.
2015-06-15 12:39:07 +01:00
Alexander Köplinger ddcfc42070 Cleanup namespace names of class lib tests to follow convention
A couple of the test suites didn't follow the MonoTests.<namespace of class under test> naming convention for the namespace.
2014-09-04 18:55:58 +02:00
Martin Baulig ea2f2cde42 [WCF]: Fix MessageEncoder.IsContentTypeSupported().
Use the internal 'Channels.ContentType' class to parse the
content type, make then comparision case-insensitive and ignore
missing parameters.
2012-12-22 05:14:26 +01:00
Martin Baulig c1b505c0ca [WCF]: Implement and improve missing WsdlExporter pieces.
* We now export simple <wsp:Policy>, currently supporting only
  those elements that WsdlImporter can import.

  WsdlImporter:
  https://github.com/mono/mono/commit/cdc98dba1b83341c25a1daab4ae7c217d4961ad1

* Implement `MetadataExporter.Errors' and use it for error
  reporting.

* Fixed WsdlExporter's caching to correclty deal with duplicate
  ExportContract() and ExportEndpoint() calls.

* Emit <soap12:operation> depending on the binding's MessageVersion.
  (FIXME: I didn't implement soap faults yet).

* MetadataTests: Check whether the policy elements are correct.

* MetadataTests: Add test containing simple [OperationContract] method
  for http and net.tcp; checks the <soap:operation> / <soap12:operation>
  elements.

* New test to check WsdlExporter's behavior regarding duplicate
  contracts and endpoints.

* ConnectionOrientedTransportBindingElement.cs, CustomBindingTests.cs,
  HttpTransportBindingElementTest.cs: Added test for custom message
  encodings.
2012-12-05 23:58:12 +01:00
Atsushi Eno e8cc6770c2 support action parameter in SOAP 1.2 content type. Close pull request #133. 2011-07-19 02:28:59 +09:00
Atsushi Eno 509f45a0ae finally implement Message.ToString() as in expected form.
Regressions on this method has caused several unpredictable errors,
so I avoided this for somewhat long time...
2011-06-14 18:43:29 +09:00
Sebastien Pouliot c5549b4868 Add (disabled) unit tests for sync use of CommunicationObject
* System.ServiceModel_test.dll.sources: Add new files to the tests
* Test/NUnitMoonHelper.cs: Helper to re-use Moonlight unit tests on NUnit
* Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs: New.
2011-05-09 13:48:54 -04:00
Atsushi Eno cc60bcc264 Some argument check in TextMessageEncoder. 2011-04-15 23:48:31 +09:00
Alan McGovern b374a393db [System.ServiceModel] return the same object reference from MessageVersion.CreateVersion
The Silverlight SDK assemblies rely on this behaviour as do the new tests.
2011-04-14 11:00:33 +01:00
Carlos Alberto Cortez 4ba9634043 Add IPolicyExportExtension tests for classes in System.ServiceModel.Channels.
* CustomPolicyConversionContext.cs: New file, containing a dummy
	child of PolicyConversionContext.
	* MsmqBindingElementBaseTest.cs: New test file.
	* ConnectionOrientedTransportBindingElementTest.cs: New test file.
	* HttpTransportBindingElementTest.cs: Add IPolicyExportExtension
	tests.
2010-11-04 21:20:54 +01:00
Atsushi Eno 34e1278179 Implement NetTcpBinding.CanBuildChannelFactory/Listener and several related stuff.
SecurityTokenParameters.InitializeSecurityTokenRequirement() needs to become
protected internal, so changed all overrides as well.

Some implementation in WindowsStreamSecurityBindingElement is needed only for
NetTcpBinding implementation.

Had to disable a test in SymmetricSecurityBindingElement that depended on
OneWay support (which is not yet done).
2010-10-15 00:41:39 +09:00
Atsushi Eno a5043815da Override IsContentTypeSupported() in per-encoding-binding-element implementation to work as expected. 2010-09-24 16:26:28 +09:00
Atsushi Eno 60d557393c implement MessageEncodingBindingElement.GetProperty<T>(). 2010-08-11 01:38:43 +09:00
atsushieno 5a73102e40 Handle ListenUri to get correct Uri (especially when relative). Reject wrong behaviorConfiguration. 2010-07-28 18:00:25 +09:00
Atsushi Eno cf52630eec 2010-07-06 Atsushi Enomoto <[email protected]>
* ChannelFactoryBase.cs : null via uri parameter is not allowed.

	* ClientRuntimeChannel.cs : give non-null Via uri.

	* HttpTransportBindingElementTest.cs : add test for
	  ChannelFactoryBase`1.CreateChannel() with null via uri.


svn path=/trunk/mcs/; revision=159934
2010-07-06 04:24:32 +00:00
Atsushi Eno f5d38f374f 2010-06-18 Atsushi Enomoto <[email protected]>
* ServiceHostTest.cs : fix AddServiceEndpoint tests to make sense.
	  They are mostly not working. Enable working one.

	* TcpTransportBindingElementTest.cs : rename misleading test.


svn path=/trunk/mcs/; revision=159122
2010-06-18 08:50:26 +00:00
Atsushi Eno f5456a249a 2010-06-17 Atsushi Enomoto <[email protected]>
* Binding.cs : enable simpler MessageVersion code (issued got fixed).
	* MtomMessageEncodingBindingElement.cs, TransportBindingElement.cs,
	  TextMessageEncodingBindingElement.cs : return MessageVersion in
	  GetProperty<T>().

	* HttpTransportBindingElementTest.cs, CustomBindingTest.cs :
	  anohter couple of MessageVersion tests.


svn path=/trunk/mcs/; revision=159066
2010-06-17 11:24:58 +00:00
Atsushi Eno 1f4684cd40 2010-06-17 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : retrieve MessageVersion and raise an error
	  if there is none. (Check this earlier than building a listener.)

	* ChannelDispatcher.cs : MessageVersion check is moved to
	  ServiceHostBase.

	* ServiceMetadataExtension.cs : overwrite MessageVersion to use None.
	  (The only special case I found for ChannelDispatcher.MessageVersion.)

	* CustomBindingTest.cs : add tests for MessageVersion check on Open().

	* MetadataExchangeBindingsTest.cs : make sure that special casing of
	  MessageVersion does not happen at this layer.


svn path=/trunk/mcs/; revision=159061
2010-06-17 10:48:55 +00:00
Atsushi Eno 2eb86de94d 2010-06-15 Atsushi Enomoto <[email protected]>
* TcpReplyChannel.cs : accept TCP channel on ReceiveRequest(). This
	  fixes standalone tcp-transport/sample[svc|cli]5.exe test in olive
	  (but not TcpTransportBindingElementTest.SimpleDuplexStreamed.)

	* TcpTransportBindingElementTest.cs : add connection tests (imported
	  from standalone olive tests), one is disabled for breakage.


svn path=/trunk/mcs/; revision=158924
2010-06-15 08:43:10 +00:00
Atsushi Eno bc0d9e7627 2010-05-14 Atsushi Enomoto <[email protected]>
* BindingContext.cs : actually clone is needed everywhere else too.
	* CustomBinding.cs : remove extra field.

	* BindingContextTest.cs : add a couple of tests with related to
	  RemainingBindingElements use. Some tests by Andreia Gaita.


svn path=/trunk/mcs/; revision=157350
2010-05-14 07:28:26 +00:00
Atsushi Eno adc4026eae 2010-04-21 Atsushi Enomoto <[email protected]>
* BindingContext.cs : require a TransportBindingElement when
	  building a channel listener.

	* CustomBindingTest.cs : enable BuildChannelListener test for no-
	  transport case. Test CanBuildChannelListener too.


svn path=/trunk/mcs/; revision=155857
2010-04-21 09:45:46 +00:00
Atsushi Eno e1b6d382fe 2010-04-01 Atsushi Enomoto <[email protected]>
* ConnectionOrientedTransportBindingElement.cs,
	  TcpTransportBindingElement.cs : implement GetProperty<T>().

	* TcpTransportBindingElementTest.cs : GetProperty<T>() here too.


svn path=/trunk/mcs/; revision=154624
2010-04-01 09:34:16 +00:00
Atsushi Eno 73481d620c 2010-04-01 Atsushi Enomoto <[email protected]>
* HttpTransportBindingElement.cs, HttpsTransportBindingElement.cs:
	  implement HttpsTransportBindingElement.GetProperty<T>(). Extend the
	  properties type from HTTP.

	* HttpsTransportBindingElementTest.cs :
	  added test for GetProperty<T>().


svn path=/trunk/mcs/; revision=154621
2010-04-01 09:13:45 +00:00
Atsushi Eno a08eda1815 2010-03-29 Atsushi Enomoto <[email protected]>
* FaultConverter.cs : implemented TryCreateException().

	* FaultConverterTest.cs : added more TryCreateException() tests.


svn path=/trunk/mcs/; revision=154376
2010-03-29 14:01:33 +00:00
Atsushi Eno 28e997e1e9 2010-03-29 Atsushi Enomoto <[email protected]>
* MessageHeaderTest.cs : enable one, add not-working cosmetic one.


svn path=/trunk/mcs/; revision=154367
2010-03-29 12:07:37 +00:00
Atsushi Eno 4f29247c43 2010-03-29 Atsushi Enomoto <[email protected]>
* MessageBufferTest.cs : enable not-working test.


svn path=/trunk/mcs/; revision=154363
2010-03-29 11:20:22 +00:00
Atsushi Eno 789dc0be76 2010-03-29 Atsushi Enomoto <[email protected]>
* MessageFault.cs : cosmetic method name clarification.

	* MessageFaultTest.cs : enable previous test.

	(made wrong commit in the previous test changelog)


svn path=/trunk/mcs/; revision=154356
2010-03-29 08:41:07 +00:00
Atsushi Eno 8056b10c0e 2010-03-29 Atsushi Enomoto <[email protected]>
* XmlReaderBodyWriter.cs, Message.cs, MessageImpl.cs, BodyWriter.cs:
	  fix BodyWriter buffering that dropped in-scope namespaces and thus
	  caused problem on resolving QNames.

	* MessageFaultTest.cs : enable previous test.


svn path=/trunk/mcs/; revision=154354
2010-03-29 07:43:14 +00:00
Atsushi Eno c1fba935ca 2010-03-26 Atsushi Enomoto <[email protected]>
* FaultConverterTest.cs, MessageFaultTest.cs : add new and not-working
	  tests.


svn path=/trunk/mcs/; revision=154286
2010-03-26 16:06:02 +00:00
Atsushi Eno 570c1d9c76 2010-03-26 Atsushi Enomoto <[email protected]>
* MessageImpl.cs : pass IsFault argument in OnCreateBufferedCopy().

	* MessageBufferTest.cs : add test for copy of IsFault value.


svn path=/trunk/mcs/; revision=154250
2010-03-26 08:10:09 +00:00
Atsushi Eno 55e8c59203 2010-03-25 Atsushi Enomoto <[email protected]>
* MessageTest.cs : add another IsFault tests, which exposed some
	  issues at client side.


svn path=/trunk/mcs/; revision=154199
2010-03-25 15:26:59 +00:00
Atsushi Eno bd6119f522 2010-01-21 Atsushi Enomoto <[email protected]>
* SslStreamSecurityBindingElementTest.cs : reduce extra base dep.


svn path=/trunk/mcs/; revision=149955
2010-01-21 03:48:24 +00:00
Atsushi Eno 9a72f4cdb6 2010-01-20 Atsushi Enomoto <[email protected]>
* AddressHeader.cs : implement remaining bits.
	  Eliminate dependency on NetDataContractSerializer.

	* AddressHeaderTest.cs : add reader and writer tests.


svn path=/trunk/mcs/; revision=149907
2010-01-20 14:05:06 +00:00
Atsushi Eno ff3954c708 2010-01-06 Atsushi Enomoto <[email protected]>
* BinaryMessageEncoder.cs : enable workaround buffering only when
	  the argument stream does *not* support seek. This fixes some
	  net.tcp connection problem.

	* BinaryMessageEncodingBindingElementTest.cs : added test for
	  connection-based tests for both TCP and HTTP (they give difference:
	  see BinaryMessageEncoder.cs change too).


svn path=/trunk/mcs/; revision=149103
2010-01-06 03:39:07 +00:00
Atsushi Eno efe6f6d540 2009-12-21 Atsushi Enomoto <[email protected]>
* MessageFault.cs : support EnvelopeVersion.None as well, as almost
	  the same as SOAP12.

	* MessageFaultTest.cs : add CreateFault test with MessageVersion.None.


svn path=/trunk/mcs/; revision=148797
2009-12-21 06:10:47 +00:00
Atsushi Eno fa8cca6868 2009-12-10 Atsushi Enomoto <[email protected]>
* MessageHeadersTest.cs : added another CopyHeadersFrom() test to
	  make sure there is no duplicate.


svn path=/trunk/mcs/; revision=148008
2009-12-10 07:23:25 +00:00
Atsushi Eno 47e8f1112d 2009-12-10 Atsushi Enomoto <[email protected]>
* MessageHeadersTest.cs : enable working test and remove old comment.


svn path=/trunk/mcs/; revision=148007
2009-12-10 07:18:27 +00:00
Atsushi Eno 95b8c6d86d 2009-12-10 Atsushi Enomoto <[email protected]>
* MessageHeaders.cs : null can be set as a WS-Addressing header item.

	* MessageHeadersTest.cs : make sure null can be set as a
	  WS-Addressing header when version is None.


svn path=/trunk/mcs/; revision=148006
2009-12-10 06:50:38 +00:00
Atsushi Eno 361233a3d4 2009-12-04 Atsushi Enomoto <[email protected]>
* HttpTransportBindingElement.cs : finished all GetProperty() values.

	* HttpTransportBindingElementTest.cs : added GetProperty() tests.


svn path=/trunk/mcs/; revision=147646
2009-12-04 09:51:53 +00:00
Atsushi Eno d9be950d9c 2009-12-03 Astushi Enomoto <[email protected]>
* System.ServiceModel_test.dll.sources:
	  added HttpsTransportBindingElementTest.cs.

	* HttpsTransportBindingElement.cs, HttpChannelListener.cs :
	  added URI scheme check.

	* HttpsTransportBindingElementTest.cs : new test.


svn path=/trunk/mcs/; revision=147538
2009-12-03 09:40:30 +00:00
Atsushi Eno 3f987a1b6f 2009-09-14 Atsushi Enomoto <[email protected]>
* MessagePropertiesTest.cs : new test.

	* MessageProperties.cs : fix CopyProperties() behavior to not
	  clear existing items. Make all properties call this[name].

	* System.ServiceModel_test.dll.sources: add MessagePropertiesTest.cs.


svn path=/trunk/mcs/; revision=141898
2009-09-14 17:03:34 +00:00
Atsushi Eno f3bae627cb 2009-09-02 Atsushi Enomoto <[email protected]>
* HttpRequestMessageProperty.cs : fix default values.

	* HttpRequestMessagePropertyTest.cs : new test.

	* System.ServiceModel_test.dll.sources:
	  add HttpRequestMessagePropertyTest.cs


svn path=/trunk/mcs/; revision=141110
2009-09-02 10:16:21 +00:00
Atsushi Eno 59fceba19b 2009-08-31 Atsushi Enomoto <[email protected]>
* HttpChannelFactory.cs : reject URI mismatch cases when required.

	* HttpTransportBindingElementTest.cs : test for URI mismatch case.


svn path=/trunk/mcs/; revision=140960
2009-08-31 12:10:33 +00:00
Atsushi Eno a190897311 2009-08-20 Atsushi Enomoto <[email protected]>
* MessageHeaders.cs : duplicate check was sloppy.

	* MessageHeadersTest.cs : added a couple od duplicate tests. Fixed
	  non-working test output.


svn path=/trunk/mcs/; revision=140315
2009-08-20 08:05:00 +00:00
Atsushi Eno 9f127bdcf5 2009-08-17 Atsushi Enomoto <[email protected]>
* Message.cs : state is set only after WriteBodyContents().

	* MessageTest.cs : added test for State.


svn path=/trunk/mcs/; revision=140045
2009-08-17 09:41:16 +00:00
Atsushi Eno 198d728a95 2009-06-08 Atsushi Enomoto <[email protected]>
* CommunicationObject.cs : OnClosed() requires call to base method.
	  Close() could rather abort the channel, and Abort() does not
	  always invke OnAbort().
	* ChannelBase.cs : add call to base as above.

	* ChannelDispatcher.cs :
	  Add call to base (see CommunicationObject change).

	* InstanceContext.cs :
	  Add call to base (see CommunicationObject change).

	* CommunicationObjectTest.cs : added a couple of close/abort tests
	  for state transition and base call check.


svn path=/trunk/mcs/; revision=135649
2009-06-08 09:10:08 +00:00
Atsushi Eno 7017be6aa3 2009-05-22 Atsushi Enomoto <[email protected]>
* BinaryMessageEncoderFactory.cs, BinaryMessageEncoder.cs
	  This encoder factory implements CreateSessionEncoder() and binary
	  encoder does support session transmit, in different media type.
	* ChannelManagerBase.cs : added utility method to create appropriate
	  encoder.
	* HttpChannelFactory.cs, HttpChannelListener.cs,
	  MsmqChannelFactory.cs, MsmqChannelListener.cs,
	  PeerChannelFactory.cs, PeerChannelListener.cs,
	  TcpChannelFactory.cs, TcpChannelListener.cs : use above.

	* MessageEncoderTest.cs : test CreateSessionEncoder().


svn path=/trunk/mcs/; revision=134584
2009-05-22 02:27:04 +00:00
Atsushi Eno 31009113d4 2009-05-19 Atsushi Enomoto <[email protected]>
* MessageFault.cs : fix several SOAP12 fault deserialization in xml
	  parsing.

	* MessageFaultTest.cs : added more SOAP 12 fault parser tests.
	* soap-fault.xml, soap-fault-incomplete4.xml : new test files.


svn path=/trunk/mcs/; revision=134389
2009-05-19 12:01:20 +00:00
Atsushi Eno a22727c329 2009-05-15 Atsushi Enomoto <[email protected]>
* MessageFault.cs : Reason is mandatory. raise XmlException, and
	  CommunicationException in each CreateFault().

	* soap-fault-incomplete.xml : new test file.
	* MessageFaultTest.cs : new test.

	* System.ServiceModel.dll_test.sources: added MessageFaultTest.cs.


svn path=/trunk/mcs/; revision=134197
2009-05-15 11:27:39 +00:00