aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/DataTypeTests.java
blob: 536e3189d1afd77b677f4127a6e204abd26255e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import com.pinapelz.datatypes.*;
import com.pinapelz.vtuber.Organization;
import org.junit.Test;

public class DataTypeTests {
    @Test
    public void testChannelComparison(){
        Channel channel = new Channel();
        channel.name = "test";
        assert(channel.name.equals("test"));
        Channel channel2 = new Channel();
        channel2.name = "test";
        assert(channel.equals(channel2));
        Channel channel3 = new Channel();
        channel3.name = "test2";
        assert(!channel.equals(channel3));
    }

    @Test
    public void testCommentComparison(){
        Comment comment = new Comment();
        comment.comment_key = "test";
        assert(comment.comment_key.equals("test"));
        Comment comment2 = new Comment();
        comment2.comment_key = "test";
        assert(comment.equals(comment2));
        Comment comment3 = new Comment();
        comment3.comment_key = "test2";
        assert(!comment.equals(comment3));
    }

    @Test
    public void testVideoComparison(){
        Video video = new Video();
        video.title = "test";
        assert(video.title.equals("test"));
        Video video2 = new Video();
        video2.title = "test";
        assert(video.equals(video2));
        Video video3 = new Video();
        video3.title = "test2";
        assert(!video.equals(video3));
    }

    @Test
    public void testVideoSearchResultComparison(){
        VideoSearchResult videoSearchResult = new VideoSearchResult();
        videoSearchResult.total = 1;
        assert(videoSearchResult.total == 1);
        VideoSearchResult videoSearchResult2 = new VideoSearchResult();
        videoSearchResult2.total = 1;
        assert(videoSearchResult.equals(videoSearchResult2));
        VideoSearchResult videoSearchResult3 = new VideoSearchResult();
        videoSearchResult3.total = 2;
        assert(!videoSearchResult.equals(videoSearchResult3));
    }

    @Test
    public void testComparisonOrganiationEnum(){
        assert Organization.HOLOLIVE.isOrg("Hololive");
    }

}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage