Copied remotely
[mono.git] / mcs / class / Microsoft.Web.Services / Test / Microsoft.Web.Services.Timestamp / WSTimestampTest.cs
1 //
2 // WSTimestampTest.cs - NUnit Test Cases for WSTimestamp
3 //
4 // Author:
5 //      Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
9
10 using NUnit.Framework;
11 using Microsoft.Web.Services.Timestamp;
12 using System;
13
14 // note: due to compiler confusion between classes and namespace (like Timestamp)
15 // I renamed the test namespace from "MonoTests.Microsoft.Web.Services.Timestamp"
16 // to "MonoTests.MS.Web.Services.Timestamp".
17 namespace MonoTests.MS.Web.Services.Timestamp {
18
19         [TestFixture]
20         public class WSTimestampTest : Assertion {
21
22                 [Test]
23                 public void Constructor ()
24                 {
25                         WSTimestamp wsts = new WSTimestamp ();
26                         AssertNotNull ("Constructor", wsts);
27                 }
28
29                 [Test]
30                 public void PublicConstStrings ()
31                 {
32                         AssertEquals ("NamespaceURI", "http://schemas.xmlsoap.org/ws/2002/07/utility", WSTimestamp.NamespaceURI);
33                         AssertEquals ("Prefix", "wsu", WSTimestamp.Prefix);
34                         AssertEquals ("TimeFormat", "yyyy-MM-ddTHH:mm:ssZ", WSTimestamp.TimeFormat);
35                 }
36
37                 [Test]
38                 public void AttributeNamesConstructor ()
39                 {
40                         // test constructor
41                         WSTimestamp.AttributeNames an = new WSTimestamp.AttributeNames ();
42                         AssertNotNull ("AttributeNames Constructor", an);
43                 }
44
45                 [Test]
46                 public void AttributeNames ()
47                 {
48                         // test public const strings
49                         AssertEquals ("Actor", "Actor", WSTimestamp.AttributeNames.Actor);
50                         AssertEquals ("Delay", "Delay", WSTimestamp.AttributeNames.Delay);
51                         AssertEquals ("Id", "Id", WSTimestamp.AttributeNames.Id);
52                         AssertEquals ("ValueType", "ValueType", WSTimestamp.AttributeNames.ValueType);
53                 }
54
55                 [Test]
56                 public void ElementNamesConstructor ()
57                 {
58                         // test constructor
59                         WSTimestamp.ElementNames en = new WSTimestamp.ElementNames ();
60                         AssertNotNull ("ElementNames Constructor", en);
61                 }
62
63                 [Test]
64                 public void ElementNames ()
65                 {
66                         // test public const strings
67                         AssertEquals ("Created", "Created", WSTimestamp.ElementNames.Created);
68                         AssertEquals ("Expires", "Expires", WSTimestamp.ElementNames.Expires);
69                         AssertEquals ("Received", "Received", WSTimestamp.ElementNames.Received);
70                         AssertEquals ("Timestamp", "Timestamp", WSTimestamp.ElementNames.Timestamp);
71                 }
72         }
73 }