Skip to content

Commit

Permalink
remove logs from samples
Browse files Browse the repository at this point in the history
  • Loading branch information
James Robertson authored and James Robertson committed Nov 14, 2022
1 parent 33c27cd commit 643d5f3
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 30 deletions.
8 changes: 4 additions & 4 deletions samples/announcements/src/main/java/Announcements.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class User {
String apiToken;
UserApi apiInstance;
public User(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new UserApi(defaultClient);
apiToken = Config.apiToken;

Expand Down Expand Up @@ -170,7 +170,7 @@ class Announcement {
AnnouncementApi apiInstance;

public Announcement(ApiClient defaultClient) {
System.out.println("constructor");

apiInstance = new AnnouncementApi(defaultClient);
apiToken = Config.apiToken;
}
Expand All @@ -192,11 +192,11 @@ public ScheduleAnnouncementResponse scheduleAnnouncement(String message, String
scheduleAnnouncementData.targetList(targetList);
scheduleAnnouncementData.targetChannelType(channelType);

System.out.println(scheduleAnnouncementData);
scheduleAnnouncementData);

try {
ScheduleAnnouncementResponse result = apiInstance.scheduleAnnouncement().apiToken(apiToken).scheduleAnnouncementData(scheduleAnnouncementData).execute();
System.out.println(result);
result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#scheduleAnnouncement");
System.err.println("Status code: " + e.getCode());
Expand Down
4 changes: 2 additions & 2 deletions samples/announcements/src/test/java/AnnouncementsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void testSendAnnouncement() {

@AfterAll
public static void tearDown() {
System.out.println("AbstractBaseTest.tearDown");
"AbstractBaseTest.tearDown");

ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-"+Config.appId+".sendbird.com");
Expand All @@ -34,7 +34,7 @@ public static void tearDown() {
}

GcListChannelsResponse groupChannelResponse = groupChannel.listChannels("SB::test-gc::Java::e2e::");
System.out.println(groupChannelResponse);
groupChannelResponse);

for (int i = 0; i < groupChannelResponse.getChannels().size(); i++) {
String channelUrlToDelete = groupChannelResponse.getChannels().get(i).getChannelUrl();
Expand Down
4 changes: 2 additions & 2 deletions samples/authentication/src/main/java/Authentication.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void generateSessionToken(){

SendBirdUser createUserResultA = user.createUser();
CreateUserTokenResponse result = user.createSessionToken(createUserResultA.getUserId());
System.out.println(result);
result);
}
}

Expand All @@ -23,7 +23,7 @@ class User {
String apiToken;
UserApi apiInstance;
public User(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new UserApi(defaultClient);
apiToken = Config.apiToken;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void testGenerateSessionToken() {

@AfterAll
public static void tearDown() {
System.out.println("AbstractBaseTest.tearDown");
"AbstractBaseTest.tearDown");
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-"+Config.appId+".sendbird.com");
User user = new User(defaultClient);
Expand Down
6 changes: 3 additions & 3 deletions samples/message-count/src/main/java/MessageCount.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public BigDecimal countUnreadMessages(){
SendBirdMessageResponse result = message.sendMessage("group_channels",createChannelResult.getChannelUrl(), createUserResultB.getUserId(), "yo", "MESG");
GcViewNumberOfEachMembersUnreadMessagesResponse unreadMessages = message.membersUnreadMessageCount(createChannelResult.getChannelUrl(), createUserResultA.getUserId());

System.out.println(unreadMessages);
unreadMessages);
return unreadMessages.getUnread().get(createUserResultA.getUserId());
}
}
Expand Down Expand Up @@ -111,7 +111,7 @@ class User {
String apiToken;
UserApi apiInstance;
public User(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new UserApi(defaultClient);
apiToken = Config.apiToken;

Expand Down Expand Up @@ -188,7 +188,7 @@ public SendBirdMessageResponse sendMessage(String channelType, String channelUrl

try {
SendBirdMessageResponse result = apiInstance.sendMessage(channelType, channelUrl).apiToken(apiToken).sendMessageData(sendMessageData).execute();
System.out.println(result);
result);
return result;
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#sendMessage");
Expand Down
6 changes: 3 additions & 3 deletions samples/message-count/src/test/java/MessageCountTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class MessageCountTest {
void testCountUnreadMessages() {
MessageCount messageCount = new MessageCount();
BigDecimal unreadCount = messageCount.countUnreadMessages();
System.out.println(unreadCount);
unreadCount);
assertEquals(unreadCount, BigDecimal.ONE);

}

@AfterAll
public static void tearDown() {
System.out.println("AbstractBaseTest.tearDown");
"AbstractBaseTest.tearDown");
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-"+Config.appId+".sendbird.com");
User user = new User(defaultClient);
Expand All @@ -34,7 +34,7 @@ public static void tearDown() {

for (int i = 0; i < users.getUsers().size(); i++) {
String userIdToDelete = users.getUsers().get(i).getUserId();
System.out.println(userIdToDelete);
userIdToDelete);

user.deleteUserById(userIdToDelete);
}
Expand Down
10 changes: 5 additions & 5 deletions samples/moderation/src/main/java/Moderate.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class User {
String apiToken;
UserApi apiInstance;
public User(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new UserApi(defaultClient);
apiToken = Config.apiToken;

Expand Down Expand Up @@ -193,7 +193,7 @@ class Message {
String apiToken;
MessageApi apiInstance;
public Message(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new MessageApi(defaultClient);
apiToken = Config.apiToken;

Expand All @@ -210,7 +210,7 @@ public SendBirdMessageResponse sendMessage(String channelType, String channelUrl

try {
SendBirdMessageResponse result = apiInstance.sendMessage(channelType, channelUrl).apiToken(apiToken).sendMessageData(sendMessageData).execute();
System.out.println(result);
result);
return result;
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#sendMessage");
Expand All @@ -230,7 +230,7 @@ class Moderation {
String apiToken;
ModerationApi apiInstance;
public Moderation(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new ModerationApi(defaultClient);
apiToken = Config.apiToken;

Expand Down Expand Up @@ -258,7 +258,7 @@ class Report {
String apiToken;
ReportApi apiInstance;
public Report(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new ReportApi(defaultClient);
apiToken = Config.apiToken;

Expand Down
4 changes: 2 additions & 2 deletions samples/moderation/src/test/java/ModerationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void testReportMessage() {

@AfterAll
public static void tearDown() {
System.out.println("AbstractBaseTest.tearDown");
"AbstractBaseTest.tearDown");
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-"+Config.appId+".sendbird.com");
User user = new User(defaultClient);
Expand All @@ -38,7 +38,7 @@ public static void tearDown() {
}

GcListChannelsResponse groupChannelResponse = groupChannel.listChannels("SB::test-gc::Java::e2e::");
System.out.println(groupChannelResponse);
groupChannelResponse);

for (int i = 0; i < groupChannelResponse.getChannels().size(); i++) {
String channelUrlToDelete = groupChannelResponse.getChannels().get(i).getChannelUrl();
Expand Down
12 changes: 6 additions & 6 deletions samples/send-messages/src/main/java/SendMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void sendFileMessage(){
// active premium in Sendbird dashboard
SendBirdMessageResponse result = message.sendFileMessage("group_channels",createChannelResult.getChannelUrl(),createUserResultA.getUserId(), "yo", "FILE");

System.out.println("send announcment");
"send announcment");

}
}
Expand Down Expand Up @@ -107,7 +107,7 @@ class User {
String apiToken;
UserApi apiInstance;
public User(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new UserApi(defaultClient);
apiToken = Config.apiToken;

Expand Down Expand Up @@ -137,7 +137,7 @@ class Message {
String apiToken;
MessageApi apiInstance;
public Message(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new MessageApi(defaultClient);
apiToken = Config.apiToken;

Expand All @@ -151,11 +151,11 @@ public SendBirdMessageResponse sendMessage(String channelType, String channelUrl
sendMessageData.userId(userId);
sendMessageData.message(message);
sendMessageData.messageType(messageType);
System.out.println(sendMessageData);
sendMessageData);

try {
SendBirdMessageResponse result = apiInstance.sendMessage(channelType, channelUrl).apiToken(apiToken).sendMessageData(sendMessageData).execute();
System.out.println(result);
result);
return result;
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#sendMessage");
Expand All @@ -180,7 +180,7 @@ public SendBirdMessageResponse sendFileMessage(String channelType, String channe

try {
SendBirdMessageResponse result = apiInstance.sendMessage(channelType, channelUrl).apiToken(apiToken).sendMessageData(sendMessageData).execute();
System.out.println(result);
result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#sendMessage");
System.err.println("Status code: " + e.getCode());
Expand Down
2 changes: 1 addition & 1 deletion samples/user-management/src/main/java/UserManagement.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class User {
String apiToken;
UserApi apiInstance;
public User(ApiClient defaultClient){
System.out.println("constructor");

apiInstance = new UserApi(defaultClient);
apiToken = Config.apiToken;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void testManageUser() {
UserManagement users = new UserManagement();
SendBirdUser user = users.manageUser();

System.out.println(user);
user);
assertEquals(user.getNickname(), "updated-nickname");
}

Expand Down

0 comments on commit 643d5f3

Please sign in to comment.