Exemplo n.º 1
0
        public void SanitizePrefixedAndSuffixedAlternateSeparatorTest()
        {
            const string s = @"/asdf/";

            Assert.AreEqual("asdf", ContentAssetName.Sanitize(s));
        }
Exemplo n.º 2
0
        public void SanitizeAlternateSeparatorTest()
        {
            const string s = @"asdf/basdf/wer/asdf";

            Assert.AreEqual(s.Replace("/", ContentAssetName.PathSeparator), ContentAssetName.Sanitize(s));
        }
Exemplo n.º 3
0
        public void SanitizeSeparatorTest()
        {
            const string s = @"asdf\basdf\wer\asdf";

            Assert.AreEqual(s.Replace("\\", ContentAssetName.PathSeparator), ContentAssetName.Sanitize(s));
        }
Exemplo n.º 4
0
        public void SanitizeSuffixedSeparatorTest()
        {
            const string s = @"asdf\";

            Assert.AreEqual("asdf", ContentAssetName.Sanitize(s));
        }
 /// <summary>
 /// Gets the sanitized text for this <see cref="AutoValidateTextBox"/>. This should always be used when
 /// you want to make use of the contents of the <see cref="AutoValidateTextBox"/>. The sanitized
 /// text is only guaranteed to be valid if IsValid is true.
 /// </summary>
 /// <param name="text">The text to sanitize.</param>
 /// <returns>
 /// The sanitized text for this <see cref="AutoValidateTextBox"/>.
 /// </returns>
 public override string GetSanitizedText(string text)
 {
     return(ContentAssetName.Sanitize(text));
 }