jmockit
Verifying partially ordered method invocations in JMockit
I\'m trying to write a unit test (using JMockit) that verifies that methods are called according to a partial order. The specific use case is ensuring that certain operations are called inside a trans[详细]
2023-02-23 07:15 分类:问答Setting javaagent in ant
I am trying to run JUnit tests from an Ant script. The tests use the JMockit mocking framework, which for Java 5 requires specifying it as a javaagent to run correctly. Here is the script I am running[详细]
2023-02-18 19:06 分类:问答Mocking the current time with JRE 1.4
I\'m currently restricted to only using JRE 1.4 (java runtime environment) and i have a class which has some current time calculations. I am trying to unit test the class but it seems quite hard as al[详细]
2023-02-15 18:44 分类:问答Replacing inherited final methods with jmockit
I\'m trying to find a way to replace an inherited final method with my own implementation using jMockIt.[详细]
2023-02-11 00:58 分类:问答Removing previously defined expectations in JMockit
I have an object that I\'m mocking with a JMockit NonStrictExcpection() in the @Before/setUp() method of my test class so that it returns the value expected for normal execution of my class under test[详细]
2023-02-09 13:13 分类:问答Mock a static method multiple times using JMockit within a JUnit test
I have a class with static methods that I\'m currently mocking with JMockit. Say it looks something like:[详细]
2023-02-08 11:05 分类:问答JMockit: Null Pointer Error When Mock Object Should Be Instatiated?
My understanding of JMockit is that it will replace all instances of a mocked object with a mock (unless you tell it otherwise).[详细]
2023-02-06 13:12 分类:问答How to mock HTTPSession/FlexSession with TestNG and some Mocking Framework
I\'m developing a web application running on Tomcat 6, with Flex as Frontend. I\'m testing my backend with TestNG. Currently, I\'m trying to test the following method in my Java-Backend:[详细]
2023-02-04 05:40 分类:问答How to mock the default constructor of the Date class with JMockit?
I want to mock the default constructor of java.util.date so it does not construct a Date object representing the time when it was created, but always the same Date object(in my example below 31 Dec 20[详细]
2023-02-01 15:17 分类:问答Comparison between Mockito vs JMockit - why is Mockito voted better than JMockit? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a[详细]
2023-01-23 21:20 分类:问答