mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-06-28 15:34:39 +08:00
Fix unit tests
Add stub for "ActiveExtensions_Obsolete" --HG-- branch : dev
This commit is contained in:
parent
f9dd75ad9e
commit
c0519a48b1
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user