* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System / Test / System.Net.Sockets / UdpClientTest.cs
1 // System.Net.Sockets.UdpClientTest.cs
2 //
3 // Authors:
4 //      Chris Bacon <chris.bacon@docobo.co.uk>
5 //
6
7
8 using System;
9 using System.Net;
10 using System.Net.Sockets;
11 using NUnit.Framework;
12
13 namespace MonoTests.System.Net.Sockets {
14         [TestFixture]
15         public class UdpClientTest {
16                 [Test]
17                 public void UdpClientBroadcastTest () 
18                 {
19                         bool exThrown = false;
20                         UdpClient client = new UdpClient (new IPEndPoint (IPAddress.Loopback, 1234));
21                         byte[] bytes = new byte[] {10, 11, 12, 13};
22
23                         try {
24                                 client.Send (bytes, bytes.Length, new IPEndPoint (IPAddress.Broadcast, 1235));
25                         } catch (SocketException) {
26                                 exThrown = true;
27                         }
28                         Assert.IsFalse(exThrown, "UdpClient Broadcast #1");
29                 }
30         }
31 }