-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
201 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
88 changes: 88 additions & 0 deletions
88
junit5/src/test/java/com/github/dbunit/rules/junit5/model/Tweet.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package com.github.dbunit.rules.junit5.model; | ||
|
||
import javax.persistence.*; | ||
import javax.validation.constraints.Size; | ||
|
||
import org.hibernate.annotations.GenericGenerator; | ||
|
||
import java.util.Calendar; | ||
|
||
/** | ||
* Created by pestano on 22/07/15. | ||
*/ | ||
@Entity | ||
public class Tweet { | ||
|
||
@Id | ||
@GeneratedValue(generator = "uuid") | ||
@GenericGenerator(name = "uuid", strategy = "uuid2") | ||
private String id; | ||
|
||
@Size(min = 1, max = 140) | ||
private String content; | ||
|
||
private Integer likes; | ||
|
||
@Temporal(TemporalType.TIMESTAMP) | ||
private Calendar date; | ||
|
||
@ManyToOne | ||
User user; | ||
|
||
public String getContent() { | ||
return content; | ||
} | ||
|
||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
public Integer getLikes() { | ||
return likes; | ||
} | ||
|
||
public void setLikes(Integer likes) { | ||
this.likes = likes; | ||
} | ||
|
||
|
||
public Calendar getDate() { | ||
return date; | ||
} | ||
|
||
public void setDate(Calendar date) { | ||
this.date = date; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public User getUser() { | ||
return user; | ||
} | ||
|
||
public void setUser(User user) { | ||
this.user = user; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
Tweet tweet = (Tweet) o; | ||
|
||
return !(id != null ? !id.equals(tweet.id) : tweet.id != null); | ||
|
||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return id != null ? id.hashCode() : 0; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
user: | ||
- id: 1 | ||
name: "@realpestano" | ||
- id: 2 | ||
name: "@dbunit" | ||
tweet: | ||
- id: abcdef12345 | ||
content: "dbunit rules!" | ||
date: "[DAY,NOW]" | ||
user_id: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
handlers = java.util.logging.ConsoleHandler | ||
|
||
|
||
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter | ||
|
||
com.github.dbunit.rules.level=FINE | ||
|
Oops, something went wrong.