private void DoTestFile(string file)
        {
            if (!File.Exists(file))
                Assert.Inconclusive("File {0} does not exist", file);

            var r = new WKTFileReader(file, new WKTReader(factory));

            var geoms = r.Read();
            var ls = new LineSequencer();
            ls.Add(geoms);

            if (!ls.IsSequenceable())
                Assert.Inconclusive("Linework not sequencable");

            var seq = ls.GetSequencedLineStrings();
            Assert.Less(seq.NumGeometries, geoms.Count);
        }
        private static void RunLineSequencer(String[] inputWKT, String expectedWKT)      
        {
            try
            {
                IEnumerable<IGeometry> inputGeoms = FromWKT(inputWKT);
                LineSequencer sequencer = new LineSequencer();
                sequencer.Add(inputGeoms);

                if (!sequencer.IsSequenceable())
                    Assert.IsNull(expectedWKT);
                else
                {
                    IGeometry expected = rdr.Read(expectedWKT);
                    IGeometry result = sequencer.GetSequencedLineStrings();
                    bool isTrue = expected.EqualsExact(result);
                    Assert.IsTrue(isTrue, "Expected " + expected + " but was " + result);

                    bool isSequenced = LineSequencer.IsSequenced(result);
                    Assert.IsTrue(isSequenced, "result is not sequenced");
                }
            }
            catch (Exception ex) { Debug.WriteLine(ex.ToString()); throw; }            
        }
        //==========================================================

        private static void RunLineSequencer(String[] inputWKT, String expectedWKT)
        {
            var inputGeoms = FromWKT(inputWKT);
            var sequencer = new LineSequencer();
            sequencer.Add(inputGeoms);

            var isCorrect = false;
            if (!sequencer.IsSequenceable())
            {
                Assert.IsTrue(expectedWKT == null);
            }
            else
            {
                var expected = Rdr.Read(expectedWKT);
                var result = sequencer.GetSequencedLineStrings();
                var isOK = expected.EqualsNormalized(result);
                if (! isOK) {
                    Console.WriteLine("ERROR - Expected: " + expected);
                    Console.WriteLine("          Actual: " + result);
                }

                var isSequenced = LineSequencer.IsSequenced(result);
                Assert.IsTrue(isOK, "Result does not match expected (using EqualsNormalized)!");
                Assert.IsTrue(isSequenced, "Result geometry is not sequenced!");
            }
        }