Top "Expectations" questions

defines a set of expected and/or allowed method/constructor invocations on the mocked types/instances that have been made available to the test through mock fields and/or mock parameters (e.g., in JMockit).

Testing hash contents using RSpec

I have a test like so: it "should not indicate backwards jumps if the checker position is not a king" …

ruby rspec expectations
How to expect some (but not all) arguments with RSpec should_receive?

class Foo def bar(a, b) ... Foo.should_receive( :bar ) expects bar to be called with any arguments. Foo.should_…

ruby rspec expectations
JMockit Expectation API : How to throw an exception upon method/constructor invocation

While using JMockit I want to throw an exception upon a constructor invocation like this: new Expectations(){ { new FirefoxDriver();//Want …

mocking jmockit expectations
PHPUnit mock with multiple expects() calls

Using PHPUnit, I wonder how we can have multiple expectation from the same stub/mock. For example, I want to …

mocking phpunit expectations
GoogleMock: how to expect precisely one call with a certain argument, and see diagnostic on failure?

Maybe a finesse question, my problem is that if I write: EXPECT_CALL(mock, handleMessage(_)).Times(0); // expectation #1 EXPECT_CALL(mock, …

c++ matcher googlemock expectations
java.lang.Exception: Test class should have exactly one public zero-argument constructor:

I have a class : Function Library where I am instantiating the webdriver instance in constructor as below public class FunctionLibrary { …

java selenium-webdriver junit constructor expectations
Calling a method when expected method on mock was invoked

I have the following scenario: class InterfaceA; class InterfaceB; class InterfaceC; class InterfaceA { virtual void foo(InterfaceC&) = 0; }; class InterfaceB { …

mocking googlemock expectations
What is the difference between rhino-mocks stub and expect

What is the difference between rhino-mocks stub and expect here: Looks to me that they behave exact the same? mockContext.…

mocking rhino-mocks stub stubbing expectations