Пример #1
0
        public void SanitizeForHtml_StringHasSpacesAndDiacritics_Sanitized()
        {
            var result = FieldNameSanitizer.SanitizeForHtml("Čč Ćć Žž Šš Đđ à É");

            Assert.Equal("Cc-Cc-Zz-Ss-Dd-a-E", result);
        }
Пример #2
0
        public void SanitizeForHtml_StringHasNoSpacesOrDiacritics_NoChanges()
        {
            var result = FieldNameSanitizer.SanitizeForHtml("niceName");

            Assert.Equal("niceName", result);
        }
Пример #3
0
        public void SanitizeForHtml_StringHasSpaces_Sanitized()
        {
            var result = FieldNameSanitizer.SanitizeForHtml(" n i c e N a m e ");

            Assert.Equal("-n-i-c-e-N-a-m-e-", result);
        }