Skip to content
Permalink
Browse files

Add unit tests

  • Loading branch information
pblottiere committed Mar 28, 2019
1 parent f5171b8 commit cac591c3b736f27cbdb321436eeba14bf7af9161
Showing with 9 additions and 0 deletions.
  1. +9 −0 tests/src/server/wms/test_qgsserver_wms_exceptions.cpp
@@ -14,6 +14,7 @@
***************************************************************************/

#include "qgstest.h"
#include "qgswmsparameters.h"
#include "qgswmsserviceexception.h"

/**
@@ -29,6 +30,7 @@ class TestQgsServerWmsExceptions : public QObject
void cleanupTestCase();

void exception_code();
void exception_message();
};

void TestQgsServerWmsExceptions::initTestCase()
@@ -53,5 +55,12 @@ void TestQgsServerWmsExceptions::exception_code()
QCOMPARE( exception1.code(), QString( "Error" ) );
}

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." ) );
}

QGSTEST_MAIN( TestQgsServerWmsExceptions )
#include "test_qgsserver_wms_exceptions.moc"

0 comments on commit cac591c

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