All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jparams.junit4.test.data.reader.ProvidedDataReader Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package com.jparams.junit4.test.data.reader;

import com.jparams.junit4.test.data.provider.Provider;
import com.jparams.junit4.test.data.reader.exception.ReaderException;

public class ProvidedDataReader implements DataReader> {
    @Override
    public Object[][] readData(Class source) {
        try {
            Provider provider = source.newInstance();
            return provider.provide();
        } catch (InstantiationException | IllegalAccessException e) {
            throw new ReaderException("Failed to Instantiate provider", e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy