Author: fmantek
Date: Thu Sep 27 05:05:40 2007
New Revision: 271

Modified:
   trunk/clients/cs/src/unittests/gapps/logintest.cs

Log:
Fixed build breakage under Mono and .NET 1.1

Modified: trunk/clients/cs/src/unittests/gapps/logintest.cs
==============================================================================
--- trunk/clients/cs/src/unittests/gapps/logintest.cs   (original)
+++ trunk/clients/cs/src/unittests/gapps/logintest.cs   Thu Sep 27 05:05:40 2007
@@ -82,7 +82,7 @@
         [Test]
         public void GetHashFunctionNameTest()
         {
-            Assert.IsEmpty(login.HashFunctionName, "Hash function name should 
initially be null");
+            Assert.IsTrue(login.HashFunctionName == null, "Hash function name 
should initially be null");
         }
 
         [Test]
@@ -174,21 +174,21 @@
             Assert.IsNotNull(serializedXml, "Serialized XML should not be 
null.");
             Assert.IsTrue(serializedXml.StartsWith("<apps:login"), "Serialized 
XML does not start " +
                 " with correct element name.");
-            Assert.IsTrue(serializedXml.Contains("userName=\"" + 
login.UserName + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("userName=\"" + login.UserName 
+ "\"") >= 0,
                 "Serialized XML does not contain correct userName attribute.");
-            Assert.IsTrue(serializedXml.Contains("password=\"" + 
login.Password + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("password=\"" + login.Password 
+ "\"") >= 0,
                 "Serialized XML does not contain correct password attribute.");
-            Assert.IsTrue(serializedXml.Contains("suspended=\"" + 
login.Suspended.ToString().ToLower() + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("suspended=\"" + 
login.Suspended.ToString().ToLower() + "\"") >= 0,
                 "Serialized XML does not contain correct suspended 
attribute.");
-            Assert.IsTrue(serializedXml.Contains("ipWhitelisted=\"" +
-                login.IpWhitelisted.ToString().ToLower() + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("ipWhitelisted=\"" +
+                login.IpWhitelisted.ToString().ToLower() + "\"") >= 0,
                 "Serialized XML does not contain correct ipWhitelisted 
attribute.");
 
             // Make sure that the "admin" and "changePasswordAtNextLogin" 
attributes
             // are NOT present here
-            Assert.IsFalse(serializedXml.Contains("admin="),
+            Assert.IsFalse(serializedXml.IndexOf("admin=") >= 0,
                 "Serialized XML should not contain an \"admin\" attribute.");
-            
Assert.IsFalse(serializedXml.Contains("changePasswordAtNextLogin="),
+            Assert.IsFalse(serializedXml.IndexOf("changePasswordAtNextLogin=") 
>= 0,
                 "Serialized XML should not contain a 
\"changePasswordAtNextLogin\" attribute.");
         }
 
@@ -210,22 +210,22 @@
             Assert.IsNotNull(serializedXml, "Serialized XML should not be 
null.");
             Assert.IsTrue(serializedXml.StartsWith("<apps:login"), "Serialized 
XML does not start " +
                 " with correct element name.");
-            Assert.IsTrue(serializedXml.Contains("userName=\"" + 
login.UserName + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("userName=\"" + login.UserName 
+ "\"") >= 0,
                 "Serialized XML does not contain correct userName attribute.");
-            Assert.IsTrue(serializedXml.Contains("password=\"" + 
login.Password + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("password=\"" + login.Password 
+ "\"") >= 0,
                 "Serialized XML does not contain correct password attribute.");
-            Assert.IsTrue(serializedXml.Contains("suspended=\"" + 
login.Suspended.ToString().ToLower() + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("suspended=\"" + 
login.Suspended.ToString().ToLower() + "\"") >= 0,
                 "Serialized XML does not contain correct suspended 
attribute.");
-            Assert.IsTrue(serializedXml.Contains("ipWhitelisted=\"" +
-                login.IpWhitelisted.ToString().ToLower() + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("ipWhitelisted=\"" +
+                login.IpWhitelisted.ToString().ToLower() + "\"") >= 0,
                 "Serialized XML does not contain correct ipWhitelisted 
attribute.");
 
             // Make sure that the "admin" and "changePasswordAtNextLogin" 
attributes
             // ARE present here
-            Assert.IsTrue(serializedXml.Contains("admin=\"" + 
login.Admin.ToString().ToLower() + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("admin=\"" + 
login.Admin.ToString().ToLower() + "\"") >= 0,
                 "Serialized XML does not contain an \"admin\" attribute.");
-            
Assert.IsTrue(serializedXml.Contains("changePasswordAtNextLogin=\"" +
-                login.ChangePasswordAtNextLogin.ToString().ToLower() + "\""),
+            Assert.IsTrue(serializedXml.IndexOf("changePasswordAtNextLogin=\"" 
+
+                login.ChangePasswordAtNextLogin.ToString().ToLower() + "\"") 
>= 0,
                 "Serialized XML does not contain a 
\"changePasswordAtNextLogin\" attribute.");
         }
     }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to