Esempio n. 1
0
        public void Scrubber_Scrub_IsBase64String_Where_DataIsArray_With_Name_ExpectSameJson()
        {
            //------------Setup for test--------------------------
            const string JsonData = "{Colours:[{color: \"red\",value: \"#f00\"},{color: \"green\",value: \"#0f0\"},{color: \"blue\",value: \"#00f\"},{color: \"cyan\",value: \"#0ff\"},{color: \"magenta\",value: \"#f0f\"},{color: \"yellow\",value: \"#ff0\"}," +
                                    "{color: \"black\",value: \"#000\"}]}";

            var jsonBytes    = JsonData.Base64StringToByteArray();
            var base64String = jsonBytes.ToBase64String();
            //------------Execute Test---------------------------
            var scrub = Scrubber.Scrub(base64String);

            //------------Assert Results-------------------------
            Assert.AreEqual(JsonData, scrub);
        }