Index: unittests/tst_views.cpp =================================================================== diff -u -r89e3ca8e108dd4b3315ae7862c631eba43f8fd0f -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- unittests/tst_views.cpp (.../tst_views.cpp) (revision 89e3ca8e108dd4b3315ae7862c631eba43f8fd0f) +++ unittests/tst_views.cpp (.../tst_views.cpp) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -23,6 +23,8 @@ #include "VTreatmentBegin.h" #include "VPriming.h" #include "VAlarmStatus.h" +#include "VBluetooth.h" +#include "VBluetoothDeviceInfo.h" tst_views::tst_views(QObject *parent) : QObject(parent) { } @@ -862,3 +864,29 @@ view.continueEnabled(false); QCOMPARE(view.continueEnabled(), false); } + +void tst_views::VBluetoothDeviceInfo_properties() +{ + View::VBluetoothDeviceInfo view("EC:21:E5:F4:BC:C9", "BP7000"); + QCOMPARE("EC:21:E5:F4:BC:C9", view.getAddress()); + QCOMPARE("BP7000", view.getName()); + QCOMPARE(view.isValid(), true); + + QCOMPARE(view.isConnected(), false); + view.setConnected(true); + QCOMPARE(view.isConnected(), true); + view.setConnected(false); + QCOMPARE(view.isConnected(), false); + + View::VBluetoothDeviceInfo view2("EC:21:E5:F4:BC", "BP7000"); + QCOMPARE(view2.isValid(), false); + + View::VBluetoothDeviceInfo view3("EC:21:E5:F4:BC:C9", ""); + QCOMPARE(view3.isValid(), false); + + QCOMPARE(view2 == view3, false); + + View::VBluetoothDeviceInfo view4("EC:21:E5:F4:BC:C9", "BP7000"); + QCOMPARE(view == view4, true); + +}