Fixing some ignored UT. Adding comments. Welding content item parts conditionally.

--HG--
branch : 1.x
This commit is contained in:
andrerod
2010-12-28 19:44:14 +00:00
parent 7055183bf4
commit a1ea9c307c
14 changed files with 75 additions and 35 deletions

View File

@@ -309,10 +309,12 @@ Features:
}
}
[Test, Ignore("This assertion appears to be inconsistent with the comment in extension manager - an empty feature is returned")]
public void ExtensionManagerShouldThrowIfFeatureDoesNotExist() {
var featureDescriptor = new FeatureDescriptor { Id = "NoSuchFeature", Extension = new ExtensionDescriptor { Name = "NoSuchFeature" } };
Assert.Throws<ArgumentException>(() => _manager.LoadFeatures(new[] { featureDescriptor }));
[Test]
public void ExtensionManagerShouldReturnEmptyFeatureIfFeatureDoesNotExist() {
var featureDescriptor = new FeatureDescriptor { Id = "NoSuchFeature", Extension = new ExtensionDescriptor { Id = "NoSuchFeature" } };
Feature feature = _manager.LoadFeatures(new[] { featureDescriptor }).First();
Assert.AreEqual(featureDescriptor, feature.Descriptor);
Assert.AreEqual(0, feature.ExportedTypes.Count());
}
[Test]