public void TestWriteProjectedCoordinateSystem() { IProjectedCoordinateSystem ProjectedCoordinateSystem = _factory.CreateProjectedCoordinateSystem("27700"); TextWriter textwriter = new StringWriter(); IndentedTextWriter indentedTextWriter = new IndentedTextWriter(textwriter); CoordinateSystemWktWriter.Write(ProjectedCoordinateSystem, indentedTextWriter); bool same = Compare.CompareAgainstString(Global.GetUnitTestRootDirectory() + @"\IO\ProjectedCoordinateSystem.txt", textwriter.ToString()); Assertion.AssertEquals("test 1", true, same); }
public void TestCreateProjectedCoordinateSystem1() { try { _factory.CreateProjectedCoordinateSystem(null); Assertion.Fail("Should not allow a null parameter"); } catch (ArgumentNullException) { } // 4141 is a geographic 2d CRS Kind and thus should not work when trying to create a projected coordinate system. try { _factory.CreateProjectedCoordinateSystem("-1"); Assertion.Fail("Should not allow a null parameter"); } catch (ArgumentException) { } }
public void Test_Constructor1() { ICoordinateSystem headCRS = _factory.CreateProjectedCoordinateSystem("27700"); ICoordinateSystem tailCRS = _factory.CreateVerticalCoordinateSystem("5701"); CompoundCoordinateSystem compoundCS = new CompoundCoordinateSystem(headCRS, tailCRS, "remarks", "authority", "code", "name", "alias", "abbreviation"); Assertion.AssertEquals("ctor1.", headCRS, compoundCS.HeadCS); Assertion.AssertEquals("ctor2.", tailCRS, compoundCS.TailCS); Assertion.AssertEquals("ctor3.", "remarks", compoundCS.Remarks); Assertion.AssertEquals("ctor3.", "authority", compoundCS.Authority); Assertion.AssertEquals("ctor3.", "code", compoundCS.AuthorityCode); Assertion.AssertEquals("ctor3.", "name", compoundCS.Name); Assertion.AssertEquals("ctor3.", "alias", compoundCS.Alias); Assertion.AssertEquals("ctor3.", "abbreviation", compoundCS.Abbreviation); }
public void TestProjectedCoordinateSystem() { IProjectedCoordinateSystem projectedCoordinateSystem = _factory.CreateProjectedCoordinateSystem("27700"); string test1 = CoordinateSystemXmlWriter.Write(projectedCoordinateSystem); }