public void ApplyChanges_DoesNotFireParamModifiedEvent_IfZeroChange() { var helper = new TestSupport.Listeners.HelperForIParamMgr(); _mgr.ParamModified += helper.ParamModified_DummyHandler; IDictionary<string, object> changes = new Dictionary<string, object>(); using (RecordExpectations recorder = RecorderManager.StartRecording()) { helper.ParamModified_DummyHandler(null, null); recorder.FailWhenCalled(); } _mgr.ApplyChanges(changes); MockManager.Verify(); }
public void ApplyChanges_FiresParamModifiedEvent_IfOneOrMoreChange(string paramName, object paramVal) { var helper = new TestSupport.Listeners.HelperForIParamMgr(); _mgr.ParamModified += helper.ParamModified_DummyHandler; IDictionary<string, object> changes = new Dictionary<string, object>(); changes.Add(paramName, paramVal); using (RecordExpectations recorder = RecorderManager.StartRecording()) { helper.ParamModified_DummyHandler(null, null); } _mgr.ApplyChanges(changes); MockManager.Verify(); }
public void SetValue_FiresParamModifiedEvent_WhenParamValueChanges(string paramName, object paramVal) { var helper = new TestSupport.Listeners.HelperForIParamMgr(); _mgr.ParamModified += helper.ParamModified_DummyHandler; using (RecordExpectations recorder = RecorderManager.StartRecording()) { helper.ParamModified_DummyHandler(null, null); } _mgr.SetValue(paramName, paramVal); MockManager.Verify(); }