mock « junit « Java Testing Q&A

Home
Java Testing Q&A
1.Development
2.FindBugs
3.HTMLUnit
4.hudson
5.junit
6.performance
7.plugin
8.profile
9.selenium
10.Tools
11.unit test
Java Testing Q&A » junit » mock 

1. Java mock webserver    stackoverflow.com

I would like to create a unit test using a mock web server. Is there a web server written in java which can be easily started and stopped from a ...

2. How do Java mocking frameworks work?    stackoverflow.com

This is NOT a question about which is the best framework, etc. I have never used a mocking framework and I'm a bit puzzled by the idea. How does it know how ...

3. junit mock objects    stackoverflow.com

i am new to junit so any help is appreciated. I have a class called sysconfig.java for which i have written a junit class file called TestSysconfig.java that tests some methods in ...

4. SAP Java Connector (JCo) mocking/testing JCoFunction and/or JCoParameterList    stackoverflow.com

i need to test a module without actually calling our sap provider via executing a "real" JCoFunction. how do i instantiate a "formally correct" JCoFunction? i can even just deal with a JCoParameterList ...

5. How to keep Mock object in sync with target object    stackoverflow.com

I am asking about mock object management, regardless the specific implementation (EasyMock, Mock Object etc). I have been reluctant to use Mock object in my unit testings, for the following reason: The behavior ...

6. Mocking objects in JUnit tests - best practice?    stackoverflow.com

Do you think mocking objects in JUnit test is a bests practice? I don't see the big advantage. Sure if you have a database which should not be considered in your ...

7. Outlook Recipient test: always succeed / always bounce    stackoverflow.com

I am writing JUnit tests and would like to have an Outlook email recipient that will always succeed and a different one that will always bounce as undeliverable. For the "always succeed," ...

8. junit: mocks and stubs--reference links?    stackoverflow.com

So I'm primarily a RoR developer at this stage in my career (still some lingering attachments to Python and Django) and I've been put on a java/ejb/tomcat project recently. I'm trying ...

9. How to write JUnit for Adapter without overcomplicated code?    stackoverflow.com

I have an adapter from I1 to ILogger implemented like this:

class BAdapter() implements I1
{
   void logA() { // nothing }
   void logB() { new BLogger().log() }
  ...

10. Junit tests sharing same data object? Should I make a mock of it or what?    stackoverflow.com

I have three classes I need to test, lets say Load, Transform, Perform and they all begin or work on the same data object, at least thats what is required, from ...

11. how do you provide deep mock objects?    stackoverflow.com

I don't think I understand testing as well a should. I have written a lot of tests and gotten decent coverage but I cannot help feeling it has not been intuitive. Let ...

12. How to mock the FacesContext using JUnit?    stackoverflow.com

I am using JUnit 4, I want to Mock the FacesContext instance, I am getting nullpointer error while writing test case for the method that contains FacesContext instance, Similarly DataBinding and BindignContainer ...

13. Mocking and Stubbing in Java - (JUnit, etc)    forums.oracle.com

Currently our junit tests all eventualy read the database to fill the objects and test code. My question is, isnt it a better practice to mock/stub and avoid the trip to the database, since we are testing the logic, not the database connection? But if my thought is right on mocking and stubbing, how can it be made possible? For example. ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.