public void InitialSettingsAreDefault() { // Act var manager = new DefaultEditorSettingsManagerInternal(Dispatcher); // Assert Assert.Equal(EditorSettings.Default, manager.Current); }
public void Update_DoesNotTriggerChangedIfEditorSettingsAreSame() { // Arrange var manager = new DefaultEditorSettingsManagerInternal(Dispatcher); var called = false; manager.Changed += (caller, args) => { called = true; }; var originalSettings = manager.Current; // Act manager.Update(EditorSettings.Default); // Assert Assert.False(called); Assert.Same(originalSettings, manager.Current); }
public void Update_TriggersChangedIfEditorSettingsAreDifferent() { // Arrange var manager = new DefaultEditorSettingsManagerInternal(Dispatcher); var called = false; manager.Changed += (caller, args) => { called = true; }; var settings = new EditorSettings(indentWithTabs: true, indentSize: 7); // Act manager.Update(settings); // Assert Assert.True(called); Assert.Equal(settings, manager.Current); }