public void StripInvalidCharsTest() { using (Db db = GetSampleDb()) { var StringService = new StringService(); db.Configuration.Settings["InvalidItemNameChars"] = @"\/:?|[]"; string s1 = "abc:d[e]f?g/h\\i|j"; string r1 = StringService.StripInvalidChars(s1); Assert.AreEqual("abcdefghij", r1); } }