diff --git a/TddToolkit/NUnitExtensions/AnyAttribute.cs b/TddToolkit/NUnitExtensions/AnyAttribute.cs new file mode 100644 index 0000000..b1e8a2d --- /dev/null +++ b/TddToolkit/NUnitExtensions/AnyAttribute.cs @@ -0,0 +1,19 @@ +using NUnit.Framework; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace TddEbook.TddToolkit.NUnitExtensions +{ + [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] + public class AnyAttribute : ParameterDataAttribute + { + public override IEnumerable GetData(ParameterInfo parameter) + { + return new[] { Any.Instance(parameter.ParameterType)}; + } + } +} diff --git a/TddToolkit/TddToolkit.csproj b/TddToolkit/TddToolkit.csproj index 1a5cd85..d7b0779 100644 --- a/TddToolkit/TddToolkit.csproj +++ b/TddToolkit/TddToolkit.csproj @@ -39,6 +39,9 @@ ..\Lib\Compare-NET-Objects-SourceV1.7.2\KellermanSoftware.Compare-NET-Objects.dll + + ..\Lib\NUnit-2.6.2\bin\nunit.framework.dll + ..\Lib\AutoFixture\Ploeh.AutoFixture.dll @@ -52,6 +55,7 @@ + diff --git a/TddToolkit/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TddToolkit/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 35c3748..d55b51a 100644 Binary files a/TddToolkit/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TddToolkit/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TddToolkitSpecification/AnySpecification.cs b/TddToolkitSpecification/AnySpecification.cs index 3fb1720..d21bd12 100644 --- a/TddToolkitSpecification/AnySpecification.cs +++ b/TddToolkitSpecification/AnySpecification.cs @@ -5,6 +5,7 @@ using System.Text.RegularExpressions; using NUnit.Framework; using TddEbook.TddToolkit; +using TddEbook.TddToolkit.NUnitExtensions; namespace TddToolkitSpecification {