Initial commit
This commit is contained in:
20
tests/tst_adapter.cpp
Normal file
20
tests/tst_adapter.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "mocks/usbdevicemock.h"
|
||||
|
||||
#include "src/noolite.h"
|
||||
|
||||
using namespace testing;
|
||||
|
||||
TEST(noolite, createAndDeleteAdapter)
|
||||
{
|
||||
UsbDeviceMock *usbDevice = new UsbDeviceMock();
|
||||
|
||||
EXPECT_CALL(*usbDevice, openDevice(0x16c0, 0x05df)).
|
||||
Times(1);
|
||||
EXPECT_CALL(*usbDevice, close()).
|
||||
Times(1);
|
||||
|
||||
noolitelib::Noolite *adapter = new noolitelib::Noolite(usbDevice);
|
||||
delete adapter;
|
||||
}
|
||||
Reference in New Issue
Block a user