Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/DominicCronin/T-cubed
- Loading branch information
Showing
10 changed files
with
362 additions
and
0 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
TestingFramework/MockCustomerImplementation/MockCustomerImplementation.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{6281540E-35D0-4A61-9F09-B749BCB2D7A9}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>MockCustomerImplementation</RootNamespace> | ||
<AssemblyName>MockCustomerImplementation</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Tridion.Common"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.Common.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.ContentManager.Common"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.ContentManager.Common.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.ContentManager.Publishing"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.ContentManager.Publishing.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.ContentManager.Templating"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.ContentManager.Templating.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.Logging"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.Logging.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="SampleSetup.cs" /> | ||
<Compile Include="SampleTest.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\TestingFrameworkCore\TestingFrameworkCore.csproj"> | ||
<Project>{b75ac99d-951e-4391-9a2f-936e6d155ccb}</Project> | ||
<Name>TestingFrameworkCore</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
36 changes: 36 additions & 0 deletions
36
TestingFramework/MockCustomerImplementation/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("MockCustomerImplementation")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Hewlett-Packard")] | ||
[assembly: AssemblyProduct("MockCustomerImplementation")] | ||
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2013")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("3168aa36-22b0-46af-a45f-e074a3dd034c")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
18 changes: 18 additions & 0 deletions
18
TestingFramework/MockCustomerImplementation/SampleSetup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Tridion.Extensions.Testing; | ||
|
||
namespace MockCustomerImplementation | ||
{ | ||
public class SampleSetup : BaseSetup | ||
{ | ||
|
||
public override void Setup() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Tridion.Extensions.Testing; | ||
|
||
namespace MockCustomerImplementation | ||
{ | ||
public class SampleTest : BaseTest | ||
{ | ||
public override void Test() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Tridion.ContentManager.Templating; | ||
using Tridion.ContentManager.Templating.Assembly; | ||
|
||
namespace Tridion.Extensions.Testing | ||
{ | ||
public abstract class BaseGeneric : ITemplate | ||
{ | ||
protected Engine Engine { get; set; } | ||
protected Package Package { get; set; } | ||
private TemplatingLogger _logger = null; | ||
protected virtual TemplatingLogger Logger | ||
{ | ||
get | ||
{ | ||
if (_logger == null) | ||
{ | ||
_logger = TemplatingLogger.GetLogger(this.GetType()); | ||
} | ||
return _logger; | ||
} | ||
} | ||
|
||
public void Transform(Engine engine, Package package) | ||
{ | ||
Engine = engine; | ||
Package = package; | ||
Transform(); | ||
} | ||
public abstract void Transform(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Tridion.ContentManager.Templating; | ||
using Tridion.ContentManager.Templating.Assembly; | ||
|
||
namespace Tridion.Extensions.Testing | ||
{ | ||
public abstract class BaseSetup : BaseGeneric | ||
{ | ||
|
||
|
||
public override void Transform() | ||
{ | ||
Setup(); | ||
} | ||
|
||
public abstract void Setup(); | ||
|
||
|
||
#region Package manipulation methods | ||
protected void SetPackageItem(string name, string value) | ||
{ | ||
Package.GetByName(name).SetAsString(value); | ||
} | ||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Tridion.ContentManager.Templating; | ||
using Tridion.ContentManager.Templating.Assembly; | ||
|
||
namespace Tridion.Extensions.Testing | ||
{ | ||
public abstract class BaseTest : BaseGeneric | ||
{ | ||
|
||
|
||
public override void Transform() | ||
{ | ||
Test(); | ||
} | ||
|
||
public abstract void Test(); | ||
|
||
|
||
#region Assertion methods | ||
protected bool AssertPackageContains(string name, string value = null) | ||
{ | ||
if (value == null) | ||
return Package.GetByName(name) != null; | ||
return Package.GetByName(name) != null ? Package.GetByName(name).GetAsString().Equals(value) : false; | ||
} | ||
#endregion | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
TestingFramework/TestingFrameworkCore/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("TestingFrameworkCore")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Hewlett-Packard")] | ||
[assembly: AssemblyProduct("TestingFrameworkCore")] | ||
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2013")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("c2e0322e-8fae-4c4c-a4a5-1e7f40a75659")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
70 changes: 70 additions & 0 deletions
70
TestingFramework/TestingFrameworkCore/TestingFrameworkCore.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{B75AC99D-951E-4391-9A2F-936E6D155CCB}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Tridion.Extensions.Testing</RootNamespace> | ||
<AssemblyName>Tridion.Extensions.Testing</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Tridion.Common"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.Common.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.ContentManager.Common"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.ContentManager.Common.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.ContentManager.Publishing"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.ContentManager.Publishing.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.ContentManager.Templating"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.ContentManager.Templating.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Tridion.Logging"> | ||
<HintPath>..\..\ReferenceAssemblies\Tridion.Logging.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="BaseTest.cs" /> | ||
<Compile Include="BaseGeneric.cs" /> | ||
<Compile Include="BaseSetup.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |