Example #1
0
        private static void ShouldFindNothing(string input)
        {
            var testSubject = new TrivialFormatter();

            Assert.AreEqual(MissingLineMessage,
                            AssertThrows <ParseErrorException>(() => testSubject.Read <GeographyPoint>(new StringReader(input))).Message);

            Assert.AreEqual(MissingLineMessage,
                            AssertThrows <ParseErrorException>(() => testSubject.Read <GeometryPoint>(new StringReader(input))).Message);
        }
Example #2
0
        private static void AssertParsesOneShape <TExpectedType>(TrivialFormatter testSubject, string input, TExpectedType expected,
                                                                 string expectedUnusedInput) where TExpectedType : class, ISpatial
        {
            var reader = new StringReader(input);
            var actual = testSubject.Read <TExpectedType>(reader);

            Assert.AreEqual(expected, actual);
            Assert.AreEqual(expectedUnusedInput, reader.ReadToEnd());
        }