// Path: components/bean-validation/hibernate-validator/src/test/java/com/kumuluz/ee/beanvalidation/test/beans/Project.java
// public class Project {
// 
//     @NotNull
//     @Size(min = 2, max = 30)
//     private String name;
// 
//     @Size(min = 1, max = 3000)
//     private String description;
// 
//     @NotNull
//     private User user;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     public User getUser() {
//         return user;
//     }
// 
//     public void setUser(User user) {
//         this.user = user;
//     }
// }
// 
// Path: components/bean-validation/hibernate-validator/src/test/java/com/kumuluz/ee/beanvalidation/test/beans/User.java
// public class User {
// 
//     @NotNull
//     @Size(min = 2, max = 30)
//     private String username;
// 
//     @NotNull
//     @Email
//     private String email;
// 
//     @Size(min = 2, max = 20)
//     private String firstname;
// 
//     @Size(min = 2, max = 20)
//     private String lastname;
// 
//     @NotNull
//     @Min(0)
//     private Integer age;
// 
//     @NotNull
//     @Min(0)
//     private Double salary;
// 
//     @NotNull
//     private Date createdAt;
// 
//     @Valid
//     private List<Project> projects;
// 
//     public String getUsername() {
//         return username;
//     }
// 
//     public void setUsername(String username) {
//         this.username = username;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     public String getFirstname() {
//         return firstname;
//     }
// 
//     public void setFirstname(String firstname) {
//         this.firstname = firstname;
//     }
// 
//     public String getLastname() {
//         return lastname;
//     }
// 
//     public void setLastname(String lastname) {
//         this.lastname = lastname;
//     }
// 
//     public Integer getAge() {
//         return age;
//     }
// 
//     public void setAge(Integer age) {
//         this.age = age;
//     }
// 
//     public Double getSalary() {
//         return salary;
//     }
// 
//     public void setSalary(Double salary) {
//         this.salary = salary;
//     }
// 
//     public Date getCreatedAt() {
//         return createdAt;
//     }
// 
//     public void setCreatedAt(Date createdAt) {
//         this.createdAt = createdAt;
//     }
// 
//     public List<Project> getProjects() {
//         return projects;
//     }
// 
//     public void setProjects(List<Project> projects) {
//         this.projects = projects;
//     }
// }


import java.util.ArrayList;
import java.util.Date;
import java.util.Set;
import com.kumuluz.ee.beanvalidation.test.beans.Project;
import com.kumuluz.ee.beanvalidation.test.beans.User;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;
/*
 *  Copyright (c) 2014-2017 Kumuluz and/or its affiliates
 *  and other contributors as indicated by the @author tags and
 *  the contributor list.
 *
 *  Licensed under the MIT License (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  https://opensource.org/licenses/MIT
 *
 *  The software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or
 *  implied, including but not limited to the warranties of merchantability,
 *  fitness for a particular purpose and noninfringement. in no event shall the
 *  authors or copyright holders be liable for any claim, damages or other
 *  liability, whether in an action of contract, tort or otherwise, arising from,
 *  out of or in connection with the software or the use or other dealings in the
 *  software. See the License for the specific language governing permissions and
 *  limitations under the License.
*/
package com.kumuluz.ee.beanvalidation.test;



/**
 * @author Tilen
 */
public class HibernateValidatorTest {

    private static Validator validator;

    @BeforeClass
    public static void setUp() {
        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
        validator = factory.getValidator();
    }

    @Test
    public void testCorrectEntities() {

// Path: components/bean-validation/hibernate-validator/src/test/java/com/kumuluz/ee/beanvalidation/test/beans/Project.java
// public class Project {
// 
//     @NotNull
//     @Size(min = 2, max = 30)
//     private String name;
// 
//     @Size(min = 1, max = 3000)
//     private String description;
// 
//     @NotNull
//     private User user;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     public User getUser() {
//         return user;
//     }
// 
//     public void setUser(User user) {
//         this.user = user;
//     }
// }
// 
// Path: components/bean-validation/hibernate-validator/src/test/java/com/kumuluz/ee/beanvalidation/test/beans/User.java
// public class User {
// 
//     @NotNull
//     @Size(min = 2, max = 30)
//     private String username;
// 
//     @NotNull
//     @Email
//     private String email;
// 
//     @Size(min = 2, max = 20)
//     private String firstname;
// 
//     @Size(min = 2, max = 20)
//     private String lastname;
// 
//     @NotNull
//     @Min(0)
//     private Integer age;
// 
//     @NotNull
//     @Min(0)
//     private Double salary;
// 
//     @NotNull
//     private Date createdAt;
// 
//     @Valid
//     private List<Project> projects;
// 
//     public String getUsername() {
//         return username;
//     }
// 
//     public void setUsername(String username) {
//         this.username = username;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     public String getFirstname() {
//         return firstname;
//     }
// 
//     public void setFirstname(String firstname) {
//         this.firstname = firstname;
//     }
// 
//     public String getLastname() {
//         return lastname;
//     }
// 
//     public void setLastname(String lastname) {
//         this.lastname = lastname;
//     }
// 
//     public Integer getAge() {
//         return age;
//     }
// 
//     public void setAge(Integer age) {
//         this.age = age;
//     }
// 
//     public Double getSalary() {
//         return salary;
//     }
// 
//     public void setSalary(Double salary) {
//         this.salary = salary;
//     }
// 
//     public Date getCreatedAt() {
//         return createdAt;
//     }
// 
//     public void setCreatedAt(Date createdAt) {
//         this.createdAt = createdAt;
//     }
// 
//     public List<Project> getProjects() {
//         return projects;
//     }
// 
//     public void setProjects(List<Project> projects) {
//         this.projects = projects;
//     }
// }


// Path: components/bean-validation/hibernate-validator/src/test/java/com/kumuluz/ee/beanvalidation/test/HibernateValidatorTest.java
import java.util.ArrayList;
import java.util.Date;
import java.util.Set;
import com.kumuluz.ee.beanvalidation.test.beans.Project;
import com.kumuluz.ee.beanvalidation.test.beans.User;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;

/*
 *  Copyright (c) 2014-2017 Kumuluz and/or its affiliates
 *  and other contributors as indicated by the @author tags and
 *  the contributor list.
 *
 *  Licensed under the MIT License (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  https://opensource.org/licenses/MIT
 *
 *  The software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or
 *  implied, including but not limited to the warranties of merchantability,
 *  fitness for a particular purpose and noninfringement. in no event shall the
 *  authors or copyright holders be liable for any claim, damages or other
 *  liability, whether in an action of contract, tort or otherwise, arising from,
 *  out of or in connection with the software or the use or other dealings in the
 *  software. See the License for the specific language governing permissions and
 *  limitations under the License.
*/
package com.kumuluz.ee.beanvalidation.test;



/**
 * @author Tilen
 */
public class HibernateValidatorTest {

    private static Validator validator;

    @BeforeClass
    public static void setUp() {
        ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
        validator = factory.getValidator();
    }

    @Test
    public void testCorrectEntities() {

        Project p1 = new Project();