Fix unit tests

Add stub for "ActiveExtensions_Obsolete"

--HG--
branch : dev
This commit is contained in:
Renaud Paquay 2010-05-06 11:48:20 -07:00
parent f9dd75ad9e
commit c0519a48b1

View File

@ -90,23 +90,32 @@ namespace Orchard.Tests.Environment {
yield return ext;
}
public IEnumerable<ExtensionEntry> ActiveExtensions_Obsolete() {
var feature = FrameworkFeature(new FeatureDescriptor { Name = "Orchard.Framework" });
yield return new ExtensionEntry {
Assembly = feature.ExportedTypes.First().Assembly,
Descriptor = AvailableExtensions().First(),
ExportedTypes = feature.ExportedTypes
};
}
public IEnumerable<Feature> LoadFeatures(IEnumerable<FeatureDescriptor> featureDescriptors) {
foreach (var descriptor in featureDescriptors) {
if (descriptor.Name == "Orchard.Framework") {
yield return new Feature {
Descriptor = descriptor,
ExportedTypes = new[] {
typeof (TestDependency),
typeof (TestSingletonDependency),
typeof (TestTransientDependency),
}
};
yield return FrameworkFeature(descriptor);
}
}
}
public IEnumerable<ExtensionEntry> ActiveExtensions_Obsolete() {
throw new NotImplementedException();
private Feature FrameworkFeature(FeatureDescriptor descriptor) {
return new Feature {
Descriptor = descriptor,
ExportedTypes = new[] {
typeof (TestDependency),
typeof (TestSingletonDependency),
typeof (TestTransientDependency),
}
};
}
public void InstallExtension(string extensionType, HttpPostedFileBase extensionBundle) {