Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
fixed edit profile request builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Taz03 committed Nov 12, 2023
1 parent 765a70e commit 9e337ab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public final class EditProfileTest {

@Test
public void editProfileTest() throws Exception {
EditProfileRequest request = new EditProfileRequest(user.username(), "JIA", "JIA test bio [edit profile request]", "", false, user.phoneNumber(), user.email());
EditProfileRequest request = new EditProfileRequest.EditProfileRequestBuilder()
.setPhoneNumber(user.phoneNumber())
.setEmail(user.email())
.setBiography("JIA test bio [edit profile request]")
EditProfileRequest request = new EditProfileRequest(user.username(), "JIA", , "", false, user.phoneNumber(), user.email());
UserResponse response = client.sendRequest(request).get();

assertEquals("ok", response.getStatus());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,39 @@ public static class EditProfileRequestBuilder {
private String phoneNumber;
private String email;

public void setUsername(String username) {
public EditProfileRequestBuilder setUsername(String username) {
this.username = username;
return this;
}

public void setName(String name) {
public EditProfileRequestBuilder setName(String name) {
this.name = name;
return this;
}

public void setBiography(String biography) {
public EditProfileRequestBuilder setBiography(String biography) {
this.biography = biography;
return this;
}

public void setExternalUrl(String externalUrl) {
public EditProfileRequestBuilder setExternalUrl(String externalUrl) {
this.externalUrl = externalUrl;
return this;
}

public void setShowFbLinkOnProfile(Boolean showFbLinkOnProfile) {
public EditProfileRequestBuilder setShowFbLinkOnProfile(Boolean showFbLinkOnProfile) {
this.showFbLinkOnProfile = showFbLinkOnProfile;
return this;
}

public void setPhoneNumber(String phoneNumber) {
public EditProfileRequestBuilder setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
return this;
}

public void setEmail(String email) {
public EditProfileRequestBuilder setEmail(String email) {
this.email = email;
return this;
}

public EditProfileRequest build() {
Expand Down

0 comments on commit 9e337ab

Please sign in to comment.