mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Fixing ignored UT.
--HG-- branch : 1.x
This commit is contained in:
@@ -23,7 +23,6 @@ namespace Orchard.Tests.ContentManagement.MetaData.Services {
|
||||
Assert.That(type.Name, Is.EqualTo("foo"));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void AttributesAreAppliedAsSettings() {
|
||||
var builder = new ContentTypeDefinitionBuilder();
|
||||
@@ -41,9 +40,18 @@ namespace Orchard.Tests.ContentManagement.MetaData.Services {
|
||||
Assert.That(type.Parts.Single().Settings["y"], Is.EqualTo("2"));
|
||||
}
|
||||
|
||||
[Test, Ignore("Parts can be removed by name")]
|
||||
[Test]
|
||||
public void PartsCanBeRemovedByNameWhenImporting() {
|
||||
Assert.Fail();
|
||||
const string partToBeRemoved = "alpha";
|
||||
|
||||
var builder = new ContentTypeDefinitionBuilder();
|
||||
_reader.Merge(new XElement("foo",
|
||||
new XElement(partToBeRemoved),
|
||||
new XElement("remove", new XAttribute("name", partToBeRemoved))
|
||||
), builder);
|
||||
var type = builder.Build();
|
||||
|
||||
Assert.That(type.Parts.FirstOrDefault(part => part.PartDefinition.Name == partToBeRemoved), Is.Null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -53,11 +53,11 @@ namespace Orchard.Tests.Environment {
|
||||
public IEnumerable<RouteDescriptor> GetRoutes() {
|
||||
return _routes;
|
||||
}
|
||||
|
||||
public void GetRoutes(ICollection<RouteDescriptor> routes) {
|
||||
foreach (var routeDescriptor in GetRoutes())
|
||||
routes.Add(routeDescriptor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class StubRoutePublisher : IRoutePublisher {
|
||||
|
Reference in New Issue
Block a user