(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / Microsoft.Web.Services / Test / Microsoft.Web.Services.Timestamp / ReceivedCollectionTest.cs
blob09dafc3b9437580ce7a85410bfa742e4f6cc51f0
1 //
2 // ReceivedCollectionTest.cs - NUnit Test Cases for ReceivedCollection
3 //
4 // Author:
5 // Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
10 using NUnit.Framework;
11 using Microsoft.Web.Services.Timestamp;
12 using System;
13 using System.Xml;
15 // note: due to compiler confusion between classes and namespace (like Timestamp)
16 // I renamed the test namespace from "MonoTests.Microsoft.Web.Services.Timestamp"
17 // to "MonoTests.MS.Web.Services.Timestamp".
18 namespace MonoTests.MS.Web.Services.Timestamp {
20 [TestFixture]
21 public class ReceivedCollectionTest : Assertion {
23 private ReceivedCollection coll;
25 [SetUp]
26 void SetUp ()
28 coll = new ReceivedCollection ();
31 [Test]
32 public void Empty ()
34 AssertEquals ("Empty: Count = 0", 0, coll.Count);
35 AssertNotNull ("Enumerator", coll.GetEnumerator ());
38 [Test]
39 [ExpectedException (typeof (ArgumentOutOfRangeException))]
40 public void EmptyAccess ()
42 Received r = coll[0];
45 [Test]
46 public void Add ()
48 Received r = new Received (new Uri ("http://www.go-mono.com/"));
49 coll.Add (r);
50 AssertEquals ("Add: Count = 1", 1, coll.Count);
51 Assert ("Contains 1", coll.Contains (r));
54 [Test]
55 [ExpectedException (typeof (ArgumentNullException))]
56 public void AddNull ()
58 Received r = null;
59 coll.Add (r);
62 [Test]
63 public void CopyTo ()
65 Received r = new Received (new Uri ("http://www.go-mono.com/"));
66 coll.Add (r);
68 object[] container = new object [3];
69 coll.CopyTo (container, 0);
70 AssertNotNull ("CopyTo[0]", container[0]);
71 AssertNull ("CopyTo[1]", container[1]);
72 AssertNull ("CopyTo[2]", container[2]);
74 coll.Remove (r);
75 AssertEquals ("Remove: Count = 0", 0, coll.Count);
78 [Test]
79 [ExpectedException (typeof (ArgumentNullException))]
80 public void CopyToException ()
82 coll.CopyTo (null, 0);