Skip to content
Permalink
Browse files

Add unit tests

  • Loading branch information
pblottiere committed Apr 10, 2019
1 parent b2b33af commit 3ec23ca2eceecc4e291ab6f13cbad218ea1a2dc1
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/src/server/wms/test_qgsserver_wms_exceptions.cpp
@@ -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 )

0 comments on commit 3ec23ca

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