Skip to content

Commit

Permalink
2003-08-18 Nick Drochak <ndrochak@gol.com>
Browse files Browse the repository at this point in the history
	* UriBuilderTest.cs: Separated tests into NUnit v2 style. Need to track
	down a test failure.

svn path=/trunk/mcs/; revision=17378
  • Loading branch information
Nick Drochak committed Aug 18, 2003
1 parent 4acf8c6 commit 3bb19c4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
5 changes: 5 additions & 0 deletions mcs/class/System/Test/System/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2003-08-18 Nick Drochak <ndrochak@gol.com>

* UriBuilderTest.cs: Separated tests into NUnit v2 style. Need to track
down a test failure.

2003-05-07 Ben Maurer <bmaurer@users.sourceforge.net>

* UriTest.cs: added tests for UNIX file paths.
Expand Down
34 changes: 18 additions & 16 deletions mcs/class/System/Test/System/UriBuilderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,26 @@ public void Path ()
}

[Test]
public void Port ()
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void BadPort1 ()
{
try {
b.Port = -12345;
Assertion.Fail ("#1 should've failed, illegal port.");
} catch (ArgumentOutOfRangeException) {}
try {
b.Port = 123456789;
Assertion.Fail ("#2 should've failed, illegal port.");
} catch (ArgumentOutOfRangeException) {}
try {
b.Port = -1;
Assertion.AssertEquals ("#3", -1, b.Port);
} catch (ArgumentOutOfRangeException) {
Assertion.Fail ("#4: spec should allow -1 as value.");
}
b.Port = -12345;
}


[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void BadPort2 ()
{
b.Port = 123456789;
}

[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void BadPort3 ()
{
b.Port = -1;
}

[Test]
public void Query ()
{
Expand Down

0 comments on commit 3bb19c4

Please sign in to comment.