public void OnChanged_TriggersChanged() { // Arrange var editorSettingsManager = new Mock <EditorSettingsManager>(MockBehavior.Strict); editorSettingsManager.SetupGet(m => m.Current).Returns((EditorSettings)null); var manager = new DefaultWorkspaceEditorSettings(Dispatcher, editorSettingsManager.Object); var called = false; manager.Changed += (caller, args) => called = true; // Act manager.OnChanged(null, null); // Assert Assert.True(called); }
public void OnChanged_TriggersChanged() { // Arrange var manager = new DefaultWorkspaceEditorSettings(Dispatcher, Mock.Of <EditorSettingsManager>()); var called = false; manager.Changed += (caller, args) => { called = true; }; // Act manager.OnChanged(null, null); // Assert Assert.True(called); }