Passed
Push — master ( 7072a0...7d8832 )
by Kunal
03:50
created

testTeamCreate()   A

Complexity

Conditions 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 2
1
package com.base.Services;
2
3
import com.base.AbstractBaseTest;
4
import com.base.Exceptions.BaseHttpException;
5
import com.base.Exceptions.ChannelNotFound;
6
import com.base.Http.Server.Responses.Thread.CreateChannelThreadResponse;
7
import com.base.Models.Thread;
8
import org.junit.Assert;
9
import org.junit.Test;
10
11
public class ThreadServiceTest extends AbstractBaseTest {
12
13
    /**
14
     * Test case for Create Team
15
     *
16
     * @throws BaseHttpException
17
     */
18
    @Test
19
    public void testTeamCreate() {
20
        try {
21
            Thread thread = this.base.threadService().addChannelThread(CreateChannelThreadResponse.VALID_TEAM_SLUG,
22
                    CreateChannelThreadResponse.VALID_CHANNEL_SLUG,
23
                    CreateChannelThreadResponse.VALID_SUBJECT,
24
                    CreateChannelThreadResponse.VALID_DESCRIPTION);
25
            Assert.assertEquals(thread.getSubject(), CreateChannelThreadResponse.VALID_SUBJECT);
26
            Assert.assertEquals(thread.getDescription(), CreateChannelThreadResponse.VALID_DESCRIPTION);
27
            Assert.assertEquals(thread.getId(), CreateChannelThreadResponse.VALID_ID);
28
        } catch (BaseHttpException | ChannelNotFound e) {
29
            Assert.fail(e.getMessage());
30
        }
31
32
    }
33
}
34