Skip to content

Commit

Permalink
Merge pull request #48 from dennisroche/add-testbuilder-interface
Browse files Browse the repository at this point in the history
Added ITestDataBuilder interface
  • Loading branch information
robdmoore committed Jan 2, 2016
2 parents 57e8088 + db8845e commit 6b04558
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions TestStack.Dossier/ITestDataBuilder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace TestStack.Dossier
{
/// <summary>
/// Base class definining infrastructure for a class that generates objects of type {TObject}.
/// </summary>
/// <typeparam name="TObject">The type of object this class generates</typeparam>
public interface ITestDataBuilder<out TObject> where TObject : class
{
/// <summary>
/// Build the object.
/// </summary>
/// <returns>The built object</returns>
TObject Build();
}
}
2 changes: 1 addition & 1 deletion TestStack.Dossier/TestDataBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace TestStack.Dossier
/// </summary>
/// <typeparam name="TObject">The type of object this class generates</typeparam>
/// <typeparam name="TBuilder">The type for this class, yes this is a recursive type definition</typeparam>
public abstract class TestDataBuilder<TObject, TBuilder>
public abstract class TestDataBuilder<TObject, TBuilder> : ITestDataBuilder<TObject>
where TObject : class
where TBuilder : TestDataBuilder<TObject, TBuilder>, new()
{
Expand Down
1 change: 1 addition & 0 deletions TestStack.Dossier/TestStack.Dossier.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<ItemGroup>
<Compile Include="AnonymousValueFixture.cs" />
<Compile Include="Builder.cs" />
<Compile Include="ITestDataBuilder.cs" />
<Compile Include="DataSources\Dictionaries\Cache.cs" />
<Compile Include="DataSources\Dictionaries\IDictionaryRepository.cs" />
<Compile Include="DataSources\Dictionaries\CachedFileDictionaryRepository.cs" />
Expand Down

0 comments on commit 6b04558

Please sign in to comment.