1 // CaseInsensitiveComparerTest
\r
4 using System.Collections;
\r
6 using NUnit.Framework;
\r
10 namespace MonoTests.System.Collections {
\r
13 /// <summary>CaseInsensitiveComparer test suite.</summary>
\r
14 public class CaseInsensitiveComparerTest : TestCase {
\r
15 public static ITest Suite {
\r
17 return new TestSuite(typeof(CaseInsensitiveComparerTest));
\r
21 public CaseInsensitiveComparerTest(String name) : base(name)
\r
25 protected override void SetUp ()
\r
29 public void TestDefaultInstance ()
\r
31 // Make sure the instance returned by Default
\r
32 // is really a CaseInsensitiveComparer.
\r
33 Assert((CaseInsensitiveComparer.Default
\r
34 as CaseInsensitiveComparer) != null);
\r
37 public void TestCompare () {
\r
38 CaseInsensitiveComparer cic = new CaseInsensitiveComparer ();
\r
40 Assert(cic.Compare ("WILD WEST", "Wild West") == 0);
\r
41 Assert(cic.Compare ("WILD WEST", "wild west") == 0);
\r
42 Assert(cic.Compare ("Zeus", "Mars") > 0);
\r
43 Assert(cic.Compare ("Earth", "Venus") < 0);
\r