writeLine() public method

public writeLine ( string _sMsg ) : void
_sMsg string
return void
Exemplo n.º 1
0
        public void StringUI_WriteLine_BufferAreSame()
        {
            StringUI _stringUI = new StringUI();
            object[] Array = new[] { "1", "2" };

            _stringUI.writeLine("Hello {0}", Array);
            _stringUI.writeLine("Hello {1}", Array);

            Assert.AreEqual("* Hello 1\r\n* Hello 2\r\n", _stringUI.Buffer);
        }
Exemplo n.º 2
0
        public void StringUI_WriteLine_ThenClear_BufferIsEmpty()
        {
            StringUI _stringUI = new StringUI();

            object[] Array = new[] { "1", "2" };

            _stringUI.writeLine("Hello {0}", Array);
            _stringUI.writeLine("Hello {1}", Array);

            _stringUI.clearString();

            Assert.IsEmpty(_stringUI.Buffer);
        }
Exemplo n.º 3
0
        public void StringUI_ProportyChanged()
        {
            StringUI _stringUI = new StringUI();

            PropertyChangedEventHandler _propertyChanged = (sender, e) => Assert.AreEqual("Buffer", e.PropertyName);

            _stringUI.PropertyChanged += _propertyChanged;

            object[] Array = new[] { "1", "2" };

            _stringUI.writeLine("Hello {0}", Array);

            Assert.AreEqual("* Hello 1\r\n", _stringUI.Buffer);
        }