You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2018. It is now read-only.
public class RhinoTest
{
[Test]
public void Test()
{
var service = MockRepository.GenerateStub();
// in real some complex setup of bunch of mocks in separate method
service.Stub(x => x.Do()).Return("first setup");
// than I missed that service is already set up
service.Stub(x => x.Do()).Return("second setup");
var str = service.Do();
Assert.That(str == "second setup"); // fails
}
}
Is it possible at least give a warning (or even fail a test with warning) that method Do is set up twice?
The text was updated successfully, but these errors were encountered:
public class RhinoTest
{
[Test]
public void Test()
{
var service = MockRepository.GenerateStub();
// in real some complex setup of bunch of mocks in separate method
service.Stub(x => x.Do()).Return("first setup");
// than I missed that service is already set up
service.Stub(x => x.Do()).Return("second setup");
var str = service.Do();
Assert.That(str == "second setup"); // fails
}
}
Is it possible at least give a warning (or even fail a test with warning)
that method Do is set up twice?
Reply to this email directly or view it on GitHub: #16
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
public interface IService
{
string Do();
}
public class RhinoTest
{
[Test]
public void Test()
{
var service = MockRepository.GenerateStub();
}
Is it possible at least give a warning (or even fail a test with warning) that method Do is set up twice?
The text was updated successfully, but these errors were encountered: