Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Apr 11, 2019
1 parent 8e67b26 commit 1333be1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/server/wms/test_qgsserver_wms_exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,27 @@ void TestQgsServerWmsExceptions::cleanupTestCase()

void TestQgsServerWmsExceptions::exception_code()
{
QgsWms::QgsServiceException::ExceptionCode code = QgsWms::QgsServiceException::OGC_INVALID_FORMAT;
QgsWms::QgsServiceException::ExceptionCode code = QgsWms::QgsServiceException::OGC_InvalidFormat;
QgsWms::QgsServiceException exception0( code, QString(), 400 );
QCOMPARE( exception0.code(), QString( "InvalidFormat" ) );

code = QgsWms::QgsServiceException::QGIS_INVALID_PARAMETER_VALUE;
code = QgsWms::QgsServiceException::QGIS_InvalidParameterValue;
QgsWms::QgsServiceException exception1( code, QString(), 400 );
QCOMPARE( exception1.code(), QString( "InvalidParameterValue" ) );
}

void TestQgsServerWmsExceptions::exception_message()
{
QgsWms::QgsServiceException::ExceptionCode code = QgsWms::QgsServiceException::QGIS_MISSING_PARAMETER_VALUE;
QgsWms::QgsServiceException::ExceptionCode code = QgsWms::QgsServiceException::QGIS_MissingParameterValue;
QgsWms::QgsServiceException exception( code, QgsWms::QgsWmsParameter::LAYER, 400 );
QCOMPARE( exception.message(), QString( "The LAYER parameter is missing." ) );

code = QgsWms::QgsServiceException::OGC_INVALID_SRS;
code = QgsWms::QgsServiceException::OGC_InvalidSRS;
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;
code = QgsWms::QgsServiceException::OGC_InvalidCRS;
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" ) );
Expand Down

0 comments on commit 1333be1

Please sign in to comment.