Exemple #1
0
        public void TestReaderShoulReadCharMap()
        {
            CharacterMappingXmlReader r = GetReader();

            while (r.Read())
            {
                ;
            }
            Dictionary <char, string> map = r.CompileCharacterMapping();

            Assert.IsNotNull(map);
            Assert.IsTrue(map.ContainsKey('\u00A0'));
            Assert.IsTrue(map['\u00A0'] == "&nbsp;");
        }
Exemple #2
0
        public void TestDuplicate()
        {
            CharacterMappingXmlReader r = GetReader5();

            try
            {
                while (r.Read())
                {
                    ;
                }
                Assert.Fail("Must be exception here.");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Exemple #3
0
        public void TestLoop()
        {
            CharacterMappingXmlReader r = GetReader4();

            while (r.Read())
            {
                ;
            }
            try
            {
                Dictionary <char, string> map = r.CompileCharacterMapping();
                Assert.Fail("Should be exception");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }