public void WhenUndoActionThenElementTypeIsRevertedDataModel() { ElementChangeTypeAction action = new ElementChangeTypeAction(_model.Object, _element.Object, NewType); action.Undo(); _model.Verify(x => x.ChangeElementType(_element.Object, OldType), Times.Once()); }
public void GivenLoadedActionWhenGettingDataThenActionAttributesMatch() { object[] args = { _model.Object, _data }; ElementChangeTypeAction action = new ElementChangeTypeAction(args); Assert.AreEqual(3, action.Data.Count); Assert.AreEqual(ElementId.ToString(), _data["element"]); Assert.AreEqual(OldType, _data["old"]); Assert.AreEqual(NewType, _data["new"]); }
public void ChangeElementType(IDsmElement element, string type) { ElementChangeTypeAction action = new ElementChangeTypeAction(_dsmModel, element, type); _actionManager.Execute(action); }