public override string GetSecuredData(string data) { var xmlAttrHandler = new XmlAttributeDataHandler { Properties = Properties }; var xmlElemValueHandler = new XmlElementValueDataHandler { Properties = Properties }; return(xmlAttrHandler.GetSecuredData(xmlElemValueHandler.GetSecuredData(data))); }
public void XmlElementValueDataHandler_GetSecuredData_EmptySecuredProps_NonChangedResult() { //ARRANGE AbstractDataHandler handler = new XmlElementValueDataHandler(); handler.Properties = new string[] { }; //ACT var result = handler.GetSecuredData("<auth><user>max</user><pass>123456</pass></auth>"); //ASSERT Assert.AreEqual("<auth><user>max</user><pass>123456</pass></auth>", result); }
public void XmlElementValueDataHandler_GetSecuredData_SomePropsNotInRequest_ListedParametresSecured() { //ARRANGE AbstractDataHandler handler = new XmlElementValueDataHandler(); handler.Properties = new string[] { "user", "first_name" }; //ACT var result = handler.GetSecuredData("<auth><user>max</user><pass>123456</pass></auth>"); //ASSERT Assert.AreEqual("<auth><user>XXX</user><pass>123456</pass></auth>", result); }