本文整理汇总了C++中TA::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ TA::remove方法的具体用法?C++ TA::remove怎么用?C++ TA::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TA
的用法示例。
在下文中一共展示了TA::remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
TEST_F(ContributionLadder_Ingen_CONTEXT_KI_OSV_25_50, Bidragsstigningsform_Ingen_PrivateTaxedMK_Gage_NEGATIVE)
{
RuleEngine::_printDebugAtValidation = true;
TA ta { "15124040"}; // KonceptOid 4 - OSV
ta.setValue(kAftaleIkraftdato, 20150701);
// ta.setValue(kUnionAgreementRelationship, kOUTSIDE);
ta.setValue(kBidragEjFoesteTrin_MK, false);
ta.setValue(kBidragsstigningsform, "Ingen");
ta.setValue(kHospitalsdaekning_MK, false);
ta.setValue(kHospitalsdaekningFrivillig_MK, false);
ta.setValue(kTAEReguleringskode, "Gage");
ta.setValue(kDoedReguleringskode, "Gage");
ta.setValue(kPrivate_Taxed_MK, true);
ta.setValue(kPrivate_Taxed_Reguleringskode, "Gage");
ta.setValue(kPrivate_Taxed_SA_Administrated_MK, true);
ta.setValue(kPrivate_Premium_pct, 3);
ta.setValue(kPrivate_Premium_BL, 40000);
auto r = re.validate(ta, false);
EXPECT_FALSE(r.isAllOk());
EXPECT_TRUE(r.hasMessages(kPrivate_Premium_pct, kValueUnderLimit));
EXPECT_TRUE(r.hasMessages(kPrivate_Premium_BL, kProductElementNotAllowed));
cout << r;
ta.setValue(kPrivate_Premium_pct, 5);
ta.remove(kPrivate_Premium_BL);
r = re.validate(ta, true);
EXPECT_FALSE(r.hasMessages(kPrivate_Premium_pct, kValueUnderLimit));
EXPECT_FALSE(r.hasMessages(kPrivate_Premium_BL, kProductElementNotAllowed));
cout << r;
}
示例2:
TEST_F(Invaliditetsdaekning_KI_OSV_25_49, Invaliditetsdaekning_SoliMax_TAEDaekningstype) {
RuleEngine::_printDebugAtValidation = true;
TA ta { "15124040" };
ta.setValue(kTAESoliMax, "Tegningsmaks");
auto r = re.validate(ta, false);
// if (!r.isAllOk())
cout << r;
EXPECT_TRUE(r.isAllOk()); //
ta.setValue(kTAESoliMax, "Obligatorisk maks");
r = re.validate(ta, false);
cout << r;
EXPECT_FALSE(r.isAllOk());
EXPECT_EQ(1, r.getValidationResults().size());
EXPECT_TRUE(r.hasMessages(kTAEDaekningstype, kProductElementRequired));
ta.setValue(kTAEDaekningstype, re.getDefaultValue(kTAEDaekningstype)->stringValue());
r = re.validate(ta, false);
cout << r;
EXPECT_TRUE(r.isAllOk());
ta.setValue(kTAESoliMax, "Tegningsmaks");
r = re.validate(ta, false);
cout << r;
EXPECT_EQ(1, r.getValidationResults().size());
EXPECT_TRUE(r.hasMessages(kTAEDaekningstype, kProductElementNotAllowed));
r = re.validate(ta, false);
cout << r;
ta.remove(kTAEDaekningstype);
ta.setValue(kTAESoliMax, "Ingen");
r = re.validate(ta, false);
cout << r;
EXPECT_EQ(1, r.getValidationResults().size());
EXPECT_TRUE(r.hasMessages(kTAEDaekningstype, kProductElementRequired));
}
示例3:
//.........这里部分代码省略.........
//
//
// ****** Udlobsalder
//
ta.setValue(kUdlobsalder_Pension, (long) 67);
r = re.validate(ta, full);
EXPECT_TRUE(r.isAllOk());
if (!r.isAllOk())
cout << r;
//
// ******* Fravalg af risikodaekning
//
ta.setValue(kFravalgRisiko_MK, true);
r = re.validate(ta, full);
cout << r;
EXPECT_FALSE(r.isAllOk());
EXPECT_EQ(1, r.getValidationResults(kFravalgRisikoAlder).size());
EXPECT_EQ(1, r.getValidationResults(kFravalgRisiko_MK).size());
EXPECT_EQ(sbx::ValidationCode::kProductElementRequired, r.getValidationResults(kFravalgRisikoAlder).at(0).getValidationCode());
EXPECT_EQ(sbx::ValidationCode::kValueNotAllowed, r.getValidationResults(kFravalgRisiko_MK).at(0).getValidationCode());
ta.setValue(kFravalgRisikoAlder, (long) 45);
// now age is set, so all should be ok
r = re.validate(ta, full);
EXPECT_FALSE(r.isAllOk());
cout << r;
EXPECT_EQ(1, r.getValidationResults(kFravalgRisiko_MK).size());
EXPECT_EQ(sbx::ValidationCode::kValueNotAllowed, r.getValidationResults(kFravalgRisiko_MK).at(0).getValidationCode());
ta.setValue(kFravalgRisiko_MK, false);
ta.remove(kFravalgRisikoAlder);
r = re.validate(ta, full);
cout << r;
EXPECT_TRUE(r.isAllOk());
//
// ****** Opsparingsprodukter
//
ta.setValue(kStandardProduct, "Traditionel_MK");
ta.setValue(kTraditionel_MK, false);
// expecting to fail as the standardprodukt hasn't been set on the ta
r = re.validate(ta, full);
EXPECT_FALSE(r.isAllOk());
if (r.isAllOk()) cout << r;
ta.setValue(kTraditionel_MK, true);
ta.setValue(kLink_MK, true);
ta.setValue(kMarkedspension_MK, true);
ta.setValue(kTidspensionMedGaranti_MK, true);
ta.setValue(kTidspensionUdenGaranti_MK, true);
// now savings products has been set, so everything should be fine
r = re.validate(ta, full);
EXPECT_TRUE(r.isAllOk());
if (!r.isAllOk()) cout << r;
ta.setValue(kUdbetalingsform, re.getDefaultValue(kUdbetalingsform)->stringValue());
r = re.validate(ta, full);
EXPECT_TRUE(r.isAllOk());
if (!r.isAllOk()) cout << r;
ta.setValue(kUdbetalingsperiode, re.getDefaultValue(kUdbetalingsperiode)->longValue());
r = re.validate(ta, full);