Test suite

When you write several JUnit classes, it becomes uncomfortable to run them individually. You can run all the Xtend tests in a package by right-clicking on the corresponding package in the xtend-gen folder and select Run As | JUnit Test.

If you need more control over the tests that must be run or you want to group some tests, you can write a JUnit Test Suite. For example, you can write a suite for tests which are not related to generation as shown in the following Java class:

import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({
    EntitiesParsingTest.class,
    EntitiesFormatterTest.class,
    EntitiesValidatorTest.class
})
public class EntitiesNotGeneratorRelatedTests {
}

You can run such suite as a standard JUnit test, and it will run all the test methods in all the test classes specified in the test suite.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.157.186