Remove the use of ExpectedException in Mono.Posix Tests (#4698)
authorBill Holmes <bill.holmes@xamarin.com>
Tue, 18 Apr 2017 10:59:56 +0000 (06:59 -0400)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 18 Apr 2017 10:59:56 +0000 (12:59 +0200)
commitfdfa4b94bbf95f28f8acaf73d1705e1285d254a8
treeaab5fda96b1442e550f4cdbfea77ea4d11e5cf7c
parent8d12608cca7194dbf81e3e4bc82510205564f544
Remove the use of ExpectedException in Mono.Posix Tests (#4698)

* Remove the use of ExpectedException in Mono.Posix Tests

ExpectedException is not available in later versions of
NUnit.  To test the NetCore 2.0 version of Mono.Posix I
need a newer version of NUnit that does not contain ExpectedException.

Using Assert.Throws should be equivalent.

* Mono.Posix Tests move CanUseRealTimeSignals checks

Moving the CanUseRealTimeSignals check outside of the
Assert.Throws callback function.

This is a change in test behavior requested by @akoeplinger
in the PR review.

* Fixing Mono.Posix.UnixSignalTest.TestSignumPropertyThrows

This test throws InvalidOperationException and we need to check
for that in the Assert.Throws type.
mcs/class/Mono.Posix/Test/Mono.Unix.Native/RealTimeSignumTests.cs
mcs/class/Mono.Posix/Test/Mono.Unix/StdioFileStreamTest.cs
mcs/class/Mono.Posix/Test/Mono.Unix/UnixSignalTest.cs