Skip to content

Commit

Permalink
Fixed a failing unit test
Browse files Browse the repository at this point in the history
@ejsmith it appears that the orderby is ordering the values of the same
value..
  • Loading branch information
niemyjski committed Apr 2, 2015
1 parent 6998b65 commit aee181c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Source/Tests/Plugins/PluginTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public void CanCancel() {
foreach (var plugin in client.Configuration.Plugins)
client.Configuration.RemovePlugin(plugin.Key);

client.Configuration.AddPlugin(ctx => ctx.Cancel = true);
client.Configuration.AddPlugin(ctx => ctx.Event.Tags.Add("Was Not Canceled"));
client.Configuration.AddPlugin("cancel", 1, ctx => ctx.Cancel = true);
client.Configuration.AddPlugin("add-tag", 2, ctx => ctx.Event.Tags.Add("Was Not Canceled"));

var context = new EventPluginContext(client, new Event());
EventPluginManager.Run(context);
Expand All @@ -88,15 +88,15 @@ public void VerifyPriority() {
config.AddPlugin<EnvironmentInfoPlugin>();
config.AddPlugin<PluginWithPriority11>();
config.AddPlugin<PluginWithNoPriority>();
config.AddPlugin("version3", 1, ctx => ctx.Event.SetVersion("1.0.0.0"));
config.AddPlugin("version", 1, ctx => ctx.Event.SetVersion("1.0.0.0"));
config.AddPlugin("version2", 1, ctx => ctx.Event.SetVersion("1.0.0.0"));
config.AddPlugin("version2", 2, ctx => ctx.Event.SetVersion("1.0.0.0"));
config.AddPlugin("version3", 3, ctx => ctx.Event.SetVersion("1.0.0.0"));

var plugins = config.Plugins.ToArray();
Assert.Equal(typeof(PluginWithNoPriority), plugins[0].Plugin.GetType());
Assert.Equal("version3", plugins[1].Key);
Assert.Equal("version", plugins[2].Key);
Assert.Equal("version2", plugins[3].Key);
Assert.Equal("version", plugins[1].Key);
Assert.Equal("version2", plugins[2].Key);
Assert.Equal("version3", plugins[3].Key);
Assert.Equal(typeof(PluginWithPriority11), plugins[4].Plugin.GetType());
Assert.Equal(typeof(EnvironmentInfoPlugin), plugins[5].Plugin.GetType());
}
Expand Down

2 comments on commit aee181c

@ejsmith
Copy link
Member

@ejsmith ejsmith commented on aee181c Apr 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What it is it using as the secondary sort?

@niemyjski
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing

Please sign in to comment.