Example #1
0
        public void InvalidFormatThrows()
        {
            var input = @"one;0031
twelve;";

            using (var stream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(input)))
            {
                Action action = () => GlyphListFactory.Read(stream);

                Assert.Throws <InvalidOperationException>(action);
            }
        }
Example #2
0
        public void SkipsBlankLine()
        {
            var input = @"# comment

one;0031";

            using (var stream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(input)))
            {
                var result = GlyphListFactory.Read(stream);

                Assert.Equal("1", result.NameToUnicode("one"));
            }
        }
Example #3
0
        public void ReadNullThrows()
        {
            Action action = () => GlyphListFactory.Read(null);

            Assert.Throws <ArgumentNullException>(action);
        }