public void SwapTo_RegularPropertiesApplied() { var original = A.Fake <ITextBoxWrapper>(); _editableBehaviourTextboxStrategy.SwapTo(original, true); A.CallTo(() => _propertyApplier.Apply(original, _regularProperties)).MustHaveHappened(); }
public void Build_NoStyle_CorrectCallsMade() { var tableLayout = A.Fake <ITableLayoutWrapper>(); A.CallTo(() => _tableLayoutWrapperFactory.Create()).Returns(tableLayout); _centralLayoutBuilder.Build(); A.CallTo(() => _propertyApplier.Apply(A <IControlProperties> .Ignored, A <IControlPropertiesStyle> .Ignored)).MustNotHaveHappened(); A.CallTo(() => _layoutDecoratorApplier.Apply(tableLayout, _tableLayoutDecorators)).MustHaveHappened(); }
public ITextBoxWrapper SwapTo(ITextBoxWrapper control, bool regularMode) { ITextBoxWrapper output; if (regularMode) { // control.Enter += OnEnter; control.TextChanged -= OnTextChanged; output = _propertyApplier.Apply(control, _regularProperties) as ITextBoxWrapper; //OnTextChanged(output, null); } else { // control.Enter -= OnEnter; control.TextChanged += OnTextChanged; output = _propertyApplier.Apply(control, _inEditProperties) as ITextBoxWrapper; } return(output); }
public ITableLayoutWrapper Build(IControlPropertiesStyle tablePropertiesStyle = null) { var middleLayoutPanel = _tableLayoutDecoratorApplier.Apply(_tableLayoutWrapperFactory.Create(), _tableLayoutDecorators); if (tablePropertiesStyle != null) { _propertyApplier.Apply(middleLayoutPanel, tablePropertiesStyle); } return(middleLayoutPanel); }