mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fix SpecFlow tests
--HG-- branch : dev
This commit is contained in:
@@ -16,15 +16,16 @@ namespace Orchard.Specs.Bindings {
|
|||||||
var webApp = Binding<WebAppHosting>();
|
var webApp = Binding<WebAppHosting>();
|
||||||
|
|
||||||
webApp.GivenIHaveACleanSiteWith(TableData(
|
webApp.GivenIHaveACleanSiteWith(TableData(
|
||||||
new { extension = "module", names = "Orchard.Setup, Orchard.Modules, Orchard.Themes, Orchard.Users, Orchard.Roles, Orchard.Pages, Orchard.Comments, Orchard.Tags, TinyMce" },
|
new { extension = "module", names = "Orchard.Setup, Orchard.Modules, Orchard.Themes, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Tags, TinyMce" },
|
||||||
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Scheduling, Settings, XmlRpc" },
|
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, PublishLater, Routable, Scheduling, Settings, XmlRpc" },
|
||||||
new { extension = "theme", names = "SafeMode, Classic" }));
|
new { extension = "theme", names = "SafeMode, Classic" }));
|
||||||
|
|
||||||
webApp.WhenIGoTo("Setup");
|
webApp.WhenIGoTo("Setup");
|
||||||
|
|
||||||
webApp.WhenIFillIn(TableData(
|
webApp.WhenIFillIn(TableData(
|
||||||
new { name = "SiteName", value = "My Site" },
|
new { name = "SiteName", value = "My Site" },
|
||||||
new { name = "AdminPassword", value = "6655321" }));
|
new { name = "AdminPassword", value = "6655321" },
|
||||||
|
new { name = "ConfirmPassword", value = "6655321" }));
|
||||||
|
|
||||||
webApp.WhenIHit("Finish Setup");
|
webApp.WhenIHit("Finish Setup");
|
||||||
}
|
}
|
||||||
|
@@ -1,22 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.Remoting;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Hosting;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
using Castle.Core.Logging;
|
using Castle.Core.Logging;
|
||||||
using HtmlAgilityPack;
|
using HtmlAgilityPack;
|
||||||
using log4net.Appender;
|
using log4net.Appender;
|
||||||
using log4net.Core;
|
using log4net.Core;
|
||||||
using log4net.Repository;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Orchard.Specs.Hosting;
|
using Orchard.Specs.Hosting;
|
||||||
using Orchard.Specs.Util;
|
|
||||||
using TechTalk.SpecFlow;
|
using TechTalk.SpecFlow;
|
||||||
|
|
||||||
namespace Orchard.Specs.Bindings {
|
namespace Orchard.Specs.Bindings {
|
||||||
|
@@ -202,6 +202,7 @@
|
|||||||
|
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<probing privatePath="App_Data/Dependencies"/>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||||
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
|
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
|
||||||
|
@@ -31,6 +31,19 @@ namespace Orchard.Specs.Hosting {
|
|||||||
.ShallowCopy("*.dll", _tempSite.Combine("bin"))
|
.ShallowCopy("*.dll", _tempSite.Combine("bin"))
|
||||||
.ShallowCopy("*.pdb", _tempSite.Combine("bin"));
|
.ShallowCopy("*.pdb", _tempSite.Combine("bin"));
|
||||||
|
|
||||||
|
// Copy SqlCe binaries
|
||||||
|
if (_orchardWebPath.Combine("bin").Combine("x86").IsDirectory) {
|
||||||
|
_orchardWebPath.Combine("bin").Combine("x86")
|
||||||
|
.ShallowCopy("*.dll", _tempSite.Combine("bin").Combine("x86"))
|
||||||
|
.ShallowCopy("*.pdb", _tempSite.Combine("bin").Combine("x86"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_orchardWebPath.Combine("bin").Combine("amd64").IsDirectory) {
|
||||||
|
_orchardWebPath.Combine("bin").Combine("amd64")
|
||||||
|
.ShallowCopy("*.dll", _tempSite.Combine("bin").Combine("amd64"))
|
||||||
|
.ShallowCopy("*.pdb", _tempSite.Combine("bin").Combine("amd64"));
|
||||||
|
}
|
||||||
|
|
||||||
baseDir
|
baseDir
|
||||||
.ShallowCopy("*.dll", _tempSite.Combine("bin"))
|
.ShallowCopy("*.dll", _tempSite.Combine("bin"))
|
||||||
.ShallowCopy("*.exe", _tempSite.Combine("bin"))
|
.ShallowCopy("*.exe", _tempSite.Combine("bin"))
|
||||||
@@ -54,7 +67,18 @@ namespace Orchard.Specs.Hosting {
|
|||||||
public void CopyExtension(string extensionFolder, string extensionName) {
|
public void CopyExtension(string extensionFolder, string extensionName) {
|
||||||
var sourceModule = _orchardWebPath.Combine(extensionFolder).Combine(extensionName);
|
var sourceModule = _orchardWebPath.Combine(extensionFolder).Combine(extensionName);
|
||||||
var targetModule = _tempSite.Combine(extensionFolder).Combine(extensionName);
|
var targetModule = _tempSite.Combine(extensionFolder).Combine(extensionName);
|
||||||
|
|
||||||
sourceModule.ShallowCopy("*.txt", targetModule);
|
sourceModule.ShallowCopy("*.txt", targetModule);
|
||||||
|
|
||||||
|
//sourceModule.ShallowCopy("*.csproj", targetModule);
|
||||||
|
//sourceModule.DeepCopy("*.cs", targetModule);
|
||||||
|
|
||||||
|
if (sourceModule.Combine("bin").IsDirectory) {
|
||||||
|
sourceModule.Combine("bin").ShallowCopy("*.dll", targetModule.Combine("bin"));
|
||||||
|
sourceModule.Combine("bin").ShallowCopy("*.exe", targetModule.Combine("bin"));
|
||||||
|
sourceModule.Combine("bin").ShallowCopy("*.pdb", targetModule.Combine("bin"));
|
||||||
|
}
|
||||||
|
|
||||||
if (sourceModule.Combine("Views").IsDirectory)
|
if (sourceModule.Combine("Views").IsDirectory)
|
||||||
sourceModule.Combine("Views").DeepCopy(targetModule.Combine("Views"));
|
sourceModule.Combine("Views").DeepCopy(targetModule.Combine("Views"));
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,13 @@ namespace Orchard.Specs.Util {
|
|||||||
return sourcePath;
|
return sourcePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Path DeepCopy(this Path sourcePath, string pattern, Path targetPath) {
|
||||||
|
sourcePath
|
||||||
|
.GetFiles(pattern, true /*recursive*/)
|
||||||
|
.ForEach(file => FileCopy(sourcePath, targetPath, file));
|
||||||
|
return sourcePath;
|
||||||
|
}
|
||||||
|
|
||||||
public static Path ShallowCopy(this Path sourcePath, string pattern, Path targetPath) {
|
public static Path ShallowCopy(this Path sourcePath, string pattern, Path targetPath) {
|
||||||
sourcePath
|
sourcePath
|
||||||
.GetFiles(pattern, false /*recursive*/)
|
.GetFiles(pattern, false /*recursive*/)
|
||||||
|
Reference in New Issue
Block a user