info.novatec.testit.webtester.junit5.internal.TestClassModel Maven / Gradle / Ivy
package info.novatec.testit.webtester.junit5.internal;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Map;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
/**
* This model stores information about the test class and is used by WebTester's JUnit extensions to exchange data.
*
* @since 2.1
*/
@Getter
@Builder
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@SuppressWarnings("PMD.UnusedPrivateField")
public class TestClassModel {
private final List browserFields;
private final Map namedBrowserFields;
private final List eventListenerFields;
private final List pageFields;
private final List configurationValueFields;
/**
* Creates a {@link TestClassModel} from the given test class.
*
* @param testClass the class to analyze
* @return the resulting model
* @since 2.1
*/
public static TestClassModel fromTestClass(Class> testClass) {
return new TestClassAnalyzer(testClass, new ReflectionUtils()).analyze();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy