/// <summary>
		/// Uses the default database.
		/// </summary>
		/// <remarks>
		/// The default database must be placed in the working directory. An error occures if the file
		/// cannot be found. The name of the database must be 'EPSG_v61.mcb'.
		/// </remarks>
		/// <returns>Returns an instance of CoordinateSystemEPSGFactory.</returns>
		public static CoordinateSystemEPSGFactory UseDefaultDatabase()
		{
			string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=EPSG_v61.mdb";
			OleDbConnection connection = new OleDbConnection(connectionString);
			CoordinateSystemEPSGFactory factory = new CoordinateSystemEPSGFactory(connection);
			return factory;
		}
        /// <summary>
        /// Uses the default database.
        /// </summary>
        /// <remarks>
        /// The default database must be placed in the working directory. An error occures if the file
        /// cannot be found. The name of the database must be 'EPSG_v61.mcb'.
        /// </remarks>
        /// <returns>Returns an instance of CoordinateSystemEPSGFactory.</returns>
        public static CoordinateSystemEPSGFactory UseDefaultDatabase()
        {
            string                      connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=EPSG_v61.mdb";
            OleDbConnection             connection       = new OleDbConnection(connectionString);
            CoordinateSystemEPSGFactory factory          = new CoordinateSystemEPSGFactory(connection);

            return(factory);
        }
 /// <summary>
 /// Initializes a new instance of the CoordinateTransformationEPSGFactory class.
 /// </summary>
 public CoordinateTransformationEPSGFactory(IDbConnection databaseConnection)
 {
     if (databaseConnection==null)
     {
         throw new ArgumentNullException("databaseConnection");
     }
     _databaseConnection = databaseConnection;
     _coordSystemFactory = new CoordinateSystemEPSGFactory(databaseConnection);
 }
		public void Test_Constructor1() 
		{
			try
			{
				CoordinateSystemEPSGFactory factory = new CoordinateSystemEPSGFactory(null);
				Assertion.Fail("ArgumentNullException should be thrown");
			}
			catch (ArgumentNullException)
			{
			}
		}
		public CoordinateTransformationEPSGFactoryTest() 
		{
			IDbConnection connection = Global.GetEPSGDatabaseConnection();
			_CTfactory = new CoordinateTransformationEPSGFactory(connection);
			_CRSfactory = new CoordinateSystemEPSGFactory(connection);
		}
		public CompoundCoordinateSystemTest()
		{
			_factory = new CoordinateSystemEPSGFactory(Global.GetEPSGDatabaseConnection());
		}
 public void Init()
 {
     _factory = new CoordinateSystemEPSGFactory(Global.GetEPSGDatabaseConnection());
 }
        public void Test_TestSqlServer()
        {
            string connectionString = @"initial catalog=EPSG;data source=localhost;Integrated Security=SSPI;";
            SqlConnection connection = new SqlConnection(connectionString);

            CoordinateSystemEPSGFactory factory = new CoordinateSystemEPSGFactory(connection);
            ILinearUnit linearUnit = factory.CreateLinearUnit("9001");
            Assertion.AssertEquals("LinearUnit - untis per meter ",1.0,linearUnit.MetersPerUnit);
            Assertion.AssertEquals("LinearUnit - Authority","EPSG",linearUnit.Authority);
            Assertion.AssertEquals("LinearUnit - Remarks","Also known as International metre.",linearUnit.Remarks);
            connection.Close();
        }
 public void Test_TestAccessDB()
 {
     IDbConnection connection = Global.GetEPSGDatabaseConnection();
     CoordinateSystemEPSGFactory factory = new CoordinateSystemEPSGFactory(connection);
     ILinearUnit linearUnit = factory.CreateLinearUnit("9001");
     Assertion.AssertEquals("LinearUnit - untis per meter ",1.0,linearUnit.MetersPerUnit);
     Assertion.AssertEquals("LinearUnit - Authority","EPSG",linearUnit.Authority);
     Assertion.AssertEquals("LinearUnit - Remarks","Also known as International metre.",linearUnit.Remarks);
     connection.Close();
 }