mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Fixing more tests
Default Orchard host tests provides test components explicitly for resolving Simple hosting tests use site in it's own basic folder --HG-- branch : dev
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -23,8 +22,14 @@ namespace Orchard.Specs.Bindings {
|
||||
|
||||
[Given(@"I have a clean site")]
|
||||
public void GivenIHaveACleanSite() {
|
||||
GivenIHaveACleanSiteBasedOn("Orchard.Web");
|
||||
}
|
||||
|
||||
|
||||
[Given(@"I have a clean site based on (.*)")]
|
||||
public void GivenIHaveACleanSiteBasedOn(string siteFolder) {
|
||||
_webHost = new WebHost();
|
||||
_webHost.Initialize("Orchard.Web", "/");
|
||||
_webHost.Initialize(siteFolder, "/");
|
||||
|
||||
var sink = new MessageSink();
|
||||
_webHost.Execute(() => {
|
||||
@@ -33,15 +38,6 @@ namespace Orchard.Specs.Bindings {
|
||||
_messages = sink;
|
||||
}
|
||||
|
||||
public class MessageSink : MarshalByRefObject {
|
||||
readonly IList<string> _messages = new List<string>();
|
||||
|
||||
public void Receive(string message) {
|
||||
_messages.Add(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Given(@"I have module ""(.*)""")]
|
||||
public void GivenIHaveModule(string moduleName) {
|
||||
_webHost.CopyExtension("Modules", moduleName);
|
||||
|
Reference in New Issue
Block a user