jmock
mocking web service
I would like to mock a web service call to test my code. The following is a code snippet of which I want to mock.[详细]
2023-04-10 09:58 分类:问答Java Unit Testing by Creating a mock object of an interface which does some work
Im not sure how to word what I want to do so I apologise in advance I\'m currently writing unit tests for some legacy code as part of my job. One of these bits of code is a (Java) HttpServlet which p[详细]
2023-04-03 05:00 分类:问答JMock Generic return types
I\'m writing a JMock test for a class that needs to create a number of collections within itself. I am supplying the class with a factory which will generate a Collection when needed.[详细]
2023-03-29 23:53 分类:问答How does jmock and mockito create wrappers?
For example, I have the following code: SomeClass stub = Mockito.mock(SomeClass.class); After that, stub is a normal implementation o开发者_如何学Pythonf SomeClass, but with its own behavior (defau[详细]
2023-03-29 12:27 分类:问答JMock expectations - is it possible to check the actual value in the expectation?
I\'m new to Java and JMock and I\'m currently trying to get my head around mocking. I\'ve created this dummy test with dummy class开发者_StackOverflowes:[详细]
2023-03-25 14:31 分类:问答JMock - why does this test fail?
I\'m playing around with JMock and get this error on a basic test: Does anyone know why? unexpected invocation: class2.add(<4>, <4>)[详细]
2023-03-25 11:56 分类:问答jmock - mocking a method with long[] as input and with(any())
I have a q开发者_运维知识库uestion related to jmock library. I am trying to mock a method that has a parameter of long[] and with(any()). Is there a direct way to do that?[详细]
2023-03-19 22:08 分类:问答JMock assertIsSatisfied in TearDown?
I d开发者_JS百科on\'t know why, but I have always written my JMock tests like this: @Test public void testMyThing() throws Exception {[详细]
2023-03-19 07:57 分类:问答Does mockito have an equivalent idiom to jMock's States?
The book Growing Object Oriented Software gives several examples in jMock where the state is made explicit without exposing it through an API. I really like this idea. Is there a way to do this in Moc[详细]
2023-03-17 05:17 分类:问答Why is JMock 2.6.0 a release candidate?
I rolled out JMock at our company, and many folks are using 开发者_开发百科it with success.The version we are using is the latest stable release, which is 2.5.1.That was released in August 2008.Since[详细]
2023-03-15 23:25 分类:问答