Author has a name and an email
This commit is contained in:
parent
5c3a319b19
commit
ab174f5eeb
2 changed files with 12 additions and 8 deletions
|
@ -1,13 +1,17 @@
|
|||
package net.kemitix.gitdb;
|
||||
|
||||
import net.kemitix.mon.TypeAlias;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
public class Author extends TypeAlias<String> {
|
||||
protected Author(String value) {
|
||||
super(value);
|
||||
}
|
||||
@RequiredArgsConstructor
|
||||
public class Author {
|
||||
|
||||
public static Author name(final String name) {
|
||||
return new Author(name);
|
||||
@Getter
|
||||
private final String name;
|
||||
@Getter
|
||||
private final String email;
|
||||
|
||||
public static Author name(final String name, final String email) {
|
||||
return new Author(name, email);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class GitDBTest {
|
|||
private final Branch master = Branch.name("master");
|
||||
private final Message message = Message.message(UUID.randomUUID().toString());
|
||||
private final Key key = Key.name(UUID.randomUUID().toString());
|
||||
private final Author author = Author.name("junit");
|
||||
private final Author author = Author.name("junit", "gitdb@kemitix.net");
|
||||
|
||||
GitDBTest() throws IOException, GitAPIException {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue