Esempio n. 1
0
        public void TruncateWithPaddingRight_StringWithLengthOf20TruncatedTo10_TruncationWithPadding()
        {
            const int    length = 10;
            const string text   = "01234567890123456789";

            var result = StringTruncator.TruncateWithPaddingRight(text, length);

            result.Should().Be("01234567..");
        }
Esempio n. 2
0
        public void TruncateWithPaddingRight_StringWithLengthOf20TruncatedTo45_NoTruncation()
        {
            const int    length = 45;
            const string text   = "01234567890123456789";

            var result = StringTruncator.TruncateWithPaddingRight(text, length);

            result.Should().Be(text);
        }