public void WhenNewLinesAreContained_ReplacesNewLinesWithSpaces()
        {
            const string testString = "This is a test\nwith multiple new\nline\ncharacters.";
            const string expected   = "This is a test with multiple new line characters.";

            var actual = _converter.Convert(testString, null, null, null);

            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
        public void SetAppStatus(string text)
        {
            text ??= "";
            text = SingleLineConverter.Convert(text);

            Dispatcher.BeginInvoke(new Action(() =>
            {
                tssAppStatus.Text = text;
            }));
        }
Exemple #3
0
        public void SetStatus(string text, bool error)
        {
            text ??= "";
            text = SingleLineConverter.Convert(text);

            Dispatcher.BeginInvoke(new Action(() =>
            {
                tssStatus.Text       = text;
                tssStatus.Foreground = error ?
                                       new SolidColorBrush(UIColors.ErrorColor) :
                                       SystemColors.WindowTextBrush;
            }));
        }