[sword-svn] r3259 - trunk/bindings/csharp/tests

trampster at crosswire.org trampster at crosswire.org
Sat Sep 27 00:36:54 MST 2014


Author: trampster
Date: 2014-09-27 00:36:53 -0700 (Sat, 27 Sep 2014)
New Revision: 3259

Modified:
   trunk/bindings/csharp/tests/ManagerTests.cs
Log:
Fixed Locale unit tests in csharp bindings, so the test passes if english is not the first entry.

Modified: trunk/bindings/csharp/tests/ManagerTests.cs
===================================================================
--- trunk/bindings/csharp/tests/ManagerTests.cs	2014-09-27 07:23:47 UTC (rev 3258)
+++ trunk/bindings/csharp/tests/ManagerTests.cs	2014-09-27 07:36:53 UTC (rev 3259)
@@ -14,6 +14,7 @@
 using System;
 using NUnit.Framework;
 using System.IO;
+using System.Collections.Generic;
 using System.Linq;
 
 namespace Sword.Tests
@@ -84,13 +85,23 @@
 		public void AvailableLocales_Get_DoesntCrash()
 		{
 			//act
-			var availableLocales = _manager.AvailableLocales.ToArray();
+			string[] availableLocales = _manager.AvailableLocales.ToArray();
 			
 			//Assert
-			Assert.That (availableLocales[0].Contains("en"));
+			Assert.That (availableLocales.Length > 0);
 		}
 		
 		[Test]
+		public void AvailableLocales_Get_ContainsEnglish()
+		{
+			//act
+			string[] availableLocales = _manager.AvailableLocales.ToArray();
+			
+			//Assert
+			Assert.That (availableLocales.Any(locale => locale == "en"));
+		}
+		
+		[Test]
 		public void DefaultLocale_SetToEn_DoesntCrash()
 		{
 			//act




More information about the sword-cvs mailing list