Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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