Skip to content

Commit

Permalink
✅ (ut): RFID - test enable/disable deep sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli authored and ladislas committed Feb 4, 2024
1 parent f431ac9 commit 22d8ce7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/CoreRFIDReader/tests/CoreRFIDReaderCR95HF_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,17 @@ TEST_F(CoreRFIDReaderTest, getTag)

EXPECT_EQ(tag.data, expected_values);
}

TEST_F(CoreRFIDReaderTest, enableDeepSleep)
{
EXPECT_CALL(mockBufferedSerial, enableDeepSleep());

reader.enableDeepSleep();
}

TEST_F(CoreRFIDReaderTest, disableDeepSleep)
{
EXPECT_CALL(mockBufferedSerial, disableDeepSleep());

reader.disableDeepSleep();
}
14 changes: 14 additions & 0 deletions libs/RFIDKit/tests/RFIDKit_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,17 @@ TEST_F(RFIDKitTest, getLastMagicCardActivated)

EXPECT_EQ(rfid_kit.getLastMagicCardActivated(), MagicCard::emergency_stop);
}

TEST_F(RFIDKitTest, enableDeepSleep)
{
EXPECT_CALL(mock_reader, enableDeepSleep());

rfid_kit.enableDeepSleep();
}

TEST_F(RFIDKitTest, disableDeepSleep)
{
EXPECT_CALL(mock_reader, disableDeepSleep());

rfid_kit.disableDeepSleep();
}

0 comments on commit 22d8ce7

Please sign in to comment.