aboutsummaryrefslogtreecommitdiffstats
path: root/messagebus/src/test/java/com/yahoo/messagebus/test/SimpleMessageTestCase.java
blob: cd4d492270f728c5cd73214a88b332fb78f2f43b (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.messagebus.test;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 * @author Simon Thoresen Hult
 */
public class SimpleMessageTestCase {

    @Test
    void requireThatAccessorsWork() {
        SimpleMessage msg = new SimpleMessage("foo");
        assertEquals(SimpleProtocol.MESSAGE, msg.getType());
        assertEquals(SimpleProtocol.NAME, msg.getProtocol());
        assertEquals(3, msg.getApproxSize());
        assertEquals("foo", msg.getValue());
        msg.setValue("bar");
        assertEquals("bar", msg.getValue());
    }

}