diff options
Diffstat (limited to 'p2pvr/daemon')
| -rw-r--r-- | p2pvr/daemon/unittests/testErrorHandling.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/p2pvr/daemon/unittests/testErrorHandling.cpp b/p2pvr/daemon/unittests/testErrorHandling.cpp index 5b53999..be44ebc 100644 --- a/p2pvr/daemon/unittests/testErrorHandling.cpp +++ b/p2pvr/daemon/unittests/testErrorHandling.cpp @@ -66,6 +66,14 @@ class FailingTestNetworkParser : public SiNetworkInformationParser { throw DataHandlingException(); } }; + +class BrokenTestNetworkParser : public SiNetworkInformationParser { + public: + bool HandleTable(const ::DVBSI::NetworkPtr &) override + { + throw std::runtime_error("Unexpected"); + } +}; } } @@ -109,5 +117,14 @@ BOOST_AUTO_TEST_CASE(TestParserWithError) BOOST_REQUIRE_THROW(devices->SendNetworkInformation(del, a), DataHandlingException); } +BOOST_AUTO_TEST_CASE(TestParserBroken) +{ + BOOST_TEST_CHECKPOINT("Setup"); + auto del = si->GetDeliveryForSi(); + TemporaryIceAdapterObject<RawDataClient> a(getAdapter(), new BrokenTestNetworkParser()); + BOOST_TEST_CHECKPOINT("Make failing call"); + BOOST_REQUIRE_THROW(devices->SendNetworkInformation(del, a), Ice::UnknownException); +} + BOOST_AUTO_TEST_SUITE_END() |
