Package org.gridgain.testframework.junits.spi

Examples of org.gridgain.testframework.junits.spi.GridSpiTestConfig


     * @throws InvocationTargetException If failed.
     */
    private void configure(GridSpi spi) throws Exception {
        // Inject Configuration.
        for (Method m : getClass().getMethods()) {
            GridSpiTestConfig cfg = m.getAnnotation(GridSpiTestConfig.class);

            if (cfg != null) {
                if (getTestData().isDiscoveryTest() ||
                    (cfg.type() != ConfigType.DISCOVERY && !(spi instanceof GridDiscoverySpi)) ||
                    (cfg.type() != ConfigType.SELF && spi instanceof GridDiscoverySpi)) {
                    assert m.getName().startsWith("get") : "Test configuration must be a getter [method=" +
                        m.getName() + ']';

                    // Determine getter name.
                    String name = cfg.setterName();

                    if (name == null || name.isEmpty())
                        name = 's' + m.getName().substring(1);

                    Method setter = getMethod(spi.getClass(), name);
View Full Code Here

TOP

Related Classes of org.gridgain.testframework.junits.spi.GridSpiTestConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.