2017-07-03 09:30:10 +02:00
|
|
|
/*!
|
|
|
|
* \copyright Copyright (c) 2014 Governikus GmbH & Co. KG
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "asn1/ChipAuthenticationInfo.h"
|
|
|
|
#include "asn1/PACEInfo.h"
|
|
|
|
#include "asn1/SecurityInfos.h"
|
2017-09-15 10:23:30 +02:00
|
|
|
#include "TestFileHelper.h"
|
2017-07-03 09:30:10 +02:00
|
|
|
|
2017-07-03 09:33:28 +02:00
|
|
|
#include <QtTest>
|
|
|
|
|
2017-07-03 09:30:10 +02:00
|
|
|
using namespace governikus;
|
|
|
|
|
|
|
|
class test_efCardAccess
|
|
|
|
: public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void initTestCase()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void parseEFCardAccess()
|
|
|
|
{
|
|
|
|
QByteArray bytes = QByteArray::fromHex(TestFileHelper::readFile(":/card/efCardAccess.hex"));
|
|
|
|
|
|
|
|
auto efCardAccess = EFCardAccess::decode(bytes);
|
|
|
|
|
|
|
|
QVERIFY(efCardAccess != nullptr);
|
2017-07-03 09:33:28 +02:00
|
|
|
QCOMPARE(efCardAccess->getChipAuthenticationInfos().size(), 1);
|
|
|
|
QCOMPARE(efCardAccess->getPACEInfos().size(), 1);
|
2017-07-03 09:30:10 +02:00
|
|
|
QCOMPARE(efCardAccess->getContentBytes(), bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
QTEST_GUILESS_MAIN(test_efCardAccess)
|
|
|
|
#include "test_efCardAccess.moc"
|