add a unit test for PossibleIssue_ArgumentCheckOfOptionalParameter
This commit is contained in:
Родитель
55a8e391af
Коммит
109a9ca13f
|
@ -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" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче