From 82edc3eb849ee0ff3e9028a194c74764f89c0e2b Mon Sep 17 00:00:00 2001 From: David Tchepak Date: Wed, 15 Aug 2012 10:31:37 +1000 Subject: [PATCH] Adding repro for issue #83. --- ...ue83_MethodsWithGenericStructConstraint.cs | 20 +++++++++++++++++++ .../NSubstitute.Acceptance.Specs.csproj | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Source/NSubstitute.Acceptance.Specs/FieldReports/Issue83_MethodsWithGenericStructConstraint.cs diff --git a/Source/NSubstitute.Acceptance.Specs/FieldReports/Issue83_MethodsWithGenericStructConstraint.cs b/Source/NSubstitute.Acceptance.Specs/FieldReports/Issue83_MethodsWithGenericStructConstraint.cs new file mode 100644 index 0000000..c489edf --- /dev/null +++ b/Source/NSubstitute.Acceptance.Specs/FieldReports/Issue83_MethodsWithGenericStructConstraint.cs @@ -0,0 +1,20 @@ +using System; +using NUnit.Framework; + +namespace NSubstitute.Acceptance.Specs.FieldReports +{ + public class Issue83_MethodsWithGenericStructConstraint + { + public interface IService { T Get(T arg) where T : struct; } + + [Test] + [Pending] + public void TestGenericCalls() + { + var id = Guid.NewGuid(); + var service = Substitute.For(); + service.Get(id); + service.Received().Get(id); + } + } +} \ No newline at end of file diff --git a/Source/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj b/Source/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj index a9e4051..c12c581 100644 --- a/Source/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj +++ b/Source/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj @@ -125,6 +125,7 @@ + @@ -208,4 +209,4 @@ - + \ No newline at end of file