A class that represents a set of String based functions.
Example #1
0
        public void IsText_MostlyTextValue_ReturnsTrue()
        {
            var text      = string.Concat(Enumerable.Repeat("HelloWorld", 100));
            var buffer    = Encoding.UTF8.GetBytes(text);
            var newBuffer = new byte[buffer.Length + 5];

            Buffer.BlockCopy(buffer, 0, newBuffer, 5, buffer.Length);

            newBuffer[0] = 198;
            newBuffer[1] = 199;
            newBuffer[2] = 200;
            newBuffer[3] = 201;
            newBuffer[4] = 202;

            Assert.IsTrue(TextAnalyzer.IsText(newBuffer));
        }
Example #2
0
 public void IsText_NullValue_ReturnsFalse()
 {
     Assert.IsFalse(TextAnalyzer.IsText(null));
 }