-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug where adding a new LinkedCommand required a restart
- Loading branch information
1 parent
c307c32
commit 808a60a
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using LicenseHeaderManager.Options; | ||
using NUnit.Framework; | ||
|
||
namespace LicenseHeaderManager.Test | ||
{ | ||
[TestFixture] | ||
public class OptionsPageTest | ||
{ | ||
[Test] | ||
public void TestLinkedCommandsChangedCalledWhenNewLinkedCommandSavedWithExistingLinkedCommands () | ||
{ | ||
var optionsPage = new OptionsPage(); | ||
var wasCalled = false; | ||
optionsPage.LinkedCommandsChanged += (sender, args) => wasCalled = true; | ||
const string emptySerializedLinkedCommands = "1*System.String*<LinkedCommands/>"; | ||
optionsPage.LinkedCommandsSerialized = emptySerializedLinkedCommands; | ||
|
||
optionsPage.LinkedCommands.Add (new LinkedCommand()); | ||
|
||
Assert.That (wasCalled, Is.True); | ||
} | ||
|
||
[Test] | ||
public void TestLinkedCommandsChangedCalledWhenNewLinkedCommandSavedWithDefaultLinkedCommands () | ||
{ | ||
var optionsPage = new OptionsPage(); | ||
var wasCalled = false; | ||
optionsPage.LinkedCommandsChanged += (sender, args) => wasCalled = true; | ||
|
||
optionsPage.LinkedCommands.Add (new LinkedCommand()); | ||
|
||
Assert.That (wasCalled, Is.True); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters