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'] == " "); }
public void TestDuplicate() { CharacterMappingXmlReader r = GetReader5(); try { while (r.Read()) { ; } Assert.Fail("Must be exception here."); } catch (Exception e) { Console.WriteLine(e); } }
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); } }