public void NullStackItemsAreEqualToNull() { var item1 = new HistoryStackItem("titi", 0, 4); HistoryStackItem item2 = null; (item1 == null).ShouldBeFalse(); (item2 == null).ShouldBeTrue(); (item1 == item2).ShouldBeFalse(); (item2 == item1).ShouldBeFalse(); }
public void EquivalentStackItemsAreEqual() { var item1 = new HistoryStackItem("titi", 0, 4); var item2 = item1; (item1 == item2).ShouldBeTrue(); item2 = new HistoryStackItem("titi", 0, 4); (item1 == item2).ShouldBeTrue(); }
private void ApplyUndoOrRedo(HistoryStackItem stackItem) { lockTextChangedEvent = true; UnmaskedConnectionString = stackItem.Value; Text = PasswordHelper.Mask(UnmaskedConnectionString); SelectionStart = stackItem.SelectionStart; SelectionLength = stackItem.SelectionLength; lockTextChangedEvent = false; }
public void NonEquivalentStackItemsArentEqual() { var item1 = new HistoryStackItem("titi", 0, 4); var item2 = new HistoryStackItem("moto", 0, 4); (item1 == item2).ShouldBeFalse(); item2 = new HistoryStackItem("titi", 1, 4); (item1 == item2).ShouldBeFalse(); item2 = new HistoryStackItem("titi", 0, 3); (item1 == item2).ShouldBeFalse(); }