Telerik JustMock
[TestMethod]
public
void
ShouldMockDependenciesWithoutContainer()
{
// Arrange
var firstDep = Mock.Create<IFirstDependency>();
var secondDep = Mock.Create<ISecondDependency>();
var thirdDep = Mock.Create<IThirdDependency>();
var newInstance =
new
Foo(firstDep, secondDep, thirdDep);
Mock.Arrange(() => secondDep.GetString()).Returns(
"SomeExpectedString"
);
....
}
[TestMethod]
public
void
ShouldMockDependenciesWithoutContainer()
{
// Arrange
var container =
new
MockingContainer<ClassUnderTest>();
container.Arrange<ISecondDependency>(
secondDep => secondDep.GetString()).Returns(
"SomeExpectedString"
);
....
}