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;
|
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) {
|
public IEnumerable<Feature> LoadFeatures(IEnumerable<FeatureDescriptor> featureDescriptors) {
|
||||||
foreach (var descriptor in featureDescriptors) {
|
foreach (var descriptor in featureDescriptors) {
|
||||||
if (descriptor.Name == "Orchard.Framework") {
|
if (descriptor.Name == "Orchard.Framework") {
|
||||||
yield return new Feature {
|
yield return FrameworkFeature(descriptor);
|
||||||
Descriptor = descriptor,
|
|
||||||
ExportedTypes = new[] {
|
|
||||||
typeof (TestDependency),
|
|
||||||
typeof (TestSingletonDependency),
|
|
||||||
typeof (TestTransientDependency),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<ExtensionEntry> ActiveExtensions_Obsolete() {
|
private Feature FrameworkFeature(FeatureDescriptor descriptor) {
|
||||||
throw new NotImplementedException();
|
return new Feature {
|
||||||
|
Descriptor = descriptor,
|
||||||
|
ExportedTypes = new[] {
|
||||||
|
typeof (TestDependency),
|
||||||
|
typeof (TestSingletonDependency),
|
||||||
|
typeof (TestTransientDependency),
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InstallExtension(string extensionType, HttpPostedFileBase extensionBundle) {
|
public void InstallExtension(string extensionType, HttpPostedFileBase extensionBundle) {
|
||||||
|
Loading…
Reference in New Issue
Block a user