Exemplo n.º 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;");
        }
Exemplo n.º 2
0
        public void TestDuplicate()
        {
            CharacterMappingXmlReader r = GetReader5();

            try
            {
                while (r.Read())
                {
                    ;
                }
                Assert.Fail("Must be exception here.");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Exemplo n.º 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);
            }
        }