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

com.codebox.bean.JavaBeanTester Maven / Gradle / Ivy

Go to download

Javabean Tester Simplifies POJO Testing and greatly simplifies Lombok Bean Testing!

There is a newer version: 2.8.4
Show newest version
/**
 * JavaBean Tester (https://github.com/hazendaz/javabean-tester)
 *
 * Copyright (c) 2012 - 2017 Hazendaz.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of The Apache Software License,
 * Version 2.0 which accompanies this distribution, and is available at
 * http://www.apache.org/licenses/LICENSE-2.0.txt
 *
 * Contributors:
 *     CodeBox (Rob Dawson).
 *     Hazendaz (Jeremy Landis).
 */
package com.codebox.bean;

/**
 * This helper class can be used to unit test the get/set/equals/canEqual/toString/hashCode methods of JavaBean-style
 * Value Objects.
 *
 * @author rob.dawson
 * @author jeremy.landis
 */
public enum JavaBeanTester {

    // Private Usage
    ;

    /**
     * Configure JavaBeanTester using Fluent API.
     *
     * @param 
     *            the generic type
     * @param clazz
     *            the clazz
     * @return A builder implementing the fluent API to configure JavaBeanTester
     */
    public static  JavaBeanTesterBuilder builder(final Class clazz) {
        // TODO For now push in Object.class as we eventually will internalize setup
        return new JavaBeanTesterBuilder<>(clazz, Object.class);
    }

    /**
     * Configure JavaBeanTester using Fluent API.
     *
     * @param 
     *            the generic type
     * @param 
     *            the element type
     * @param clazz
     *            the clazz
     * @param extension
     *            the extension
     * @return A builder implementing the fluent API to configure JavaBeanTester
     */
    public static  JavaBeanTesterBuilder builder(final Class clazz, final Class extension) {
        return new JavaBeanTesterBuilder<>(clazz, extension);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy