add a unit test for PossibleIssue_ArgumentCheckOfOptionalParameter

This commit is contained in:
Alexandr Nikitin 2013-07-08 23:17:25 +03:00
Родитель 55a8e391af
Коммит 109a9ca13f
2 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -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<IInterface>();
substitute.MethodWithOptionalParameter(new object());
substitute.ReceivedWithAnyArgs().MethodWithOptionalParameter(Arg.Any<object>());
}
}
}

Просмотреть файл

@ -73,6 +73,7 @@
<Compile Include="AutoValuesForSubs.cs" />
<Compile Include="FieldReports\CallingIntoNewSubWithinReturns.cs" />
<Compile Include="FieldReports\Issue110_CustomExceptions.cs" />
<Compile Include="FieldReports\PossibleIssue_ArgumentCheckOfOptionalParameter.cs" />
<Compile Include="ReturnsAndDoes.cs" />
<Compile Include="ExceptionsWhenCheckingReceivedCalls.cs" />
<Compile Include="ExceptionsWhenCheckingSequencesOfCalls.cs" />