Skip to content
Permalink
Browse files

Update unit tests

  • Loading branch information
pblottiere committed Apr 11, 2019
1 parent 8e67b26 commit 1333be1e1c9d7deb4c42b6b247ce81bb993bc52c
Showing with 5 additions and 5 deletions.
  1. +5 −5 tests/src/server/wms/test_qgsserver_wms_exceptions.cpp
@@ -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" ) );

0 comments on commit 1333be1

Please sign in to comment.
You can’t perform that action at this time.