Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Apr 11, 2019
1 parent b2b33af commit 3ec23ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/src/server/wms/test_qgsserver_wms_exceptions.cpp
Expand Up @@ -60,6 +60,16 @@ void TestQgsServerWmsExceptions::exception_message()
QgsWms::QgsServiceException::ExceptionCode code = QgsWms::QgsServiceException::QGIS_MISSING_PARAMETER_VALUE;
QgsWms::QgsServiceException exception( code, QgsWms::QgsWmsParameter::LAYER, 400 );
QCOMPARE( exception.message(), QString( "The LAYER parameter is missing." ) );

code = QgsWms::QgsServiceException::OGC_INVALID_SRS;
QgsWms::QgsServiceException exception_srs( code, QgsWms::QgsWmsParameter::SRS, 400 );
QCOMPARE( exception_srs.message(), QString( "The SRS is not valid." ) );
QCOMPARE( exception_srs.code(), QString( "InvalidSRS" ) );

code = QgsWms::QgsServiceException::OGC_INVALID_CRS;
QgsWms::QgsServiceException exception_crs( code, QgsWms::QgsWmsParameter::CRS, 400 );
QCOMPARE( exception_crs.message(), QString( "The CRS is not valid." ) );
QCOMPARE( exception_crs.code(), QString( "InvalidCRS" ) );
}

QGSTEST_MAIN( TestQgsServerWmsExceptions )
Expand Down

0 comments on commit 3ec23ca

Please sign in to comment.