Posted 27 Sep 2012 Link to this post
[Fact]
public
void
ArrangeDoesNotMatchArguments()
{
string
value1 =
"Hello"
;
value2 =
"World"
var session = Mock.Create<IMockable>();
Mock.Arrange(() => session.Get<
>(Arg.Matches<
[]>(v => v.Contains(
"Lol"
) &&
v.Contains(
"cakes"
))))
.Returns(
new
[]
value1,
value2,
});
var testValues =
,
};
var result = session.Get<
>(testValues);
Assert.Contains(value1, result);
Assert.Contains(value2, result);
}
interface
IMockable
T[] Get<T>(
params
[] values);
Posted 01 Oct 2012 Link to this post
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.