Adding some xmldoc to the public IArgumentMatcher and IDescribeNonMatches interfaces.
This commit is contained in:
Родитель
b7dcbdacfd
Коммит
d9676ffe64
|
@ -1,12 +1,33 @@
|
||||||
namespace NSubstitute
|
namespace NSubstitute
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides a specification for arguments for use with <see ctype="Arg.Matches (IArgumentMatcher)" />.
|
||||||
|
/// Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||||
|
/// </summary>
|
||||||
public interface IArgumentMatcher
|
public interface IArgumentMatcher
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||||
|
/// If this throws an exception the argument will be treated as non-matching.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="argument"></param>
|
||||||
|
/// <returns></returns>
|
||||||
bool IsSatisfiedBy(object argument);
|
bool IsSatisfiedBy(object argument);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provides a specification for arguments for use with <see ctype="Arg.Matches < T >(IArgumentMatcher)" />.
|
||||||
|
/// Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">Matches arguments of type <typeparamref name="T"/> or compatible type.</typeparam>
|
||||||
public interface IArgumentMatcher<T>
|
public interface IArgumentMatcher<T>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||||
|
/// If this throws an exception the argument will be treated as non-matching.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="argument"></param>
|
||||||
|
/// <returns></returns>
|
||||||
bool IsSatisfiedBy(T argument);
|
bool IsSatisfiedBy(T argument);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,6 +2,12 @@ namespace NSubstitute
|
||||||
{
|
{
|
||||||
public interface IDescribeNonMatches
|
public interface IDescribeNonMatches
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes how the <paramref name="argument" /> does not match the condition specified by this class, or <see cref="string.Empty"/>
|
||||||
|
/// if a detailed description can not be provided for the argument.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="argument"></param>
|
||||||
|
/// <returns>Description of the non-match, or <see cref="string.Empty" /> if no description can be provided.</returns>
|
||||||
string DescribeFor(object argument);
|
string DescribeFor(object argument);
|
||||||
}
|
}
|
||||||
}
|
}
|
Загрузка…
Ссылка в новой задаче