// Path: src/main/java/io/github/sskorol/data/XlsxReader.java
// @AllArgsConstructor
// public class XlsxReader<T> implements DataReader<T> {
// 
//     @Getter
//     private final Class<T> entityClass;
//     @Getter
//     private final String path;
// 
//     public XlsxReader(final Class<T> entityClass) {
//         this(entityClass, "");
//     }
// 
//     public StreamEx<T> read() {
//         try {
//             val builder = Reader.of(entityClass).from(new File(getUrl().getFile()));
//             return StreamEx.of(ofNullable(entityClass.getDeclaredAnnotation(Sheet.class))
//                     .map(Sheet::name)
//                     .map(builder::sheet)
//                     .orElse(builder)
//                     .skipEmptyRows(true)
//                     .list());
//         } catch (Exception ex) {
//             throw new IllegalArgumentException(
//                     format("Unable to read XLSX data to %s. Check provided path.", entityClass), ex);
//         }
//     }
// }
// 
// Path: src/main/java/io/github/sskorol/data/TestDataReader.java
// public static <T extends DataReader<?>> TestDataReader<T> use(final Class<T> dataReaderClass) {
//     return new TestDataReader<>(dataReaderClass);
// }


import io.github.sskorol.core.DataSupplier;
import io.github.sskorol.data.XlsxReader;
import io.github.sskorol.entities.*;
import one.util.streamex.StreamEx;
import org.testng.annotations.Test;
import static io.github.sskorol.data.TestDataReader.use;
package io.github.sskorol.testcases;



public class XlsxDataSupplierTests {

    @DataSupplier
    public StreamEx<PersonWithoutSheet> getPersonsWithoutSheet() {
// Path: src/main/java/io/github/sskorol/data/XlsxReader.java
// @AllArgsConstructor
// public class XlsxReader<T> implements DataReader<T> {
// 
//     @Getter
//     private final Class<T> entityClass;
//     @Getter
//     private final String path;
// 
//     public XlsxReader(final Class<T> entityClass) {
//         this(entityClass, "");
//     }
// 
//     public StreamEx<T> read() {
//         try {
//             val builder = Reader.of(entityClass).from(new File(getUrl().getFile()));
//             return StreamEx.of(ofNullable(entityClass.getDeclaredAnnotation(Sheet.class))
//                     .map(Sheet::name)
//                     .map(builder::sheet)
//                     .orElse(builder)
//                     .skipEmptyRows(true)
//                     .list());
//         } catch (Exception ex) {
//             throw new IllegalArgumentException(
//                     format("Unable to read XLSX data to %s. Check provided path.", entityClass), ex);
//         }
//     }
// }
// 
// Path: src/main/java/io/github/sskorol/data/TestDataReader.java
// public static <T extends DataReader<?>> TestDataReader<T> use(final Class<T> dataReaderClass) {
//     return new TestDataReader<>(dataReaderClass);
// }


// Path: src/test/java/io/github/sskorol/testcases/XlsxDataSupplierTests.java
import io.github.sskorol.core.DataSupplier;
import io.github.sskorol.data.XlsxReader;
import io.github.sskorol.entities.*;
import one.util.streamex.StreamEx;
import org.testng.annotations.Test;
import static io.github.sskorol.data.TestDataReader.use;

package io.github.sskorol.testcases;



public class XlsxDataSupplierTests {

    @DataSupplier
    public StreamEx<PersonWithoutSheet> getPersonsWithoutSheet() {
        return use(XlsxReader.class).withTarget(PersonWithoutSheet.class).read();