Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'develop' into feature/Caching

  • Loading branch information...
commit 8117a6db523fb12d508b20b282252e624bb69d69 2 parents f6f8330 + f9569d9
@gravypower gravypower authored
View
4 ...ion Tests/Sitecore/Glass.Mapper.Sc.Integration.Tds/Glass.Mapper.Sc.Integration.Tds.scproj
@@ -58,7 +58,7 @@
<SitecoreItem Include="sitecore\content.item">
<Icon>/temp/IconCache/People/16x16/cubes_blue.png</Icon>
<ChildItemSynchronization>NoChildSynchronization</ChildItemSynchronization>
- <ItemDeployment>AlwaysUpdate</ItemDeployment>
+ <ItemDeployment>DeployOnce</ItemDeployment>
</SitecoreItem>
<SitecoreItem Include="sitecore\content\Tests.item">
<Icon>/temp/IconCache/Applications/16x16/folder.png</Icon>
@@ -618,7 +618,7 @@
<SitecoreItem Include="sitecore\templates.item">
<Icon>/temp/IconCache/Applications/16x16/form_blue.png</Icon>
<ChildItemSynchronization>NoChildSynchronization</ChildItemSynchronization>
- <ItemDeployment>AlwaysUpdate</ItemDeployment>
+ <ItemDeployment>DeployOnce</ItemDeployment>
</SitecoreItem>
<SitecoreItem Include="sitecore\templates\Tests.item">
<Icon>/temp/IconCache/Applications/16x16/folder.png</Icon>
View
1  Tests/Integration Tests/Sitecore/Glass.Mapper.Sc.Integration/App.config
@@ -15,6 +15,7 @@
<add key="EmailReminder.FromAddress" value="name@server.net" />
<!-- NetSpell directory -->
<add key="DictionaryFolder" value="/sitecore/shell/controls/rich text editor/Dictionaries/" />
+ <add key="MSBuildPath" value="C:\Windows\Microsoft.NET\Framework\v4.0.30319"/>
</appSettings>
<sitecore configSource=".\App_Config\Sitecore.Config" />
<log4net>
View
1  ...Integration Tests/Sitecore/Glass.Mapper.Sc.Integration/Glass.Mapper.Sc.Integration.csproj
@@ -125,6 +125,7 @@
<Compile Include="PerformanceTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\SitecoreTypeFieldHandler.cs" />
+ <Compile Include="SetupSitecoreForTesting.cs" />
<Compile Include="SitecoreServiceFixture.cs" />
</ItemGroup>
<ItemGroup>
View
58 Tests/Integration Tests/Sitecore/Glass.Mapper.Sc.Integration/SetupSitecoreForTesting.cs
@@ -0,0 +1,58 @@
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace Glass.Mapper.Sc.Integration
+{
+ [SetUpFixture]
+ public class SetupSitecoreForTesting
+ {
+ [SetUp]
+ public void DeployTestItems()
+ {
+ //We need to locate the TDS project that contains our test configuration. We are assuming its folder is a sibling of the project folder and we are in the /bin/[config] folder
+ string currentPath = Environment.CurrentDirectory;
+ string tdsProjectPath = Path.GetFullPath(Path.Combine(currentPath, "..\\..\\..\\Glass.Mapper.Sc.Integration.Tds"));
+
+ string msBuildPath = ConfigurationManager.AppSettings["MSBuildPath"];
+
+ ProcessStartInfo psi = new ProcessStartInfo
+ {
+ UseShellExecute = false,
+ FileName = Path.Combine(msBuildPath, "MSBuild.exe"),
+ Arguments = "/t:Deploy Glass.Mapper.Sc.Integration.Tds.scproj",
+ RedirectStandardOutput = true,
+ RedirectStandardError = true,
+ WorkingDirectory = tdsProjectPath
+ };
+
+ //Start the TDS deploy
+ using (Process buildProc = Process.Start(psi))
+ {
+ //Show the output in the console for debugging purposes
+ while (!buildProc.HasExited)
+ {
+ string output = buildProc.StandardOutput.ReadLine();
+ Debug.WriteLine(output);
+ Console.WriteLine(output);
+ }
+
+ //If there are any failues, show the standard error contents
+ if (buildProc.ExitCode != 0)
+ {
+ Console.WriteLine("\n\nStandard Error:");
+
+ while (!buildProc.StandardError.EndOfStream)
+ {
+ Console.WriteLine(buildProc.StandardError.ReadLine());
+ }
+ }
+ }
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.