Skip to content

Commit 3ec23ca

Browse files
committedApr 11, 2019
Add unit tests
1 parent b2b33af commit 3ec23ca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎tests/src/server/wms/test_qgsserver_wms_exceptions.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ void TestQgsServerWmsExceptions::exception_message()
6060
QgsWms::QgsServiceException::ExceptionCode code = QgsWms::QgsServiceException::QGIS_MISSING_PARAMETER_VALUE;
6161
QgsWms::QgsServiceException exception( code, QgsWms::QgsWmsParameter::LAYER, 400 );
6262
QCOMPARE( exception.message(), QString( "The LAYER parameter is missing." ) );
63+
64+
code = QgsWms::QgsServiceException::OGC_INVALID_SRS;
65+
QgsWms::QgsServiceException exception_srs( code, QgsWms::QgsWmsParameter::SRS, 400 );
66+
QCOMPARE( exception_srs.message(), QString( "The SRS is not valid." ) );
67+
QCOMPARE( exception_srs.code(), QString( "InvalidSRS" ) );
68+
69+
code = QgsWms::QgsServiceException::OGC_INVALID_CRS;
70+
QgsWms::QgsServiceException exception_crs( code, QgsWms::QgsWmsParameter::CRS, 400 );
71+
QCOMPARE( exception_crs.message(), QString( "The CRS is not valid." ) );
72+
QCOMPARE( exception_crs.code(), QString( "InvalidCRS" ) );
6373
}
6474

6575
QGSTEST_MAIN( TestQgsServerWmsExceptions )

0 commit comments

Comments
 (0)
Please sign in to comment.