コード例 #1
0
		public void GetValidCharsForLocale_Digraph()
		{
			DummyICU icu = new DummyICU();
			DummyCharPropEngine cpe = new DummyCharPropEngine();
			icu.m_icu.SetupResultForParams("GetExemplarCharacters", "[{ch}]", "qwe");
			ReflectionHelper.SetField(typeof(ExemplarCharactersHelper), "s_ICU", icu);
			Assert.AreEqual("  ", ExemplarCharactersHelper.GetValidCharsForLocale("qwe", cpe));
			icu.m_icu.Verify();
			cpe.Verify();
		}
コード例 #2
0
        public void GetValidCharsForLocale_Digraph()
        {
            DummyICU            icu = new DummyICU();
            DummyCharPropEngine cpe = new DummyCharPropEngine();

            icu.m_icu.SetupResultForParams("GetExemplarCharacters", "[{ch}]", "qwe");
            ReflectionHelper.SetField(typeof(ExemplarCharactersHelper), "s_ICU", icu);
            Assert.AreEqual("  ", ExemplarCharactersHelper.GetValidCharsForLocale("qwe", cpe));
            icu.m_icu.Verify();
            cpe.Verify();
        }
コード例 #3
0
		public void GetValidCharsForLocale_Complex()
		{
			DummyICU icu = new DummyICU();
			DummyCharPropEngine cpe = new DummyCharPropEngine();
			icu.m_icu.SetupResultForParams("GetExemplarCharacters", "[a-c {ch} de f-g e\u0301 \u0301]", "qwe");
			ReflectionHelper.SetField(typeof(ExemplarCharactersHelper), "s_ICU", icu);
			Assert.AreEqual("  a b c f g e\u0301 A B C F G E\u0301",
				ExemplarCharactersHelper.GetValidCharsForLocale("qwe", cpe));
			icu.m_icu.Verify();
			cpe.Verify();
		}
コード例 #4
0
        public void GetValidCharsForLocale_Complex()
        {
            DummyICU            icu = new DummyICU();
            DummyCharPropEngine cpe = new DummyCharPropEngine();

            icu.m_icu.SetupResultForParams("GetExemplarCharacters", "[a-c {ch} de f-g e\u0301 \u0301]", "qwe");
            ReflectionHelper.SetField(typeof(ExemplarCharactersHelper), "s_ICU", icu);
            Assert.AreEqual("  a b c f g e\u0301 A B C F G E\u0301",
                            ExemplarCharactersHelper.GetValidCharsForLocale("qwe", cpe));
            icu.m_icu.Verify();
            cpe.Verify();
        }