}
};
-TEST_F(ClientRequestTest, client_request_child_constructor_P)
+TEST_F(ClientRequestTest, client_request_child_constructor_Positive)
{
int ret = 0;
try{
-TEST_F(ClientRequestTest, invalid_interface_N)
+TEST_F(ClientRequestTest, invalid_interface_Negative)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(ClientRequestTest, send_failed_N)
+TEST_F(ClientRequestTest, send_failed_Negative)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(ClientRequestTest, request_to_not_supported_server_N)
+TEST_F(ClientRequestTest, request_to_not_supported_server_Negative)
{
int ret = 1;
WA::SocketManager manager;
EXPECT_EQ(ret, 0);
}
-TEST_F(ClientRequestTest, MC_with_LD_and_not_call_QR_callback_P)
+TEST_F(ClientRequestTest, MC_with_LD_and_not_call_QR_callback_Positive)
{
int ret = 1;
WA::SocketManager manager;
EXPECT_EQ(ret, 0);
}
-TEST_F(ClientRequestTest, MC_without_LD_and_call_QR_callback_P)
+TEST_F(ClientRequestTest, MC_without_LD_and_call_QR_callback_Positive)
{
int ret = 1;
WA::SocketManager manager;
}
-TEST_F(ClientRequestTest, GA_with_LD_and_not_call_QR_callback_P)
+TEST_F(ClientRequestTest, GA_with_LD_and_not_call_QR_callback_Positive)
{
int ret = 1;
WA::SocketManager manager;
EXPECT_EQ(ret, 0);
}
-TEST_F(ClientRequestTest, GA_without_LD_and_call_QR_callback_P)
+TEST_F(ClientRequestTest, GA_without_LD_and_call_QR_callback_Positive)
{
int ret = 1;
WA::SocketManager manager;
EXPECT_EQ(ret, 0);
}
-TEST_F(ClientRequestTest, not_allowed_N)
+TEST_F(ClientRequestTest, not_allowed_Negative)
{
int ret = 1;
WA::SocketManager manager;
EXPECT_EQ(ret, 0);
}
-TEST_F(ClientRequestTest, cancel_P)
+TEST_F(ClientRequestTest, cancel_Positive)
{
int ret = 1;
WA::SocketManager manager;
}
};
-TEST_F(DLLoaderTest, DLLoader_P)
+TEST_F(DLLoaderTest, DLLoader_Positive)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(DLLoaderTest, DLLoader_empty_path_N)
+TEST_F(DLLoaderTest, DLLoader_empty_path_Negative)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(DLLoaderTest, DLLoader_invalid_path_N)
+TEST_F(DLLoaderTest, DLLoader_invalid_path_Negative)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(DLLoaderTest, Invoke_P)
+TEST_F(DLLoaderTest, Invoke_Positive)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(DLLoaderTest, Invoke_N)
+TEST_F(DLLoaderTest, Invoke_Negative)
{
int ret = 0;
try{
}
};
-TEST_F(FileLockerTest, lock_and_unlock_P)
+TEST_F(FileLockerTest, lock_and_unlock_Positive)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(FileLockerTest, lock_after_unlock_P)
+TEST_F(FileLockerTest, lock_after_unlock_Positive)
{
int ret = 0;
try{
EXPECT_EQ(ret, 0);
}
-TEST_F(FileLockerTest, lock_empty_path_N)
+TEST_F(FileLockerTest, lock_empty_path_Negative)
{
int ret = 0;
try{
EXPECT_EQ(ret, 1);
}
-TEST_F(FileLockerTest, lock_invalid_path_N)
+TEST_F(FileLockerTest, lock_invalid_path_Negative)
{
int ret = 0;
try{
EXPECT_EQ(ret, 1);
}
-TEST_F(FileLockerTest, try_to_locked_path_N)
+TEST_F(FileLockerTest, try_to_locked_path_Negative)
{
int ret = 0;
try{
} // namespace
-TEST(PrivilegeTest, NoPrivileges)
+TEST(PrivilegeTest, NoPrivileges_Negative)
{
ScopedProcessLabel label(TEST_LABEL);
unsigned supported;
EXPECT_EQ(ret, WAUTHN_ERROR_PERMISSION_DENIED);
}
-TEST(PrivilegeTest, AllDenied)
+TEST(PrivilegeTest, AllDenied_Negative)
{
const ScopedCynaraPolicy DENY_ALL({
{PRIV_INTERNET, CYNARA_ADMIN_DENY},
EXPECT_EQ(ret, WAUTHN_ERROR_PERMISSION_DENIED);
}
-TEST(PrivilegeTest, SinglePrivilege)
+TEST(PrivilegeTest, SinglePrivilege_Negative)
{
const ScopedCynaraPolicy ALLOW_ONE({
{PRIV_INTERNET, CYNARA_ADMIN_ALLOW},
EXPECT_EQ(ret, WAUTHN_ERROR_PERMISSION_DENIED);
}
-TEST(PrivilegeTest, AllPrivileges)
+TEST(PrivilegeTest, AllPrivileges_Positive)
{
const ScopedCynaraPolicy ALLOW_ALL({
{PRIV_INTERNET, CYNARA_ADMIN_ALLOW},
return false;
return (strcmp(expected, actual) == 0);
}
-TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_Positive)
{
unsigned char TestCommonData[26] = {0x01, 0x02, 0x03, 0x04, };
wauthn_const_buffer_s buffer = {TestCommonData, sizeof(TestCommonData)};
ConstBufferDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnBuffers);
}
-TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_1_Negative)
{// serialize: for too large length
unsigned char TestCommonData[26] = {0x01, 0x02, 0x03, 0x04, };
wauthn_const_buffer_s data = {TestCommonData, MAX_BUFFER_SIZE + 1};
} catch(SerializationException::InvalidStreamData &) {
}
}
-TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_2_Negative)
{// serialize: for inconsistent pointer & length
unsigned char TestCommonData[26] = {0x01, 0x02, 0x03, 0x04, };
wauthn_const_buffer_s data = {nullptr, sizeof(TestCommonData)};
} catch(SerializationException::InvalidStreamData &) {
}
}
-TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_const_buffer_s_3_Negative)
{// deserialize: for too large length
ConstBufferDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_attestation_response_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_attestation_response_s_Positive)
{
AuthenticatorAttestationResponseSerializer data1(
&TestCommonData::authenticatorAttestationResponse);
AuthenticatorAttestationResponseDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnAuthenticatorAttestationResponseS);
}
-TEST_F(WAuthnSerializationTest, wauthn_bwauthn_authenticator_attestation_response_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_bwauthn_authenticator_attestation_response_s_1_Negative)
{// deserialize: for too large length
AuthenticatorAttestationResponseDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_assertion_response_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_assertion_response_s_Positive)
{
AuthenticatorAssertionResponseSerializer data1(&TestCommonData::authenticatorAssertionResponse);
AuthenticatorAssertionResponseDeserializer deserializer1;
AuthenticatorAssertionResponseDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnAuthenticatorAssertionResponseS);
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_assertion_response_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_assertion_response_s_1_Negative)
{// deserialize: for too large length
AuthenticatorAssertionResponseDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_rp_entity_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_rp_entity_s_Positive)
{
RpEntitySerializer data1(&TestCommonData::rpEntity);
RpEntityDeserializer deserializer1;
RpEntityDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnRpEntityS);
}
-TEST_F(WAuthnSerializationTest, wauthn_rp_entity_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_rp_entity_s_1_Negative)
{// deserialize: for too large length
RpEntityDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_user_entity_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_user_entity_s_Positive)
{
UserEntitySerializer data1(&TestCommonData::userEntity);
UserEntityDeserializer deserializer1;
UserEntityDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnUserEntityS);
}
-TEST_F(WAuthnSerializationTest, wauthn_user_entity_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_user_entity_s_1_Negative)
{// deserialize: for too large length
UserEntityDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_Positive)
{
wauthn_pubkey_cred_param_s param1 = {WAUTHN_PUBKEY_CRED_TYPE_PUBLIC_KEY,
WAUTHN_COSE_ALGORITHM_ECDSA_P256_WITH_SHA256};
PubkeyCredParamDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnPubkeyCredParamS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_1_Negative)
{// serialize: invalid member
wauthn_pubkey_cred_param_s param1 = {static_cast<wauthn_pubkey_cred_type_e>(0),
WAUTHN_COSE_ALGORITHM_ECDSA_P256_WITH_SHA256};
PubkeyCredParamSerializer data2(¶m2);
__testSerializeForInvalidMember(data2);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_2_Negative)
{// deserialize: for invalid type
wauthn_pubkey_cred_param_s param1 = {static_cast<wauthn_pubkey_cred_type_e>(0),
WAUTHN_COSE_ALGORITHM_ECDSA_P256_WITH_SHA256};
__testDeserializeForInvalidMember<wauthn_pubkey_cred_param_s,
PubkeyCredParamDeserializer>(param1);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_param_s_3_Negative)
{// deserialize: for too large length
PubkeyCredParamDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_Positive)
{
PubkeyCredParamsSerializer data1(&TestCommonData::pubkeyCredParams1);
PubkeyCredParamsDeserializer deserializer1;
PubkeyCredParamsDeserializer deserializer4;
__testSerialization(data4, deserializer4, __compareWAuthnPubkeyCredParamsS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_1_Negative)
{// deserialize: for too large length
PubkeyCredParamsDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_2_Negative)
{// deserialize: for too large array count
wauthn_pubkey_cred_params_s param = {MAX_ARRAY_COUNT + 1, TestCommonData::pubkeyCredParam2};
__testDeserializeForInvalidMember<wauthn_pubkey_cred_params_s,
PubkeyCredParamsDeserializer>(param);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_params_s_3_Negative)
{// deserialize: for invalid array count
wauthn_pubkey_cred_params_s param = {3, nullptr};
__testDeserializeForInvalidMember<wauthn_pubkey_cred_params_s,
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_Positive)
{
PubkeyCredDescriptorSerializer data1(&TestCommonData::pubkeyCredDescriptor);
PubkeyCredDescriptorDeserializer deserializer1;
PubkeyCredDescriptorDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnPubkeyCredDescriptorS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_1_Negative)
{// serialize: invalid member
wauthn_pubkey_cred_descriptor_s data = TestCommonData::pubkeyCredDescriptor;
data.type = static_cast<wauthn_pubkey_cred_type_e>(0);
__testDeserializeForInvalidMember<wauthn_pubkey_cred_descriptor_s,
PubkeyCredDescriptorDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_2_Negative)
{// deserialize: for too large length
PubkeyCredDescriptorDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptor_s_3_Negative)
{// deserialize: for invalid type
wauthn_pubkey_cred_descriptor_s data = {static_cast<wauthn_pubkey_cred_type_e>(0),
&TestCommonData::clientDataJson, 3};
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_Positive)
{
PubkeyCredDescriptorsSerializer data1(&TestCommonData::pubkeyCredDescriptors1);
PubkeyCredDescriptorsDeserializer deserializer1;
PubkeyCredDescriptorsDeserializer deserializer4;
__testSerialization(data4, deserializer4, __compareWAuthnPubkeyCredDescriptorsS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_1_Negative)
{// deserialize: for too large length
PubkeyCredDescriptorsDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_2_Negative)
{// deserialize: for too large array count
wauthn_pubkey_cred_descriptors_s data = {MAX_ARRAY_COUNT + 1,
TestCommonData::pubkeyCredDescriptor2};
__testDeserializeForInvalidMember<wauthn_pubkey_cred_descriptors_s,
PubkeyCredDescriptorsDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_descriptors_s_3_Negative)
{// deserialize: for inconsistent pointer & size
wauthn_pubkey_cred_descriptors_s data = {3, nullptr};
__testDeserializeForInvalidMember<wauthn_pubkey_cred_descriptors_s,
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_authentication_ext_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_authentication_ext_s_Positive)
{
AuthenticationExtSerializer data1(&TestCommonData::authenticationExt);
AuthenticationExtDeserializer deserializer1;
AuthenticationExtDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnAuthenticationExtS);
}
-TEST_F(WAuthnSerializationTest, wauthn_authentication_ext_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_authentication_ext_s_1_Negative)
{// deserialize: for too large length
AuthenticationExtDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_Positive)
{
AuthenticationExtsSerializer data1(&TestCommonData::authenticationExts1);
AuthenticationExtsDeserializer deserializer1;
AuthenticationExtsDeserializer deserializer4;
__testSerialization(data4, deserializer4, __compareWAuthnAuthenticationExtsS);
}
-TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_1_Negative)
{// deserialize: for too large length
AuthenticationExtsDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_2_Negative)
{// deserialize: for too large array count
wauthn_authentication_exts_s data = {MAX_ARRAY_COUNT + 1,
TestCommonData::authenticationExtArr2};
__testDeserializeForInvalidMember<wauthn_authentication_exts_s,
AuthenticationExtsDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_authentication_exts_s_3_Negative)
{// deserialize: for inconsistent pointer & size
wauthn_authentication_exts_s data = {3, nullptr};
__testDeserializeForInvalidMember<wauthn_authentication_exts_s,
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_Positive)
{
AuthenticatorSelCriSerializer data1(&TestCommonData::authenticatorSelCri);
AuthenticatorSelCriDeserializer deserializer1;
AuthenticatorSelCriDeserializer deserializer2;
__testSerialization(data2, deserializer2, __compareWAuthnAuthenticatorSelCriS);
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_1_Negative)
{// serialize: invalid member
wauthn_authenticator_sel_cri_s data1 = TestCommonData::authenticatorSelCri;
data1.attachment = static_cast<wauthn_authenticator_attachment_e>(3);
__testDeserializeForInvalidMember<wauthn_authenticator_sel_cri_s,
AuthenticatorSelCriDeserializer>(data3);
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_2_Negative)
{// deserialize: for invalid attachment
wauthn_authenticator_sel_cri_s data = {static_cast<wauthn_authenticator_attachment_e>(3),
WAUTHN_RESIDENT_KEY_REQUIREMENT_DISCOURAGED,
__testDeserializeForInvalidMember<wauthn_authenticator_sel_cri_s,
AuthenticatorSelCriDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_3_Negative)
{// deserialize: for invalid resident_key
wauthn_authenticator_sel_cri_s data = {WAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM,
static_cast<wauthn_resident_key_requirement_e>(4),
__testDeserializeForInvalidMember<wauthn_authenticator_sel_cri_s,
AuthenticatorSelCriDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_N4)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_4_Negative)
{// deserialize: for invalid user_verification
wauthn_authenticator_sel_cri_s data = {WAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM,
WAUTHN_RESIDENT_KEY_REQUIREMENT_DISCOURAGED,
__testDeserializeForInvalidMember<wauthn_authenticator_sel_cri_s,
AuthenticatorSelCriDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_N5)
+TEST_F(WAuthnSerializationTest, wauthn_authenticator_sel_cri_s_5_Negative)
{// deserialize: for too large length
AuthenticatorSelCriDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_Positive)
{
PubkeyCredHintsSerializer data1(&TestCommonData::pubkeyCredHints1);
PubkeyCredHintsDeserializer deserializer1;
PubkeyCredHintsDeserializer deserializer4;
__testSerialization(data4, deserializer4, __compareWAuthnPubkeyCredHintsE);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_1_Negative)
{// deserialize: for too large length
PubkeyCredHintsDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_2_Negative)
{// deserialize: for too large array count
wauthn_pubkey_cred_hints_s data = {MAX_ARRAY_COUNT + 1, TestCommonData::pubkeyCredHint2};
__testDeserializeForInvalidMember<wauthn_pubkey_cred_hints_s,
PubkeyCredHintsDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_hints_s_3_Negative)
{// deserialize: for inconsistent pointer & size
wauthn_pubkey_cred_hints_s data = {3, nullptr};
__testDeserializeForInvalidMember<wauthn_pubkey_cred_hints_s,
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_hybrid_linked_data_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_hybrid_linked_data_s_Positive)
{
HybridLinkedDataSerializer data1(&TestCommonData::hybridLinkedData);
HybridLinkedDataDeserializer deserializer1;
HybridLinkedDataDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnHybridLinkedDataS);
}
-TEST_F(WAuthnSerializationTest, wauthn_hybrid_linked_data_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_hybrid_linked_data_s_1_Negative)
{// deserialize: for too large length
HybridLinkedDataDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_Positive)
{
AttestationFormatsSerializer data1(&TestCommonData::attestationFormats1);
AttestationFormatsDeserializer deserializer1;
AttestationFormatsDeserializer deserializer4;
__testSerialization(data4, deserializer4, __compareWAuthnAttestationFormatsS);
}
-TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_1_Negative)
{// deserialize: for too large length
AttestationFormatsDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_2_Negative)
{// deserialize: for too large array count
wauthn_attestation_formats_s data = {MAX_ARRAY_COUNT + 1, TestCommonData::attestationFormat2};
__testDeserializeForInvalidMember<wauthn_attestation_formats_s,
AttestationFormatsDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_attestation_formats_s_3_Negative)
{// deserialize: for inconsistent pointer & size
wauthn_attestation_formats_s data = {3, nullptr};
__testDeserializeForInvalidMember<wauthn_attestation_formats_s,
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_creation_options_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_creation_options_s_Positive)
{
PubKeyCredCreationOptionsSerializer data1(&TestCommonData::pubkeyCredCreationOptions);
PubKeyCredCreationOptionsDeserializer deserializer1;
PubKeyCredCreationOptionsDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnPubkeyCredCreationOptionsS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_creation_options_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_creation_options_s_1_Negative)
{// deserialize: for too large length
PubKeyCredCreationOptionsDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_creation_options_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_creation_options_s_2_Negative)
{// serialize: invalid member
wauthn_pubkey_cred_creation_options_s data = TestCommonData::pubkeyCredCreationOptions;
data.attestation = static_cast<wauthn_attestation_pref_e>(4);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_Positive)
{
PubKeyCredRequestOptionsSerializer data1(&TestCommonData::pubkeyCredRequestOptions);
PubKeyCredRequestOptionsDeserializer deserializer1;
PubKeyCredRequestOptionsDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnPubkeyCredRequestOptionsS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_1_Negative)
{// serialize: invalid member
wauthn_pubkey_cred_request_options_s data = TestCommonData::pubkeyCredRequestOptions;
data.user_verification = static_cast<wauthn_user_verification_requirement_e>(4);
__testDeserializeForInvalidMember<wauthn_pubkey_cred_request_options_s,
PubKeyCredRequestOptionsDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_2_Negative)
{// serialize: invalid member
wauthn_pubkey_cred_request_options_s data = TestCommonData::pubkeyCredRequestOptions;
data.attestation = static_cast<wauthn_attestation_pref_e>(4);
__testDeserializeForInvalidMember<wauthn_pubkey_cred_request_options_s,
PubKeyCredRequestOptionsDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_cred_request_options_s_3_Negative)
{// deserialize: for too large length
PubKeyCredRequestOptionsDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_Positive)
{
PubkeyCredentialAttestationSerializer data1(&TestCommonData::pubkeyCredentialAttestation);
PubkeyCredentialAttestationDeserializer deserializer1;
PubkeyCredentialAttestationDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnPubkeyCredentialAttestationS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_1_Negative)
{// deserialize: for too large length
PubkeyCredentialAttestationDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_2_Negative)
{// deserialize: for invalid type
wauthn_pubkey_credential_attestation_s data = TestCommonData::pubkeyCredentialAttestation;
data.type = static_cast<wauthn_pubkey_cred_type_e>(0);
__testDeserializeForInvalidMember<wauthn_pubkey_credential_attestation_s,
PubkeyCredentialAttestationDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_attestation_s_3_Negative)
{// deserialize: for invalid authenticator_attachment
wauthn_pubkey_credential_attestation_s data = TestCommonData::pubkeyCredentialAttestation;
data.authenticator_attachment = static_cast<wauthn_authenticator_attachment_e>(3);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_Positive)
{
PubkeyCredentialAssertionSerializer data1(&TestCommonData::pubkeyCredentialAssertion);
PubkeyCredentialAssertionDeserializer deserializer1;
PubkeyCredentialAssertionDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnPubkeyCredentialAssertionS);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_1_Negative)
{// deserialize: for too large length
PubkeyCredentialAssertionDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_2_Negative)
{// deserialize: for invalid type
wauthn_pubkey_credential_assertion_s data = TestCommonData::pubkeyCredentialAssertion;
data.type = static_cast<wauthn_pubkey_cred_type_e>(0);
__testDeserializeForInvalidMember<wauthn_pubkey_credential_assertion_s,
PubkeyCredentialAssertionDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_N3)
+TEST_F(WAuthnSerializationTest, wauthn_pubkey_credential_assertion_s_3_Negative)
{// deserialize: for invalid authenticator_attachment
wauthn_pubkey_credential_assertion_s data = TestCommonData::pubkeyCredentialAssertion;
data.authenticator_attachment = static_cast<wauthn_authenticator_attachment_e>(3);
return false;
return true;
}
-TEST_F(WAuthnSerializationTest, wauthn_client_data_s_P)
+TEST_F(WAuthnSerializationTest, wauthn_client_data_s_Positive)
{
ClientDataSerializer data1(&TestCommonData::clientData);
ClientDataDeserializer deserializer1;
ClientDataDeserializer deserializer3;
__testSerialization(data3, deserializer3, __compareWAuthnClientDataS);
}
-TEST_F(WAuthnSerializationTest, wauthn_client_data_s_N1)
+TEST_F(WAuthnSerializationTest, wauthn_client_data_s_1_Negative)
{// serialize: invalid member
wauthn_client_data_s data = TestCommonData::clientData;
data.hash_alg = static_cast<wauthn_hash_algorithm_e>(0);
__testDeserializeForInvalidMember<wauthn_client_data_s, ClientDataDeserializer>(data);
}
-TEST_F(WAuthnSerializationTest, wauthn_client_data_s_N2)
+TEST_F(WAuthnSerializationTest, wauthn_client_data_s_2_Negative)
{// deserialize: for too large length
ClientDataDeserializer deserializer;
__testDeserializeForTooLongLength(deserializer);
EXPECT_EQ(__compareWAuthErrorE(serializer2, deserializer2), true);
}
-TEST_F(WAuthnSerializationTest, multiple_serialization_mc_req_P)
+TEST_F(WAuthnSerializationTest, multiple_serialization_mc_req_Positive)
{
ClientDataSerializer clientData(&TestCommonData::clientData);
PubKeyCredCreationOptionsSerializer options(&TestCommonData::pubkeyCredCreationOptions);
);
}
-TEST_F(WAuthnSerializationTest, multiple_serialization_ga_req_P)
+TEST_F(WAuthnSerializationTest, multiple_serialization_ga_req_Positive)
{
ClientDataSerializer clientData(&TestCommonData::clientData);
PubKeyCredRequestOptionsSerializer options(&TestCommonData::pubkeyCredRequestOptions);
__compareWAuthnClientDataS, __compareWAuthnPubkeyCredRequestOptionsS);
}
-TEST_F(WAuthnSerializationTest, multiple_serialization_mc_res_P)
+TEST_F(WAuthnSerializationTest, multiple_serialization_mc_res_Positive)
{
PubkeyCredentialAttestationSerializer pubkeyCred(&TestCommonData::pubkeyCredentialAttestation);
wauthn_error_e result = WAUTHN_ERROR_PERMISSION_DENIED;
__compareWAuthnPubkeyCredentialAttestationS);
}
-TEST_F(WAuthnSerializationTest, multiple_serialization_ga_res_P)
+TEST_F(WAuthnSerializationTest, multiple_serialization_ga_res_Positive)
{
PubkeyCredentialAssertionSerializer pubkeyCred(&TestCommonData::pubkeyCredentialAssertion);
wauthn_error_e result = WAUTHN_ERROR_CANCELED;
};
-TEST_F(SocketManagerTest, mainloop_P)
+TEST_F(SocketManagerTest, mainloop_Positive)
{
int ret = 1;
WA::SocketManager manager;
}
};
-TEST_F(UtilsTest, handle_exceptions_by_try_catch_functions_P)
+TEST_F(UtilsTest, handle_exceptions_by_try_catch_functions_Positive)
{
int ret = try_catch([&]() -> int {
Throw(SerializationException::InvalidStreamData);
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_invalid_blank_str_N)
+TEST_F(UtilsTest, check_parameter_invalid_blank_str_Negative)
{
const char str[] = "";
int ret = try_catch([&]() -> int {
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_invalid_str_skip_P)
+TEST_F(UtilsTest, check_parameter_invalid_str_skip_Positive)
{
const char str[] = "";
int ret = try_catch([&]() -> int {
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_clientdatajson_null_N)
+TEST_F(UtilsTest, check_parameter_clientdatajson_null_Negative)
{
auto clientData = TestCommonData::clientData;
auto backupData = clientData.client_data_json;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_clientdatajson_buffer_null_N)
+TEST_F(UtilsTest, check_parameter_clientdatajson_buffer_null_Negative)
{
auto clientData = TestCommonData::clientData;
auto backupData = clientData.client_data_json->data;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_clientdatajson_buffer_size_zero_N)
+TEST_F(UtilsTest, check_parameter_clientdatajson_buffer_size_zero_Negative)
{
auto clientData = TestCommonData::clientData;
auto backupData = clientData.client_data_json->size;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_clientdata_invalid_hash_N)
+TEST_F(UtilsTest, check_parameter_clientdata_invalid_hash_Negative)
{
auto clientData = TestCommonData::clientData;
auto backupData = clientData.hash_alg;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_rp_id_null_N)
+TEST_F(UtilsTest, check_parameter_options_rp_id_null_Negative)
{
auto rpData = TestCommonData::rpEntity;
auto backupData = rpData.id;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_rp_name_null_N)
+TEST_F(UtilsTest, check_parameter_options_rp_name_null_Negative)
{
auto rpData = TestCommonData::rpEntity;
auto backupData = rpData.name;
}
-TEST_F(UtilsTest, check_parameter_options_user_id_null_N)
+TEST_F(UtilsTest, check_parameter_options_user_id_null_Negative)
{
auto userData = TestCommonData::userEntity;
auto backupData = userData.id;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_user_name_null_N)
+TEST_F(UtilsTest, check_parameter_options_user_name_null_Negative)
{
auto userData = TestCommonData::userEntity;
auto backupData = userData.name;
}
-TEST_F(UtilsTest, check_parameter_options_user_displayname_null_N)
+TEST_F(UtilsTest, check_parameter_options_user_displayname_null_Negative)
{
auto userData = TestCommonData::userEntity;
auto backupData = userData.display_name;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_user_id_data_null_N)
+TEST_F(UtilsTest, check_parameter_options_user_id_data_null_Negative)
{
auto userData = TestCommonData::userEntity;
auto backupData = userData.id->data;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_user_id_size_zero_N)
+TEST_F(UtilsTest, check_parameter_options_user_id_size_zero_Negative)
{
auto userData = TestCommonData::userEntity;
auto backupData = userData.id->size;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_params_null_N)
+TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_params_null_Negative)
{
auto credParams = TestCommonData::pubkeyCredParams2;
auto backupData = credParams.params;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_size_zero_N)
+TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_size_zero_Negative)
{
auto credParams = TestCommonData::pubkeyCredParams2;
auto backupData = credParams.size;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_ignore_invalid_type_P)
+TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_ignore_invalid_type_Positive)
{
auto credParams = TestCommonData::pubkeyCredParams2;
for (size_t i = 0; i < credParams.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_invalid_alg_N)
+TEST_F(UtilsTest, check_parameter_options_pubkey_cred_params_invalid_alg_Negative)
{
auto credParams = TestCommonData::pubkeyCredParams2;
for (size_t i = 0; i < credParams.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_cred_descriptors_descs_null_N)
+TEST_F(UtilsTest, check_parameter_options_cred_descriptors_descs_null_Negative)
{
auto credDescs = TestCommonData::pubkeyCredDescriptors2;
auto backupData = credDescs.descriptors;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_cred_descriptors_desc_size_zero_N)
+TEST_F(UtilsTest, check_parameter_options_cred_descriptors_desc_size_zero_Negative)
{
auto credDescs = TestCommonData::pubkeyCredDescriptors2;
auto backupData = credDescs.size;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_cred_descriptors_ignore_invalid_type_P)
+TEST_F(UtilsTest, check_parameter_options_cred_descriptors_ignore_invalid_type_Positive)
{
auto credDescs = TestCommonData::pubkeyCredDescriptors2;
for (size_t i = 0; i < credDescs.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_cred_descriptors_invalid_id_N)
+TEST_F(UtilsTest, check_parameter_options_cred_descriptors_invalid_id_Negative)
{
auto credDescs = TestCommonData::pubkeyCredDescriptors2;
for (size_t i = 0; i < credDescs.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_cred_descriptors_ignore_invalid_transports_P)
+TEST_F(UtilsTest, check_parameter_options_cred_descriptors_ignore_invalid_transports_Positive)
{
auto credDescs = TestCommonData::pubkeyCredDescriptors2;
for (size_t i = 0; i < credDescs.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_authenticator_selection_ignore_invalid_attachment_P)
+TEST_F(UtilsTest, check_parameter_options_authenticator_selection_ignore_invalid_attachment_Positive)
{
auto authSel = TestCommonData::authenticatorSelCri;
auto backupData = authSel.attachment;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_options_authenticator_selection_ignore_invalid_resident_key_P)
+TEST_F(UtilsTest, check_parameter_options_authenticator_selection_ignore_invalid_resident_key_Positive)
{
auto authSel = TestCommonData::authenticatorSelCri;
auto backupData = authSel.resident_key;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_options_authenticator_selection_ignore_invalid_user_verification_P)
+TEST_F(UtilsTest, check_parameter_options_authenticator_selection_ignore_invalid_user_verification_Positive)
{
auto authSel = TestCommonData::authenticatorSelCri;
auto backupData = authSel.user_verification;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_options_authenticator_selection_invalid_resident_key_pair_N)
+TEST_F(UtilsTest, check_parameter_options_authenticator_selection_invalid_resident_key_pair_Negative)
{
auto authSel = TestCommonData::authenticatorSelCri;
auto backupRequiredResidentKey = authSel.require_resident_key;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_hints_hints_null_N)
+TEST_F(UtilsTest, check_parameter_options_hints_hints_null_Negative)
{
auto hints = TestCommonData::pubkeyCredHints2;
auto backupData = hints.hints;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_hints_size_zero_N)
+TEST_F(UtilsTest, check_parameter_options_hints_size_zero_Negative)
{
auto hints = TestCommonData::pubkeyCredHints2;
auto backupData = hints.size;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_hints_invalid_value_P)
+TEST_F(UtilsTest, check_parameter_options_hints_invalid_value_Positive)
{
auto hints = TestCommonData::pubkeyCredHints2;
for (size_t i = 0; i < hints.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_attestation_formats_formats_null_N)
+TEST_F(UtilsTest, check_parameter_options_attestation_formats_formats_null_Negative)
{
auto formats = TestCommonData::attestationFormats2;
auto backupData = formats.attestation_formats;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_attestation_formats_size_zero_N)
+TEST_F(UtilsTest, check_parameter_options_attestation_formats_size_zero_Negative)
{
auto formats = TestCommonData::attestationFormats2;
auto backupData = formats.size;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_attestation_formats_invalid_value_N)
+TEST_F(UtilsTest, check_parameter_options_attestation_formats_invalid_value_Negative)
{
auto formats = TestCommonData::attestationFormats2;
for (size_t i = 0; i < formats.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_extensions_extensions_null_N)
+TEST_F(UtilsTest, check_parameter_options_extensions_extensions_null_Negative)
{
auto authExts = TestCommonData::authenticationExts2;
auto backupData = authExts.extensions;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_extensions_size_zero_N)
+TEST_F(UtilsTest, check_parameter_options_extensions_size_zero_Negative)
{
auto authExts = TestCommonData::authenticationExts2;
auto backupData = authExts.size;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_extensions_invalid_id_N)
+TEST_F(UtilsTest, check_parameter_options_extensions_invalid_id_Negative)
{
auto authExts = TestCommonData::authenticationExts2;
for (size_t i = 0; i < authExts.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_extensions_invalid_value_N)
+TEST_F(UtilsTest, check_parameter_options_extensions_invalid_value_Negative)
{
auto authExts = TestCommonData::authenticationExts2;
for (size_t i = 0; i < authExts.size; ++i)
}
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_P)
+TEST_F(UtilsTest, check_parameter_options_linked_device_Positive)
{
auto linkedData = TestCommonData::hybridLinkedData;
int ret = try_catch([&]() -> int {
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_contact_id_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_contact_id_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.contact_id;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_link_id_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_link_id_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.link_id;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_link_secret_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_link_secret_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.link_secret;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_authenticator_pubkey_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_authenticator_pubkey_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.authenticator_pubkey;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_authenticator_name_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_authenticator_name_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.authenticator_name;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_signature_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_signature_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.signature;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_tunnel_server_domain_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_tunnel_server_domain_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.tunnel_server_domain;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_options_linked_device_identity_key_null_N)
+TEST_F(UtilsTest, check_parameter_options_linked_device_identity_key_null_Negative)
{
auto linkedData = TestCommonData::hybridLinkedData;
auto backupData = linkedData.identity_key;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_options_rp_null_N)
+TEST_F(UtilsTest, check_parameter_MC_options_rp_null_Negative)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.rp;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_options_user_null_N)
+TEST_F(UtilsTest, check_parameter_MC_options_user_null_Negative)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.user;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_options_pubkey_cred_params_null_N)
+TEST_F(UtilsTest, check_parameter_MC_options_pubkey_cred_params_null_Negative)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.pubkey_cred_params;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_options_exclude_credentials_null_P)
+TEST_F(UtilsTest, check_parameter_MC_options_exclude_credentials_null_Positive)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.exclude_credentials;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_MC_options_authenticator_selection_null_P)
+TEST_F(UtilsTest, check_parameter_MC_options_authenticator_selection_null_Positive)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.authenticator_selection;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_MC_options_hints_null_P)
+TEST_F(UtilsTest, check_parameter_MC_options_hints_null_Positive)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.hints;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_MC_options_ignore_invalid_attestation_P)
+TEST_F(UtilsTest, check_parameter_MC_options_ignore_invalid_attestation_Positive)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.attestation;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_MC_options_attestation_formats_null_P)
+TEST_F(UtilsTest, check_parameter_MC_options_attestation_formats_null_Positive)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.attestation_formats;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_MC_options_extensions_null_P)
+TEST_F(UtilsTest, check_parameter_MC_options_extensions_null_Positive)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.extensions;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_MC_options_linked_device_null_P)
+TEST_F(UtilsTest, check_parameter_MC_options_linked_device_null_Positive)
{
auto options = TestCommonData::pubkeyCredCreationOptions;
auto backupData = options.linked_device;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_GA_options_rp_id_null_N)
+TEST_F(UtilsTest, check_parameter_GA_options_rp_id_null_Negative)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.rpId;
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_GA_options_allow_credentials_null_P)
+TEST_F(UtilsTest, check_parameter_GA_options_allow_credentials_null_Positive)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.allow_credentials;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_GA_options_invalid_user_verification_P)
+TEST_F(UtilsTest, check_parameter_GA_options_invalid_user_verification_Positive)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.user_verification;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_GA_options_hints_null_P)
+TEST_F(UtilsTest, check_parameter_GA_options_hints_null_Positive)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.hints;
}
-TEST_F(UtilsTest, check_parameter_GA_options_ignore_invalid_attestation_P)
+TEST_F(UtilsTest, check_parameter_GA_options_ignore_invalid_attestation_Positive)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.attestation;
}
-TEST_F(UtilsTest, check_parameter_GA_options_attestation_formats_null_P)
+TEST_F(UtilsTest, check_parameter_GA_options_attestation_formats_null_Positive)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.attestation_formats;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_GA_options_extensions_null_P)
+TEST_F(UtilsTest, check_parameter_GA_options_extensions_null_Positive)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.extensions;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_GA_options_linked_device_null_P)
+TEST_F(UtilsTest, check_parameter_GA_options_linked_device_null_Positive)
{
auto options = TestCommonData::pubkeyCredRequestOptions;
auto backupData = options.linked_device;
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_MC_clientdata_null_N)
+TEST_F(UtilsTest, check_parameter_MC_clientdata_null_Negative)
{
wauthn_mc_callbacks_s callbacks = {test_cb_display_qrcode,
test_cb_mc_response,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_options_null_N)
+TEST_F(UtilsTest, check_parameter_MC_options_null_Negative)
{
wauthn_mc_callbacks_s callbacks = {test_cb_display_qrcode,
test_cb_mc_response,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_callbacks_null_N)
+TEST_F(UtilsTest, check_parameter_MC_callbacks_null_Negative)
{
int ret = try_catch([&]() -> int {
CheckParameters(&TestCommonData::clientData, &TestCommonData::pubkeyCredCreationOptions,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_qr_callback_null_without_linkeddata_N)
+TEST_F(UtilsTest, check_parameter_MC_qr_callback_null_without_linkeddata_Negative)
{
wauthn_mc_callbacks_s callbacks = {nullptr,
test_cb_mc_response,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_GA_clientdata_null_N)
+TEST_F(UtilsTest, check_parameter_GA_clientdata_null_Negative)
{
wauthn_ga_callbacks_s callbacks = {test_cb_display_qrcode,
test_cb_ga_response,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_GA_options_null_N)
+TEST_F(UtilsTest, check_parameter_GA_options_null_Negative)
{
wauthn_ga_callbacks_s callbacks = {test_cb_display_qrcode,
test_cb_ga_response,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_GA_callbacks_null_N)
+TEST_F(UtilsTest, check_parameter_GA_callbacks_null_Negative)
{
int ret = try_catch([&]() -> int {
CheckParameters(&TestCommonData::clientData, &TestCommonData::pubkeyCredRequestOptions,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_GA_qr_callback_null_without_linkeddata_N)
+TEST_F(UtilsTest, check_parameter_GA_qr_callback_null_without_linkeddata_Negative)
{
wauthn_ga_callbacks_s callbacks = {nullptr,
test_cb_ga_response,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(UtilsTest, check_parameter_MC_P)
+TEST_F(UtilsTest, check_parameter_MC_Positive)
{
wauthn_mc_callbacks_s callbacks = {test_cb_display_qrcode,
test_cb_mc_response,
EXPECT_EQ(ret, WAUTHN_ERROR_NONE);
}
-TEST_F(UtilsTest, check_parameter_GA_P)
+TEST_F(UtilsTest, check_parameter_GA_Positive)
{
wauthn_ga_callbacks_s callbacks = {test_cb_display_qrcode,
test_cb_ga_response,
}
};
-TEST_F(WebAuthnAPITest, invalid_client_data_N)
+TEST_F(WebAuthnAPITest, invalid_client_data_Negative)
{
int ret = WAUTHN_ERROR_NONE;
wauthn_mc_callbacks_s mc_callbacks = {test_cb_display_qrcode,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(WebAuthnAPITest, invalid_options_N)
+TEST_F(WebAuthnAPITest, invalid_options_Negative)
{
int ret = WAUTHN_ERROR_NONE;
wauthn_mc_callbacks_s mc_callbacks = {test_cb_display_qrcode,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(WebAuthnAPITest, invalid_callbacks_N)
+TEST_F(WebAuthnAPITest, invalid_callbacks_Negative)
{
int ret = WAUTHN_ERROR_NONE;
ret = wauthn_make_credential(&TestCommonData::clientData,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(WebAuthnAPITest, miss_qr_callback_without_linked_data_N)
+TEST_F(WebAuthnAPITest, miss_qr_callback_without_linked_data_Negative)
{
int ret = WAUTHN_ERROR_NONE;
wauthn_mc_callbacks_s mc_callbacks = {nullptr,
EXPECT_EQ(ret, WAUTHN_ERROR_INVALID_PARAMETER);
}
-TEST_F(WebAuthnAPITest, cancel_not_allowed_N)
+TEST_F(WebAuthnAPITest, cancel_not_allowed_Negative)
{
int ret = WAUTHN_ERROR_NONE;
ret = wauthn_cancel();
}
#ifndef EMULATOR_BUILD
-TEST_F(WebAuthnAPITest, MC_valid_request_and_cancel_P)
+TEST_F(WebAuthnAPITest, MC_valid_request_and_cancel_Positive)
{
sleep(3); // wait 3 secs for make interval
int ret = WAUTHN_ERROR_NONE;
sleep(3); // wait 3 secs for make interval
}
-TEST_F(WebAuthnAPITest, GA_valid_request_and_cancel_P)
+TEST_F(WebAuthnAPITest, GA_valid_request_and_cancel_Positive)
{
sleep(3); // wait 3 secs for make interval
int ret = WAUTHN_ERROR_NONE;