diff --git a/Source/NSubstitute.Acceptance.Specs/FieldReports/PossibleIssue_ArgumentCheckOfOptionalParameter.cs b/Source/NSubstitute.Acceptance.Specs/FieldReports/PossibleIssue_ArgumentCheckOfOptionalParameter.cs new file mode 100644 index 0000000..3173cef --- /dev/null +++ b/Source/NSubstitute.Acceptance.Specs/FieldReports/PossibleIssue_ArgumentCheckOfOptionalParameter.cs @@ -0,0 +1,20 @@ +using NUnit.Framework; + +namespace NSubstitute.Acceptance.Specs.FieldReports +{ + public class PossibleIssue_ArgumentCheckOfOptionalParameter + { + public interface IInterface + { + void MethodWithOptionalParameter(object obligatory, object optional = null); + } + + [Test] + public void PassArgumentCheckForOptionalParameter() + { + var substitute = Substitute.For(); + substitute.MethodWithOptionalParameter(new object()); + substitute.ReceivedWithAnyArgs().MethodWithOptionalParameter(Arg.Any()); + } + } +} \ 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 04f96e8..350cc56 100644 --- a/Source/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj +++ b/Source/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj @@ -73,6 +73,7 @@ +