Beispiel #1
0
        public void ReadNegativeInt()
        {
            var str = new StringReader("-20z");

            using (var reader = new TypeTextReader(str))
            {
                var integer = reader.ReadInt64();
                Assert.Equal(integer, -20L);
                Assert.Equal('z', (char)reader.BaseReader.Peek());
            }
        }
Beispiel #2
0
        public void ReadInt()
        {
            var str = new StringReader("100s");

            using (var reader = new TypeTextReader(str))
            {
                var integer = reader.ReadInt64();
                Assert.Equal(100, integer);
                Assert.Equal('s', (char)reader.BaseReader.Peek());
            }
        }