(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / Microsoft.Web.Services / Test / Microsoft.Web.Services.Security / WSSecurityTest.cs
blobde08dbb60a58289545e01e0ce0b542f6973494ca
1 //
2 // WSSecurityTest.cs - NUnit Test Cases for WSSecurity
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.Security;
12 using System;
14 namespace MonoTests.MS.Web.Services.Security {
16 [TestFixture]
17 public class WSSecurityTest : Assertion {
19 [Test]
20 public void Constructor ()
22 WSSecurity wss = new WSSecurity ();
23 Assertion.AssertNotNull ("Constructor", wss);
26 [Test]
27 public void PublicConstStrings ()
29 #if WSE1
30 AssertEquals ("NamespaceURI", "http://schemas.xmlsoap.org/ws/2002/07/secext", WSSecurity.NamespaceURI);
31 #else
32 AssertEquals ("NamespaceURI", "http://schemas.xmlsoap.org/ws/2002/12/secext", WSSecurity.NamespaceURI);
33 #endif
34 AssertEquals ("Prefix", "wsse", WSSecurity.Prefix);
37 // LAMESPEC AttributeNames aren't documented
38 [Test]
39 public void AttributeNamesConstructor ()
41 // test constructor
42 WSSecurity.AttributeNames wsan = new WSSecurity.AttributeNames ();
43 AssertNotNull ("AttributeNames Constructor", wsan);
46 // LAMESPEC AttributeNames aren't documented
47 [Test]
48 public void AttributeNames ()
50 // test public const strings
51 AssertEquals ("EncodingType", "EncodingType", WSSecurity.AttributeNames.EncodingType);
52 AssertEquals ("IdentifierType", "IdentifierType", WSSecurity.AttributeNames.IdentifierType);
53 #if WSE1
54 AssertEquals ("TokenType", "TokenType", WSSecurity.AttributeNames.TokenType);
55 #endif
56 AssertEquals ("Type", "Type", WSSecurity.AttributeNames.Type);
57 AssertEquals ("Uri", "URI", WSSecurity.AttributeNames.Uri);
58 AssertEquals ("ValueType", "ValueType", WSSecurity.AttributeNames.ValueType);
61 // LAMESPEC ElementNames aren't documented
62 [Test]
63 public void ElementNamesConstructor ()
65 // test constructor
66 WSSecurity.ElementNames wsen = new WSSecurity.ElementNames ();
67 AssertNotNull ("ElementNames Constructor", wsen);
70 // LAMESPEC ElementNames aren't documented
71 [Test]
72 public void TestElementNames ()
74 // test public const strings
75 AssertEquals ("BinarySecurityToken", "BinarySecurityToken", WSSecurity.ElementNames.BinarySecurityToken);
76 AssertEquals ("KeyIdentifier", "KeyIdentifier", WSSecurity.ElementNames.KeyIdentifier);
77 AssertEquals ("Nonce", "Nonce", WSSecurity.ElementNames.Nonce);
78 AssertEquals ("Password", "Password", WSSecurity.ElementNames.Password);
79 AssertEquals ("Reference", "Reference", WSSecurity.ElementNames.Reference);
80 AssertEquals ("Security", "Security", WSSecurity.ElementNames.Security);
81 AssertEquals ("SecurityTokenReference", "SecurityTokenReference", WSSecurity.ElementNames.SecurityTokenReference);
82 AssertEquals ("Username", "Username", WSSecurity.ElementNames.Username);
83 AssertEquals ("UsernameToken", "UsernameToken", WSSecurity.ElementNames.UsernameToken);