Skip to content

Added ITestDataBuilder interface #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2016
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