void Test(IMaskingRule rule, string value, string match) { var result = (string)rule.Execute(value); if (match != result) { throw new Exception($"Input: {value}, Result: {result}, Match: {match}"); } }
public void Name() { IMaskingRule rule = MaskingRuleFactory.Create(MaskingType.Name); Test(rule, "최진용", "최*용"); Test(rule, "진용", "진*"); Test(rule, "이름네자", "이**자"); Test(rule, "네글자이상", "네***상"); Test(rule, "ChoiJinYong", "Choi*******"); }