File: nitrokeymock.h

package info (click to toggle)
nitrokey-authenticator 1.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 728 kB
  • sloc: cpp: 2,883; xml: 43; makefile: 7
file content (31 lines) | stat: -rw-r--r-- 1,275 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef NITROKEYMOCK_H
#define NITROKEYMOCK_H

#include "gmock/gmock.h"

#include "nitrokeybase.h"

class NitrokeyMock : public NitrokeyBase {
public:
    MOCK_METHOD(bool, connect, (), (override));
    MOCK_METHOD(bool, isConnected, (), (const, override));
    MOCK_METHOD(bool, firstAuth, (const std::string &, const std::string &),
                (override));
    MOCK_METHOD(void, userAuth, (const std::string &, const std::string &),
                (override));
    MOCK_METHOD(void, writeTotpSlot, (std::uint8_t, const std::string &,
                                      const std::string &, std::uint16_t,
                                      const std::string &), (override));
    MOCK_METHOD(void, eraseTotpSlot, (std::uint8_t, const std::string &),
                (override));
    MOCK_METHOD(std::vector<TOTPSlot>, getSlots, (), (const, override));
    MOCK_METHOD(std::string, getSlotName, (std::uint8_t), (const, override));
    MOCK_METHOD(void, setTime, (std::uint64_t), (const, override));
    MOCK_METHOD(void, setTimeSoft, (std::uint64_t), (const, override));
    MOCK_METHOD(std::string, getTOTPCode, (const TOTPSlot &,
                                           const std::string &),
                (const, override));
};


#endif // NITROKEYMOCK_H