Discussion Forum : junit

IntelliJ IDEA with Junit 4.7 !!! JUnit version 3.8 or later expected:
When I attempt to run the following test in IntelliJ IDEA I get the message: !!! JUnit version 3.8 or later expected ... View Detail
 Upvotes: 0   Answers: 0
How to do unit test for Exceptions?
As you know, exception is thrown at the condition of abnormal scenarios. So how to analog these exceptions? I feel it is ... View Detail
 Upvotes: 0   Answers: 0
How to rollback a database transaction when testing services with Spring in JUnit?
I have no problem testing my DAO and services, but when I test INSERTs or UPDATEs I want to rollback the transaction and ... View Detail
 Upvotes: 0   Answers: 0
Changing names of parameterized tests
Is there a way to set my own custom test case names when using parameterized tests in JUnit4? I'd like to change the de ... View Detail
 Upvotes: 0   Answers: 0
Java Dynamic Web project with Maven and Eclipse
I have several questions about creating a Java Web application with Maven and Eclipse: How do I create a Java web proj ... View Detail
 Upvotes: 0   Answers: 0
How to set a long Java classpath in Windows?
I'm trying to run a particular JUnit test by hand on a Windows XP command line, which has an unusually high number of el ... View Detail
 Upvotes: 0   Answers: 0
How to exclude *AutoConfiguration classes in Spring Boot JUnit tests?
I tried: @RunWith(SpringJUnit4ClassRunner.class) @EnableAutoConfiguration(exclude=CrshAutoConfiguration.class) @SpringA ... View Detail
 Upvotes: 0   Answers: 0
Mocking Logger and LoggerFactory with PowerMock and Mockito
I have the following Logger I want to mock out, but to validate log entries are getting called, not for the content. pr ... View Detail
 Upvotes: 0   Answers: 0
Failed to connect to binary FirefoxBinary with Selenium in Maven
I am running some Selenium-Tests. When I start them directly from Eclipse everything works fine. But when I Start them t ... View Detail
 Upvotes: 0   Answers: 0
Rollback transaction after @Test
First of all, I've found a lot of threads on StackOverflow about this, but none of them really helped me, so sorry to as ... View Detail
 Upvotes: 0   Answers: 0
Embedded MongoDB when running integration tests
My question is a variation of this one. Since my Java Web-app project requires a lot of read filters/queries and interf ... View Detail
 Upvotes: 0   Answers: 0
Easy way of running the same junit test over and over?
Like the title says, I'm looking for some simple way to run JUnit 4.x tests several times in a row automatically using E ... View Detail
 Upvotes: 0   Answers: 0
spring - @ContextConfiguration fail to load config file in src/test/resources
I've tried to load the spring config file in src/test/resources classpath with the following abstract class: @RunWith(S ... View Detail
 Upvotes: 0   Answers: 0
JUnit Testing private variables?
I have been assigned the task of unit testing a class that I never worked directly on with JUnit, and am strictly forbid ... View Detail
 Upvotes: 0   Answers: 0
Spring JUnit: How to Mock autowired component in autowired component
I've got a Spring component I'd like to test and this component has an autowired attribute which I need to change for th ... View Detail
 Upvotes: 0   Answers: 0
How make JUnit to print asserts and results
I have some tests like this: @Test public void test01() {  Position p = getPositionAt('a', 1);  assertNotNull(a1 exists ... View Detail
 Upvotes: 0   Answers: 0
Warning: The method assertEquals from the type Assert is deprecated
Since the method Assert.assertEquals is deprecated, which method are we supposed to use now? The following code: Stri ... View Detail
 Upvotes: 0   Answers: 0
How to mock the HttpServletRequest?
I have a function that looks for a query parameter and returns a boolean:   public static Boolean getBooleanFromRequest ... View Detail
 Upvotes: 0   Answers: 0
JUnit confusion: use 'extends TestCase' or '@Test'?
I've found the proper use (or at least the documentation) of JUnit very confusing. This question serves both as a future ... View Detail
 Upvotes: 0   Answers: 0
Class Not Found: Empty Test Suite in IntelliJ
I'm just starting the computer science program at my college, and I'm having some issues with IntelliJ. When I try to ru ... View Detail
 Upvotes: 0   Answers: 0
JUnit @Test expected annotation not working
I've got the following test: @Test(expected = IllegalStateException.class) public void testKey() {  int key = 1;  this. ... View Detail
 Upvotes: 0   Answers: 0
can't find run as junit test in eclipse
I created a test class in Eclipse like this @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { ... View Detail
 Upvotes: 0   Answers: 0
How to use JUnit and Hamcrest together?
I can't understand how JUnit 4.8 should work with Hamcrest matchers. There are some matchers defined inside junit-4.8.ja ... View Detail
 Upvotes: 0   Answers: 0
Java: How to test methods that call System.exit()?
I've got a few methods that should call System.exit() on certain inputs. Unfortunately, testing these cases causes JUnit ... View Detail
 Upvotes: 0   Answers: 0
Java JUnit: The method X is ambiguous for type Y
I had some tests working fine. Then, I moved it to a different package, and am now getting errors. Here is the code: im ... View Detail
 Upvotes: 0   Answers: 0

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp