Skip to content
Advertisement

Tag: junit

Eclipse JUnit 5 support

Currently, JUnit 5 is just out with a “stable” version. IntelliJ supports JUnit 5 according to the Website. My question is if eclipse is supporting JUnit 5 as well, and if not when it is going to be supported. With supported I mean if I can run JUnit 5 tests without the need for a @RunWith(PlatformRunner.class) annotation. EDIT October 2017:

NullPointerException on validating email

I am writing a unit test to check the email validation logic. The logic is throwing null pointer exception when you run the test. But it works fine with emulator. Can someone help me solving this? Below is my unit test. The error I am getting is, Answer android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches() exists since API level 8, May be your emulator is prior

Mockito: mocking objects and adding to ArrayList

I am testing an enterprise level application using Mockito and JUnit. Here is the code for a method of adding a product to the offline repository class in a product offline-repository-class-test I have: This relies on the following methods in classes: The method it is testing in the ProductRepositoryOffline: InitialData The question I wish to ask is that in the

JAVA best practice unit testing with JUnit

I am currently using the following method and unit test for the method. I think the test could/should be broken down into more tests but I’m not sure how many tests to write for this or what the more important parts are especially considering the method deals with establishing a Connection, using sql queries, etc… All help is appreciated. JAVA

Why does cucumber run @Before in all glue code files

I have a problem with my cucumber tests. It runs the @Before method in all the glue classes. For example. This feature file have one glue code in the MainStepDef.class. The MainStepDef: I have an additional glue file called: OtherStep.class And finally I have my runner class. When I run this I get the runtime exception from the OtherStepDef setup

Advertisement