Author: brett
Date: Thu Mar  7 00:41:59 2013
New Revision: 1453629

URL: http://svn.apache.org/r1453629
Log:
fix tests

Modified:
    
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/SettingsUtil.cs
    
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs

Modified: 
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/SettingsUtil.cs
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/SettingsUtil.cs?rev=1453629&r1=1453628&r2=1453629&view=diff
==============================================================================
--- 
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/SettingsUtil.cs
 (original)
+++ 
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/main/csharp/SettingsUtil.cs
 Thu Mar  7 00:41:59 2013
@@ -293,7 +293,9 @@ namespace NPanday.Utils
                 foreach (Mirror mirror in settings.mirrors)
                 {
                     // assumes you only changed url of existing ones
-                    
settingsXmlDoc.SelectSingleNode("//settings/mirrors/mirror[id = '" + mirror.id 
+ "']/url").InnerText = mirror.url;
+                    XmlNode node = 
settingsXmlDoc.SelectSingleNode("//settings/mirrors/mirror[id = '" + mirror.id 
+ "']/url");
+                    if (node != null)
+                        node.InnerText = mirror.url;
                 }
             }
 

Modified: 
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs?rev=1453629&r1=1453628&r2=1453629&view=diff
==============================================================================
--- 
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs
 (original)
+++ 
incubator/npanday/trunk/dotnet/assemblies/NPanday.Utils/src/test/csharp/SettingsUtilTest.cs
 Thu Mar  7 00:41:59 2013
@@ -60,7 +60,7 @@ namespace NPanday.Utils_Test
 
             Assert.IsNotNull(repository, "Repository '" + _repoUrl1 + "' was 
not added to profile");
 
-            Assert.AreEqual("npanday.repo.0", repository.id);
+            Assert.AreEqual("npanday.repo", repository.id);
             Assert.AreEqual(_repoUrl1, repository.url);
         }
 
@@ -75,16 +75,14 @@ namespace NPanday.Utils_Test
             SettingsUtil.SetProfileRepository(profile, _repoUrl2, true, false);
 
             Assert.AreEqual(1, _settings.profiles.Length, "Settings does not 
contain a profile");
-            Assert.AreEqual(2, _settings.profiles[0].repositories.Length);
+            Assert.AreEqual(1, _settings.profiles[0].repositories.Length);
 
             Repository repository = 
SettingsUtil.GetRepositoryFromProfile(profile, _repoUrl1);
-            Assert.IsNotNull(repository, "Repository '" + _repoUrl1 + "' was 
not in the profile");
-            Assert.AreEqual("npanday.repo.0", repository.id);
-            Assert.AreEqual(_repoUrl1, repository.url);
+            Assert.IsNull(repository, "Repository '" + _repoUrl1 + "' was in 
the profile");
 
             repository = SettingsUtil.GetRepositoryFromProfile(profile, 
_repoUrl2);
             Assert.IsNotNull(repository, "Repository '" + _repoUrl2 + "' was 
not added to profile");
-            Assert.AreEqual("npanday.repo.1", repository.id);
+            Assert.AreEqual("npanday.repo", repository.id);
             Assert.AreEqual(_repoUrl2, repository.url);
         }
 


Reply via email to