41 #include <boost/test/unit_test.hpp> 56 std::string url =
"http://demo.geo-solutions.it/geoserver/ows";
59 std::string version =
"2.0.1";
63 std::string connInfo(
"wcs://?URI=" + encodedURL +
"&VERSION=" + version +
"&USERDATADIR=" + usrDataDir);
69 BOOST_CHECK(ds->isOpened());
82 std::string url =
"http://demo.geo-solutions.it/geoserver/ows";
87 std::string version =
"2.0.1";
95 BOOST_CHECK(ds.get() ==
nullptr);
97 connInfo =
"wcs://?URI=" + encodedURL;
101 BOOST_CHECK_THROW(ds->open(), te::ws::ogc::wcs::da::Exception);
103 connInfo =
"wcs://?VERSION=" + version;
107 BOOST_CHECK_THROW(ds->open(), te::ws::ogc::wcs::da::Exception);
109 connInfo =
"wcs://?USERDATADIR=" + usrDataDir;
113 BOOST_CHECK_THROW(ds->open(), te::ws::ogc::wcs::da::Exception);
115 connInfo =
"wcs://?URI=" + encodedURL +
"&VERSION=" + version;
119 BOOST_CHECK_THROW(ds->open(), te::ws::ogc::wcs::da::Exception);
121 connInfo =
"wcs://?URI=" + encodedURL +
"&USERDATADIR=" + usrDataDir;
125 BOOST_CHECK_THROW(ds->open(), te::ws::ogc::wcs::da::Exception);
127 connInfo =
"wcs://?VERSION=" + version +
"&USERDATADIR=" + usrDataDir;
131 BOOST_CHECK_THROW(ds->open(), te::ws::ogc::wcs::da::Exception);
static std::unique_ptr< DataSource > make(const std::string &driver, const te::core::URI &connInfo)
TECOREEXPORT std::string URIEncode(const std::string &srcUri)
Encodes an decoded URI. The algorithm implementation is based on http://www.codeguru.com/cpp/cpp/algorithms/strings/article.php/c12759/URI-Encoding-and-Decoding.htm.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
#define TE_OGC_WCS_DRIVER_IDENTIFIER
The OGC WCS driver identifier string.
This is a singleton for managing all data source instances available in the system.
This is the factory for WCS data sources.
static te::dt::Date ds(2010, 01, 01)
BOOST_AUTO_TEST_CASE(datasource_open_test)
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
A factory for data sources.
Configuration flags for the Terrralib WS OGC WCS DATA ACCESS module.
TEOGCWCSDATAACCESSEXPORT te::da::DataSource * Build(const te::core::URI &uri)
This file contains utility functions used to manipulate data from a URI.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
static void add(const std::string &dsType, FactoryFnctType f)
The base API for controllers of TerraLib applications.