- Fixing some broken unit tests (due to Localizer/Authorize changes).

- Refactoring Media module (Authorize,Localize).
- Minor cleanup...

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4040469
This commit is contained in:
suhacan
2009-11-14 21:34:37 +00:00
parent 7cb77e9870
commit 5f659dbedb
10 changed files with 56 additions and 92 deletions

View File

@@ -13,9 +13,12 @@ namespace Orchard.Tests.UI.Notify {
notifier.Error("Boom");
Assert.That(notifier.List(), Has.Count.EqualTo(3));
Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo("Hello world"));
Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo("More Info"));
Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo("Boom"));
foreach (var notifyEntries in notifier.List()) {
Assert.That(new[] {notifyEntries.Message.ToString()}, Is.SubsetOf(new[]
{
"Hello world", "More Info", "Boom"
}));
}
}
}
}

View File

@@ -75,8 +75,12 @@ namespace Orchard.Tests.UI.Notify {
Assert.That(model.Messages, Is.Not.Null);
Assert.That(model.Messages, Has.Count.EqualTo(2));
Assert.That(model.Messages, Has.Some.Property("Message").EqualTo("dont-destroy"));
Assert.That(model.Messages, Has.Some.Property("Message").EqualTo("Working"));
foreach (var notifyEntries in model.Messages) {
Assert.That(new[] { notifyEntries.Message.ToString() }, Is.SubsetOf(new[]
{
"dont-destroy", "Working"
}));
}
}
}
}