20 Commits
Author SHA1 Message Date
Rolf Bjarne Kvinge e6536dd5e1 [System*] Throw a PlatformNotSupported exception when using the networking stack on watchOS. (#3606)
* [System] Fix line endings for a few files.

Best reviewed by not showing whitespace changes (should be empty diff in that case).

* [System] Fix potential crash in CookieParserTests.

Socket.EndAccept can throw an exception, which will crash the process if it
happens on a threadpool. So handle any exceptions when calling
Socket.EndAccept, and propagate those exceptions out of any threadpool code.

* [System.Net.Http] Throw a PlatformNotSupported exception when using HttpClientHandler on watchOS.

* [System.Net.Http] Tweak tests after watchOS API change.

Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.

* [System] Extract the HttpListenerResponseHelper class to a separate file.

Extract the HttpListenerResponseHelper class to a separate file so that it's
easier to replace the HttpListenerResponse implementation by using a different
file.

* [System] Throw a PlatformNotSupported exception when using the networking stack on watchOS.

* [System] Tweak tests after watchOS API changes.

Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.

* [System] Fix potential crash in SocketAcceptAsyncTest.

Fix potential crash in SocketAcceptAsyncTest by catching any exceptions in
code executed on the threadpool so that we never end up with unhandled
exceptions (which may terminate the process).

* [System] Avoid logic in SetUp attributes in tests.

Any type of exception in [SetUp] attributes causes all tests to fail with that
exception.

This even happens for tests that do not need the logic in the [SetUp]
attribute.

So rewrite tests a bit to not use [SetUp] when we can reasonably avoid it, and
instead instantiate class-level variables on first use. This ensures that any
exceptions that occur when initializing those variables are attributed to the
corresponding test, and not all of them.

* [System] Make exception handler (for test) catch more exceptions to avoid unhandled exceptions causing process termination.

* [System] Remove Obsolete attribute on API that throws PNSE.
2016-09-27 13:13:38 +02:00
Marek Safar 51dc184ccc [system] Fix WebHeaderCollection values extraction for multi-header keys 2015-10-12 16:51:19 +02:00
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
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Marek Safar caeba062fd Test clean up 2013-02-26 14:47:39 +01:00
Marek Safar 101a454dfa Fix mobile test 2013-02-26 10:37:02 +01:00
Marek Safar ae11667cff WebHeaderCollection fixes 2011-12-07 18:34:27 +00:00
Zoltan Varga 6bd1461883 Fix running of tests under net 4.0. 2010-08-18 12:00:20 +02:00
Miguel de Icaza 2ac437cdfc 2010-03-01 Miguel de Icaza <[email protected]>
* WebHeaderCollection.cs: Apply 2 year old patch from Yves Bastide that fixes the keys
        casing in the collection;   Fixes 325491


svn path=/trunk/mcs/; revision=152734
2010-03-01 19:09:20 +00:00
Gonzalo Paniagua Javier eff748464b 2009-07-22 Gonzalo Paniagua Javier <[email protected]>
* WebHeaderCollectionTest.cs: test for allowed characters in headers.


svn path=/trunk/mcs/; revision=138487
2009-07-23 02:57:41 +00:00
Gonzalo Paniagua Javier 874ad36781 Implement the 2.0 IsRestricted and add tests
svn path=/trunk/mcs/; revision=138472
2009-07-22 23:29:10 +00:00
Robert Jordan 7d405be2c1 2009-06-26 Robert Jordan <[email protected]>
* *.cs: Upgrade to new NUnit style.


svn path=/trunk/mcs/; revision=136948
2009-06-26 11:59:34 +00:00
Ilya Kharmatsky 66285529d7 Excluded the tests, which are not working under Grasshopper (all changes under 'TARGET_JVM' directive)
svn path=/trunk/mcs/; revision=72030
2007-01-31 15:20:18 +00:00
Gert Driesen 51d19a431c * WebHeaderCollection.cs: Fixed binary serialization compatibility with MS.
* WebHeaderCollectionTest.cs: Added tests for binary serialization 
compatibility.

svn path=/trunk/mcs/; revision=71807
2007-01-28 13:16:24 +00:00
Andrew Skiba 2936beb257 make indexers test compile on 2.0
svn path=/trunk/mcs/; revision=68183
2006-11-20 10:31:03 +00:00
Gonzalo Paniagua Javier bca513c49f 2006-11-15 Gonzalo Paniagua Javier <[email protected]>
* WebHeaderCollectionTest.cs: the Indexers test only compiles on 1.x


svn path=/trunk/mcs/; revision=67951
2006-11-15 21:26:04 +00:00
Ben Maurer 4ef8816b44 ignore non-working tests
svn path=/trunk/mcs/; revision=46600
2005-06-27 21:04:04 +00:00
Martin Willemoes Hansen 2320c1fddc * Removed: Old AllTests.cs files
* NUnit20ified the tests.

svn path=/trunk/mcs/; revision=12666
2003-03-18 21:45:41 +00:00
Lawrence Pit ca9e7e591a System:
* AllTests.cs: added call to System.Net.Sockets.AllTests.cs

System.Net:
	* ServicePointTest.cs: added
	* ServicePointManagerTest.cs: added
	* WebProxyTest.cs: added
	* AllTests.cs: added the above tests
	* WebHeaderCollection.cs: added TestIndexers.

System.Net.Sockets:
	* AllTests.cs: added

svn path=/trunk/mcs/; revision=4794
2002-05-20 18:49:03 +00:00
Lawrence Pit 21897fd452 WebHeaderCollection implemented
svn path=/trunk/mcs/; revision=4531
2002-05-11 15:30:44 +00:00