Questions tagged as 'junit'

1
answer

No bean named 'entityManagerFactory' available

I'm testing my Spring application with JUnit, however the error is occurring after putting the annotation @EnableJpaRepositories :    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManag...
asked by 12.11.2016 / 20:06
0
answers

Selenium with Maven plugin does not work the tests

Implementation to run a JUnit and testNG test suite, When run by the eclipse plugin, it works. By maven not, the behavior of testNG tests are changed, It seems like it does not end right the http sessions, Create an http session, when (...
asked by 26.09.2016 / 22:59
1
answer

How to use JUnit with Demoiselle 2.4.2?

Hello I have a project with the following profile: Eclipse Moon Java 6 JSF 2.2 / Primefaces 5.3 JBoss 7 Demoiselle 2.4.2. The application already works, the problem is in the execution of JUnit 4.12 test cases . The test case...
asked by 18.02.2016 / 16:04
1
answer

Play Framework TDD exception testing routes

I'm studying the Play Framework with Java and the documentation has a sample route test at the end of this page: Doc Play Framework But when trying to run the test it responds with one exception because the route in question does not exist....
asked by 11.12.2015 / 18:07
1
answer

JUNIT Eclipse - java.lang.ClassNotFoundException

All my tests using JUNIT do not work anymore. I tried unhappily removing all / bin and some other files from the .project .classpath configuration. Okay so far was a lot of bullshit, then tried to create another project and only pass the classes...
asked by 08.05.2015 / 03:18
0
answers

Ant with JUnitParams

Guys, I'm using ANT along with Jenkins to make Continuous Integration right? I use ANT initially to run the automated tests and then generate the application build. My problem comes down to running the automated tests with ANT. Most of my tests...
asked by 15.07.2014 / 19:56
1
answer

Check if it is the correct fragment after the click (UI Test)

I would like a hint on how to check for the correct fragment after the click Follow the (Wrong) thought for example, does anyone have an example of how I can test this? @RunWith(AndroidJUnit4.class) public class MapsActivityTest extends App...
asked by 26.08.2016 / 16:16
1
answer

How to mock a private function in JUnit

I have a main class Usuario that extends ( extends ) an abstract class called Sessao , and uses a function of Sessao called obterDados() that takes the session data and returns it in an object SessaoTO . I...
asked by 17.09.2018 / 17:39
1
answer

I can not do a unit test

I have a problem with doing a test method in this JAVA program. The method I created was to check if the wolf is dead. @Test public void verificaSeOLoboMorreAposCompletarAIdade(){ campo = new Campo(4,4); localizacao = new Localizacao(0...
asked by 24.08.2017 / 21:19
1
answer

How to apply unit tests when the main class is an interface?

I have this method in my Beginning class @Override public void question() { String question = String.format(TEXT_OF_A_QUESTION, this.namePlate); int answer = JOptionPane.showConfirmDialog(null, question, "Question", JOptionPane.YES_NO_...
asked by 26.12.2018 / 22:03