Skip to content

Commit

Permalink
chore: remove test code
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeadi committed Oct 4, 2024
1 parent 86731ff commit 1ce060d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 40 deletions.
36 changes: 36 additions & 0 deletions src/main/java/io/getstream/core/models/APIError.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package io.getstream.core.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class APIError {
private String Code;
private String Message;
private String Status;

public String toString() {
return "{Code='" + Code + "', Message=" + Message + "}";
}
// Default constructor
public APIError() {}

// Constructor with parameters
@JsonCreator
public APIError(
@JsonProperty("code") String code,
@JsonProperty("message") String message,
@JsonProperty("status") String status) {
this.Code = code;
this.Message = message;
this.Status = status;
}

// Getters
public String getCode() {
return Code;
}

public String getMessage() {
return Message;
}
}
28 changes: 0 additions & 28 deletions src/main/java/io/getstream/core/models/ModerationResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,3 @@ public String getOriginFeed() {
return OriginFeed;
}
}
class APIError {
private String Code;
private String Message;
private String Status;

// Default constructor
public APIError() {}

// Constructor with parameters
@JsonCreator
public APIError(
@JsonProperty("code") String code,
@JsonProperty("message") String message,
@JsonProperty("status") String status) {
this.Code = code;
this.Message = message;
this.Status = status;
}

// Getters
public String getCode() {
return Code;
}

public String getMessage() {
return Message;
}
}
14 changes: 2 additions & 12 deletions src/test/java/io/getstream/client/ModerationClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,7 @@ public class ModerationClientTest {
Client client;
@Before
public void setUp()throws Exception {
client= Client.builder(apiKey, secret).build();
}
public static String addSpacesAfterEachChar(String str) {
StringBuilder stringBuilder = new StringBuilder(); // Using StringBuilder for efficiency

for (int i = 0; i < str.length(); i++) {
stringBuilder.append(str.charAt(i)); // Append the character
stringBuilder.append(' '); // Append a space
}

return stringBuilder.toString().trim(); // Convert to string and remove the trailing space
client = Client.builder(apiKey, secret).build();
}
@Test
public void testFlagUser() throws Exception {
Expand Down Expand Up @@ -122,7 +112,7 @@ public void testActivityModeratedReactions() throws Exception {
kind("like").
activityID(activityResponse.getID()).
userID("user123").
extraField("p","pissoar").
extraField("text","pissoar").
moderationTemplate("moderation_template_reaction").
build();

Expand Down

0 comments on commit 1ce060d

Please sign in to comment.