2 // WSTimestampTest.cs - NUnit Test Cases for WSTimestamp
5 // Sebastien Pouliot (spouliot@motus.com)
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
10 using NUnit.Framework;
11 using Microsoft.Web.Services.Timestamp;
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 {
20 public class WSTimestampTest : Assertion {
23 public void Constructor ()
25 WSTimestamp wsts = new WSTimestamp ();
26 AssertNotNull ("Constructor", wsts);
30 public void PublicConstStrings ()
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);
38 public void AttributeNamesConstructor ()
41 WSTimestamp.AttributeNames an = new WSTimestamp.AttributeNames ();
42 AssertNotNull ("AttributeNames Constructor", an);
46 public void AttributeNames ()
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);
56 public void ElementNamesConstructor ()
59 WSTimestamp.ElementNames en = new WSTimestamp.ElementNames ();
60 AssertNotNull ("ElementNames Constructor", en);
64 public void ElementNames ()
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);