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

import org.junit.Test;

import java.util.Arrays;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

public class PortInfoTest {
    @Test
    public void testEquals() {
        PortInfo a = new PortInfo(1234, Arrays.asList("foo"));
        PortInfo b = new PortInfo(1234, Arrays.asList("foo"));
        PortInfo c = new PortInfo(1234, Arrays.asList("foo", "bar"));
        PortInfo d = new PortInfo(12345, Arrays.asList("foo"));
        assertEquals(a, b);
        assertNotEquals(a, c);
        assertNotEquals(a, d);
        assertNotEquals(c, d);
    }
}