public void Compare_CapsAsPrimaryDistinction()
        {
            //naive sort
            string[] list = new string[] {"ana",
                                          "anga",
                                          "ango",
                                          "ano",
                                          "na",
                                          "Na",
                                          "nga",
                                          "Nga",
                                          "ngo",
                                          "Ngo",
                                          "NGo",
                                          "no",
                                          "No"};

            string[] expected = new string[] {
                                               "ana",
                                               "ano",
                                               "anga",
                                               "ango",
                                               "Na",
                                               "No",
                                               "na",
                                               "no",
                                               "NGo",
                                               "Nga",
                                               "Ngo",
                                               "nga",
                                               "ngo"};
            Assert.AreEqual(list.Length, expected.Length);

            SimpleRulesCollator collator = new SimpleRulesCollator("A\na\nN\nn\nNG\nNg\nng\nO\no");
            Array.Sort(list, collator);

            for (int i = 0; i < list.Length; i++)
            {
                Assert.AreEqual(expected[i], list[i], "at index {0}", i);
            }
        }
        public void CollatingSequenceBeginsWithDigraph()
        {
            //naive sort
            string[] list = new string[] {"hello",
                                          "me",
                                          "phone",
                                          "test",
                                          "world"};

            string[] expected = new string[] { "phone",
                                                "hello",
                                                "me",
                                                "test",
                                                "world"};
            Assert.AreEqual(list.Length, expected.Length);

            SimpleRulesCollator collator = new SimpleRulesCollator("ph (Ph  e)\na A\nb B\nc C\nd D");
            Array.Sort(list, collator);

            for (int i = 0; i < list.Length; i++)
            {
                Assert.AreEqual(expected[i], list[i], "at index {0}", i);
            }
        }
		public void UndefinedCollatingSequencesSortToBottom()
		{
			//naive sort
			string[] list = new string[] {"hello",
										  "me",
										  "phone",
										  "\u0268lo",
										  "igloo",
										  "test",
										  "alpha",
										  "echo",
										  "world"};

			string[] expected = new string[] { "igloo",
												"\u0268lo",
												"alpha",
												"echo",
												"hello",
												"me",
												"phone",
												"test",
												"world"};
			Assert.AreEqual(list.Length, expected.Length);

			SimpleRulesCollator collator = new SimpleRulesCollator("i \\u0268");
			Array.Sort(list, collator);


			for (int i = 0; i < list.Length; i++)
			{
				Assert.AreEqual(expected[i], list[i], "at index {0}", i);
			}


		}
		private void VerifyExpectedSort(string simpleRules, string[] original, string[] expected)
		{
			Assert.AreEqual(original.Length, expected.Length);

			SimpleRulesCollator collator = new SimpleRulesCollator(simpleRules);
			Array.Sort(original, collator);


			for (int i = 0; i < original.Length; i++)
			{
				Assert.AreEqual(expected[i], original[i], "at index {0}", i);
			}
		}