This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
driver.get("http://localhost/series/add"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>sonar-maven-plugin</artifactId> | |
<version>2.0</version> | |
<dependencies> | |
<dependency> | |
<groupId>mysql</groupId> | |
<artifactId>mysql-connector-java</artifactId> | |
<version>5.1.21</version> | |
</dependency> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mkyong.zip; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipInputStream; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test(dataProvider = "invalidEmails") | |
public void emailShouldBeValid(final String invalidEmail, final String expectedMessage) { | |
page.registerUser(invalidEmail); | |
assertThat(page).field("email").hasError(expectedMessage); | |
} | |
@DataProvider(name = "invalidEmails") | |
public Object[][] getInvalidEmails() { | |
final String expectedErrorMessage = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "countries") | |
@Getter | |
@Setter | |
public class Country { | |
public static final int NAME_LENGTH = 50; | |
@Id | |
@GeneratedValue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.mystamps.web.validation.jsr303; | |
import java.lang.annotation.Documented; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
import javax.validation.ReportAsSingleViolation; | |
import javax.validation.constraints.Pattern; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.EntityListeners; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
import javax.persistence.Table; | |
import javax.persistence.Temporal; | |
import javax.persistence.TemporalType; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Function<Entity, Integer> INVOKE_GET_ID = | |
new Function<Entity, Integer>() { | |
@Override | |
public Integer apply(final Entity entity) { | |
return entity.getId(); | |
} | |
}; | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Language { | |
private int id; | |
private String name; | |
private String locale; | |
public Language(final int id, final String name, final String locale) { | |
this.id = id; | |
this.name = name; | |
this.locale = locale; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Size.List({ | |
@Size(min = COUNTRY_MIN_LENGTH, message = "{value.too-short}"), | |
@Size(max = COUNTRY_MAX_LENGTH, message = "{value.too-long}") | |
}) | |
private String country; |