public void FormatText_NoEncoding_WithHotkeyAtStart() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("foo bar", 0); Assert.That(formatter.FormatText(textWithHotkey, false), Is.EqualTo("<x 'f'>f</x>oo bar")); }
public void FormatText_WithHtmlEncoding_NoHotkey() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("f<b>o</b>o b&ar", null); Assert.That(formatter.FormatText(textWithHotkey, true), Is.EqualTo("f<b>o</b>o b&ar")); }
public void FormatText_NoEncoding_WithHotkey() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("foo b&ar", 4); Assert.That(formatter.FormatText(textWithHotkey, false), Is.EqualTo("foo <x 'b'>b</x>&ar")); }
public void FormatText_NoEncoding_NoHotkey() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("f<b>o</b>o b&ar", null); Assert.That(formatter.FormatText(textWithHotkey, false), Is.EqualTo("f<b>o</b>o b&ar")); }
public void FormatHotkey_LowerCaseHotkey_MakesUpperCase() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("text", 'a'); Assert.That(formatter.FormatHotkey(textWithHotkey), Is.EqualTo("A")); }
public void FormatHotkey_NoHotkey() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("text", null); Assert.That(formatter.FormatHotkey(textWithHotkey), Is.Null); }
public void FormatText_WithHtmlEncoding_WithEncodedHotkey() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("foo öar", 4); Assert.That(formatter.FormatText(textWithHotkey, true), Is.EqualTo("foo <x 'ö'>ö</x>ar")); }
public void FormatText_NoEncoding_WithHotkeyAtEnd() { var formatter = new TestableHotkeyFormatterBase(); var textWithHotkey = new TextWithHotkey("foo bar", 6); Assert.That(formatter.FormatText(textWithHotkey, false), Is.EqualTo("foo ba<x 'r'>r</x>")); }