Skip to content

Commit

Permalink
#1365 type for MkUser
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 15, 2018
1 parent f695b5d commit 9298f36
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/main/java/com/jcabi/github/mock/MkUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,20 @@ final class MkUser implements User {
* @param login User to login
* @throws IOException If there is any I/O problem
*/
MkUser(
final MkStorage stg,
final String login
) throws IOException {
MkUser(final MkStorage stg, final String login) throws IOException {
this.storage = stg;
this.self = login;
this.storage.apply(
new Directives().xpath(
String.format("/github/users[not(user[login='%s'])]", login)
).add("user").add("login").set(login)
new Directives()
.xpath(
String.format(
"/github/users[not(user[login='%s'])]", login
)
)
.add("user")
.add("login").set(login).up()
.add("type").set("User").up()
.add("name").set(login).up()
);
}

Expand Down

0 comments on commit 9298f36

Please sign in to comment.