Exemple #1
0
        public void some_columns_with_spaces()
        {
            var          word   = new WordWrap.WordWrap();
            const string text   = "hello world";
            var          result = word.Wrap(text, 7);

            Assert.AreEqual("hello\nworld", result);
        }
Exemple #2
0
        public void some_columns_without_spaces()
        {
            var          word   = new WordWrap.WordWrap();
            const string text   = "hello";
            var          result = word.Wrap(text, 2);

            Assert.AreEqual("he\nll\no", result);
        }
Exemple #3
0
        public void columns_are_bigger_than_text()
        {
            var          word   = new WordWrap.WordWrap();
            const string text   = "test";
            var          result = word.Wrap(text, 7);

            Assert.AreEqual("test", result);
        }
Exemple #4
0
        public void columns_are_shorter_than_text()
        {
            var          word   = new WordWrap.WordWrap();
            const string text   = "hello";
            var          result = word.Wrap(text, 3);

            Assert.AreEqual("hel\nlo", result);
        }
Exemple #5
0
        public void text_is_empty()
        {
            var          wordWrap = new WordWrap.WordWrap();
            const string text     = "test";
            var          result   = wordWrap.Wrap("", 7);

            Assert.AreEqual("", result);
        }