|
Leosac
0.7.0
OpenSourceAccessControl
|
Unit test live in this namespace. More...
Namespaces | |
| Helper | |
| Unit testing utility class that helps writing test. | |
Classes | |
| class | AuthFileMapperTest |
| Test the mapping of wiegand-card to user from a file. More... | |
| class | AuthSourceBuilderTest |
| Test the AuthSourceBuilder ability to create AuthSource object from messages. More... | |
| class | ConfigManagerTest |
| struct | DummyChildVisitable |
| struct | DummyConstOnlyVisitor |
| struct | DummyServiceImpl |
| struct | DummyServiceInterface |
| struct | DummyServiceInterface2 |
| struct | DummyVisitable |
| struct | DummyVisitor |
| struct | DummyVisitor2 |
| Visitor2 that is ready to visit object of type DummyVisitable, but not of type DummyChildVisitable. More... | |
| class | LedTest |
| class | RemoteControlSecurityTest |
| class | RplethTest |
| class | SysFsGpioConfigTest |
| Note this class doesnt inherits the TestHelper class. More... | |
| class | WiegandReaderTest |
Functions | |
| TEST_F (AuthFileMapperTest, SimpleMapping) | |
| Successful mapping. More... | |
| TEST_F (AuthFileMapperTest, TimeFrameMapping) | |
| Test that time frame for access a properly loaded and that the AccessProfile is coherent with the configuration file. More... | |
| TEST_F (AuthFileMapperTest, TimeFrameMapping2) | |
| Test time frame with default_schedule param. More... | |
| TEST_F (AuthFileMapperTest, NotFoundMapping) | |
| Card ID doesn't exist in the file. More... | |
| TEST_F (AuthFileMapperTest, InvalidFile) | |
| File is not accessible. More... | |
| TEST_F (AuthFileMapperTest, InvalidFileContent) | |
| AuthFile-2.xml has invalid content. More... | |
| TEST_F (AuthFileMapperTest, TestGroupMapping) | |
| TEST_F (AuthFileMapperTest, TestMultiGroupMapping) | |
| TEST_F (AuthFileMapperTest, TestGroupPermission) | |
| Test that group permission applies to user. More... | |
| TEST_F (AuthFileMapperTest, TestMultiGroupPermission) | |
| Tests that permissions from multiple groups are added together. More... | |
| TEST_F (AuthFileMapperTest, TestGroupAndUserPermission) | |
| Tests that single-user permission and group permission works well together. More... | |
| TEST_F (AuthFileMapperTest, UnkownCardId) | |
| TEST_F (AuthFileMapperTest, TestWiegandCardAndPin) | |
| TEST_F (AuthFileMapperTest, TestUserValidityLimit) | |
| TEST_F (AuthFileMapperTest, TestCredentialsValidityLimit) | |
| TEST_F (AuthFileMapperTest, TestCredentialSchedule) | |
| TEST_F (AuthFileMapperTest, TestReservedUserID) | |
UserID UNKNOWN_USER is reserved to prevent confusion in the log file. More... | |
| TEST_F (AuthSourceBuilderTest, ExtractSourceName) | |
| TEST_F (AuthSourceBuilderTest, BuildWiegandCard) | |
| TEST_F (AuthSourceBuilderTest, BuildPin) | |
| TEST_F (AuthSourceBuilderTest, BuildCardAndPing) | |
| TEST_F (ConfigManagerTest, store_load) | |
| TEST_F (ConfigManagerTest, access_cfg) | |
| TEST_F (ConfigManagerTest, build_cfg) | |
| TEST_F (ConfigManagerTest, build_safe_cfg) | |
| Like build_cfg test, but we build a config tree for export. More... | |
| TEST_F (ConfigManagerTest, build_safe_cfg2) | |
| Same as build_safe_cfg but with a second config file. More... | |
| TEST_F (ConfigManagerTest, build_safe_cfg3) | |
| TEST_F (ConfigManagerTest, test_sync_dest) | |
| Config4 export remote and log. More... | |
| TEST_F (ConfigManagerTest, test_sync_dest2) | |
| Config6 export remote and log. More... | |
| TEST_F (ConfigManagerTest, tes_no_import) | |
| Config 8 test. More... | |
| TEST (TestCredentialValidator, alias_length) | |
| TEST (TestWiegandCardValidator, card_id) | |
| TEST (TestWiegandCardValidator, nb_bits) | |
| TEST (TestWiegandPinValidator, pin_is_numeric) | |
| TEST (TestGroup, memberships) | |
| TEST (TestGroupValidator, name_length) | |
| TEST (TestGroupValidator, name_invalid_char) | |
| TEST_F (LedTest, turnOn) | |
| TEST_F (LedTest, turnOff) | |
| TEST_F (LedTest, toggle) | |
| TEST_F (LedTest, blink1) | |
| Test blinking, starting with a led that is OFF. More... | |
| TEST_F (LedTest, blink2) | |
| Test blinking, starting with a led that is ON. More... | |
| TEST_F (LedTest, blink3) | |
| Test regression for #61. More... | |
| TEST (TestRegistry, valid_get_set) | |
| TEST (TestRegistry, invalid_get_set) | |
| TEST (TestRegistry, expiration) | |
| TEST (TestRegistry, auto_expiration) | |
| TEST_F (RemoteControlSecurityTest, Test1) | |
| TEST_F (RemoteControlSecurityTest, TestNoSecurityInformation) | |
| Test default setting, when no <security> tag is present. More... | |
| TEST (TestRFIDCard, convert_to_int) | |
| TEST (TestRFIDCard, wiegand_26) | |
| TEST (TestRFIDCard, bits_56) | |
| Test when the reader returns 56 bits (7 bytes). More... | |
| TEST (Rpleth, TestConvertCard) | |
| TEST_F (RplethTest, TestReceiveStreamCardsSimple) | |
| Check that a rpleth receive cards that are read. More... | |
| TEST_F (RplethTest, TestReceiveStreamCards2) | |
| TEST (TestScheduleValidator, name_length) | |
| TEST (TestRegistry, register_get_service) | |
| TEST (TestRegistry, unregister_simple) | |
| TEST (TestRegistry, unregister_while_used) | |
| TEST (TestRegistry, unregister_no_param) | |
| TEST_F (SysFsGpioConfigTest, ExportUnexportPath) | |
| TEST_F (SysFsGpioConfigTest, PathAndDefaultAliases) | |
| TEST_F (SysFsGpioConfigTest, MoreComplexeAliases) | |
| TEST (VersionTest, buildVersionString) | |
| TEST (VersionTest, versionCompare) | |
| TEST (VersionTest, isVersionValid) | |
| TEST (TestVisitor, simple_non_const) | |
| TEST (TestVisitor, simple_const) | |
| TEST (TestVisitor, const_visit_accept_non_const_visitable) | |
| TEST (TestVisitor, const_visit_accept_const_visitable) | |
| TEST (TestVisitor, test_class_hierarchy) | |
| TEST_F (WiegandReaderTest, readCard) | |
Unit test live in this namespace.
| Leosac::Test::TEST | ( | TestRegistry | , |
| valid_get_set | |||
| ) |
Definition at line 30 of file Registry.cpp.
| Leosac::Test::TEST | ( | VersionTest | , |
| buildVersionString | |||
| ) |
Definition at line 30 of file version.cpp.
| Leosac::Test::TEST | ( | TestRFIDCard | , |
| convert_to_int | |||
| ) |
Definition at line 30 of file RFIDCard.cpp.
| Leosac::Test::TEST | ( | TestScheduleValidator | , |
| name_length | |||
| ) |
Definition at line 32 of file ScheduleValidator.cpp.
| Leosac::Test::TEST | ( | TestGroup | , |
| memberships | |||
| ) |
Definition at line 33 of file GroupValidator.cpp.
| Leosac::Test::TEST | ( | TestCredentialValidator | , |
| alias_length | |||
| ) |
Definition at line 34 of file CredentialValidator.cpp.
| Leosac::Test::TEST | ( | VersionTest | , |
| versionCompare | |||
| ) |
Definition at line 36 of file version.cpp.
| Leosac::Test::TEST | ( | TestRegistry | , |
| invalid_get_set | |||
| ) |
Definition at line 42 of file Registry.cpp.
| Leosac::Test::TEST | ( | VersionTest | , |
| isVersionValid | |||
| ) |
Definition at line 44 of file version.cpp.
| Leosac::Test::TEST | ( | TestRegistry | , |
| register_get_service | |||
| ) |
Definition at line 47 of file ServiceRegistry.cpp.
| Leosac::Test::TEST | ( | TestRFIDCard | , |
| wiegand_26 | |||
| ) |
Definition at line 48 of file RFIDCard.cpp.
| Leosac::Test::TEST | ( | TestGroupValidator | , |
| name_length | |||
| ) |
Definition at line 52 of file GroupValidator.cpp.
| Leosac::Test::TEST | ( | TestRegistry | , |
| expiration | |||
| ) |
Definition at line 52 of file Registry.cpp.
| Leosac::Test::TEST | ( | TestWiegandCardValidator | , |
| card_id | |||
| ) |
Definition at line 55 of file CredentialValidator.cpp.
| Leosac::Test::TEST | ( | TestVisitor | , |
| simple_non_const | |||
| ) |
Definition at line 58 of file Visitor.cpp.
| Leosac::Test::TEST | ( | TestVisitor | , |
| simple_const | |||
| ) |
Definition at line 67 of file Visitor.cpp.
| Leosac::Test::TEST | ( | TestWiegandCardValidator | , |
| nb_bits | |||
| ) |
Definition at line 68 of file CredentialValidator.cpp.
| Leosac::Test::TEST | ( | TestGroupValidator | , |
| name_invalid_char | |||
| ) |
Definition at line 68 of file GroupValidator.cpp.
| Leosac::Test::TEST | ( | TestRegistry | , |
| auto_expiration | |||
| ) |
Definition at line 75 of file Registry.cpp.
| Leosac::Test::TEST | ( | TestRFIDCard | , |
| bits_56 | |||
| ) |
Test when the reader returns 56 bits (7 bytes).
We do nothing special here. Just convert to uint64_t.
Definition at line 76 of file RFIDCard.cpp.
| Leosac::Test::TEST | ( | TestWiegandPinValidator | , |
| pin_is_numeric | |||
| ) |
Definition at line 80 of file CredentialValidator.cpp.
| Leosac::Test::TEST | ( | TestRegistry | , |
| unregister_simple | |||
| ) |
Definition at line 80 of file ServiceRegistry.cpp.
| Leosac::Test::TEST | ( | TestVisitor | , |
| const_visit_accept_non_const_visitable | |||
| ) |
Definition at line 91 of file Visitor.cpp.
| Leosac::Test::TEST | ( | TestVisitor | , |
| const_visit_accept_const_visitable | |||
| ) |
Definition at line 99 of file Visitor.cpp.
| Leosac::Test::TEST | ( | TestRegistry | , |
| unregister_while_used | |||
| ) |
Definition at line 103 of file ServiceRegistry.cpp.
| Leosac::Test::TEST | ( | Rpleth | , |
| TestConvertCard | |||
| ) |
Definition at line 118 of file Rpleth.cpp.
| Leosac::Test::TEST | ( | TestRegistry | , |
| unregister_no_param | |||
| ) |
Definition at line 118 of file ServiceRegistry.cpp.
| Leosac::Test::TEST | ( | TestVisitor | , |
| test_class_hierarchy | |||
| ) |
Definition at line 132 of file Visitor.cpp.
| Leosac::Test::TEST_F | ( | RemoteControlSecurityTest | , |
| Test1 | |||
| ) |
Definition at line 58 of file RemoteControlSecurity.cpp.
| Leosac::Test::TEST_F | ( | WiegandReaderTest | , |
| readCard | |||
| ) |
Definition at line 71 of file WiegandReader.cpp.
| Leosac::Test::TEST_F | ( | RemoteControlSecurityTest | , |
| TestNoSecurityInformation | |||
| ) |
Test default setting, when no <security> tag is present.
This should allow everyone to do everything.
Definition at line 79 of file RemoteControlSecurity.cpp.
| Leosac::Test::TEST_F | ( | AuthSourceBuilderTest | , |
| ExtractSourceName | |||
| ) |
Definition at line 82 of file AuthSourceBuilder.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| store_load | |||
| ) |
Definition at line 91 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | AuthSourceBuilderTest | , |
| BuildWiegandCard | |||
| ) |
Definition at line 98 of file AuthSourceBuilder.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| access_cfg | |||
| ) |
Definition at line 103 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | AuthSourceBuilderTest | , |
| BuildPin | |||
| ) |
Definition at line 110 of file AuthSourceBuilder.cpp.
| Leosac::Test::TEST_F | ( | SysFsGpioConfigTest | , |
| ExportUnexportPath | |||
| ) |
Definition at line 110 of file SysFsGpioConfig.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| build_cfg | |||
| ) |
Definition at line 111 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | SysFsGpioConfigTest | , |
| PathAndDefaultAliases | |||
| ) |
Definition at line 118 of file SysFsGpioConfig.cpp.
| Leosac::Test::TEST_F | ( | LedTest | , |
| blink1 | |||
| ) |
| Leosac::Test::TEST_F | ( | AuthSourceBuilderTest | , |
| BuildCardAndPing | |||
| ) |
Definition at line 121 of file AuthSourceBuilder.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| build_safe_cfg | |||
| ) |
Like build_cfg test, but we build a config tree for export.
We must make sure that information from <sync_source> are honored.
Definition at line 124 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | SysFsGpioConfigTest | , |
| MoreComplexeAliases | |||
| ) |
Definition at line 127 of file SysFsGpioConfig.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| build_safe_cfg2 | |||
| ) |
Same as build_safe_cfg but with a second config file.
We do not declare <sync_source> there, so we should retrieve everything.
Definition at line 142 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | LedTest | , |
| blink2 | |||
| ) |
| Leosac::Test::TEST_F | ( | RplethTest | , |
| TestReceiveStreamCardsSimple | |||
| ) |
Check that a rpleth receive cards that are read.
Definition at line 143 of file Rpleth.cpp.
| Leosac::Test::TEST_F | ( | RplethTest | , |
| TestReceiveStreamCards2 | |||
| ) |
Definition at line 154 of file Rpleth.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| build_safe_cfg3 | |||
| ) |
Definition at line 155 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | LedTest | , |
| blink3 | |||
| ) |
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| test_sync_dest | |||
| ) |
Config4 export remote and log.
Config5 import log.
We must only have log once merged.
Definition at line 174 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| SimpleMapping | |||
| ) |
Successful mapping.
Definition at line 197 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| test_sync_dest2 | |||
| ) |
Config6 export remote and log.
Config7 import log.
Make sure config7's remote is not overwritten.
Definition at line 199 of file ConfigManager.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TimeFrameMapping | |||
| ) |
Test that time frame for access a properly loaded and that the AccessProfile is coherent with the configuration file.
Definition at line 220 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | ConfigManagerTest | , |
| tes_no_import | |||
| ) |
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TimeFrameMapping2 | |||
| ) |
Test time frame with default_schedule param.
Definition at line 261 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| NotFoundMapping | |||
| ) |
Card ID doesn't exist in the file.
Definition at line 285 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| InvalidFile | |||
| ) |
File is not accessible.
Definition at line 295 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| InvalidFileContent | |||
| ) |
AuthFile-2.xml has invalid content.
Definition at line 305 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestGroupMapping | |||
| ) |
Definition at line 316 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestMultiGroupMapping | |||
| ) |
Definition at line 325 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestGroupPermission | |||
| ) |
Test that group permission applies to user.
Definition at line 342 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestMultiGroupPermission | |||
| ) |
Tests that permissions from multiple groups are added together.
If a user is in 2 groups it should have both group permissions.
Definition at line 367 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestGroupAndUserPermission | |||
| ) |
Tests that single-user permission and group permission works well together.
Definition at line 409 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| UnkownCardId | |||
| ) |
Definition at line 429 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestWiegandCardAndPin | |||
| ) |
Definition at line 436 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestUserValidityLimit | |||
| ) |
Definition at line 448 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestCredentialsValidityLimit | |||
| ) |
Definition at line 464 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestCredentialSchedule | |||
| ) |
Definition at line 480 of file AuthFile.cpp.
| Leosac::Test::TEST_F | ( | AuthFileMapperTest | , |
| TestReservedUserID | |||
| ) |
UserID UNKNOWN_USER is reserved to prevent confusion in the log file.
Test that the mapper refuse to build when such a user is defined.
Definition at line 522 of file AuthFile.cpp.