mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Moving xmlrpc method to upload files into media module. Updating some localized string tests.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4040921
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using NUnit.Framework;
|
||||
using Orchard.Localization;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
namespace Orchard.Tests.UI.Notify {
|
||||
@@ -12,13 +13,12 @@ namespace Orchard.Tests.UI.Notify {
|
||||
notifier.Information("More Info");
|
||||
notifier.Error("Boom");
|
||||
|
||||
Localizer T = NullLocalizer.Instance;
|
||||
|
||||
Assert.That(notifier.List(), Has.Count.EqualTo(3));
|
||||
foreach (var notifyEntries in notifier.List()) {
|
||||
Assert.That(new[] {notifyEntries.Message.ToString()}, Is.SubsetOf(new[]
|
||||
{
|
||||
"Hello world", "More Info", "Boom"
|
||||
}));
|
||||
}
|
||||
Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Hello world")));
|
||||
Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("More Info")));
|
||||
Assert.That(notifier.List(), Has.Some.Property("Message").EqualTo(T("Boom")));
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@
|
||||
using System.Web.Routing;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.UI.Notify;
|
||||
@@ -73,14 +74,12 @@ namespace Orchard.Tests.UI.Notify {
|
||||
filter.OnActionExecuted(context);
|
||||
filter.OnResultExecuting(new ResultExecutingContext(context, context.Result));
|
||||
|
||||
var T = NullLocalizer.Instance;
|
||||
|
||||
Assert.That(model.Messages, Is.Not.Null);
|
||||
Assert.That(model.Messages, Has.Count.EqualTo(2));
|
||||
foreach (var notifyEntries in model.Messages) {
|
||||
Assert.That(new[] { notifyEntries.Message.ToString() }, Is.SubsetOf(new[]
|
||||
{
|
||||
"dont-destroy", "Working"
|
||||
}));
|
||||
}
|
||||
Assert.That(model.Messages, Has.Some.Property("Message").EqualTo(T("dont-destroy")));
|
||||
Assert.That(model.Messages, Has.Some.Property("Message").EqualTo(T("Working")));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user