aboutsummaryrefslogtreecommitdiff
path: root/autotests/callcandidateseventtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'autotests/callcandidateseventtest.cpp')
-rw-r--r--autotests/callcandidateseventtest.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/autotests/callcandidateseventtest.cpp b/autotests/callcandidateseventtest.cpp
index b37dd109..257e0ef2 100644
--- a/autotests/callcandidateseventtest.cpp
+++ b/autotests/callcandidateseventtest.cpp
@@ -40,13 +40,16 @@ void TestCallCandidatesEvent::fromJson()
auto object = document.object();
- Quotient::CallCandidatesEvent callCandidatesEvent(object);
+ using namespace Quotient;
+ const auto& callCandidatesEvent = loadEvent<CallCandidatesEvent>(object);
+ QVERIFY(callCandidatesEvent);
+ QVERIFY(callCandidatesEvent->is<CallCandidatesEvent>());
- QCOMPARE(callCandidatesEvent.version(), 0);
- QCOMPARE(callCandidatesEvent.callId(), QStringLiteral("12345"));
- QCOMPARE(callCandidatesEvent.candidates().count(), 1);
+ QCOMPARE(callCandidatesEvent->version(), 0);
+ QCOMPARE(callCandidatesEvent->callId(), QStringLiteral("12345"));
+ QCOMPARE(callCandidatesEvent->candidates().count(), 1);
- const QJsonObject &candidate = callCandidatesEvent.candidates().at(0).toObject();
+ const auto& candidate = callCandidatesEvent->candidates().at(0).toObject();
QCOMPARE(candidate.value("sdpMid").toString(), QStringLiteral("audio"));
QCOMPARE(candidate.value("sdpMLineIndex").toInt(), 0);
QCOMPARE(candidate.value("candidate").toString(),