Example #1
0
        public void XmlElementKeyValueDataHandler_GetSecuredData_EmptySecuredProps_NonChangedResult()
        {
            //ARRANGE
            AbstractKeyValueDataHandler handler = new XmlElementKeyValueDataHandler();

            handler.Properties = new Dictionary <string, 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);
        }
Example #2
0
        public void XmlElementKeyValueDataHandler_GetSecuredData_SomePropsNotInRequest_ListedParametresSecured()
        {
            //ARRANGE
            AbstractKeyValueDataHandler handler = new XmlElementKeyValueDataHandler();

            handler.Properties = new Dictionary <string, string>
            {
                { "user", "max" },
                { "password", "123456" }
            };

            //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);
        }