summaryrefslogtreecommitdiffstats
path: root/document/src/test/java/com/yahoo/document/TemporaryStructuredDataTypeTestCase.java
blob: 431d4d9746cb262bb6bbcb8f17f87933eb564a1d (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 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.document;

import org.junit.Test;

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

/**
 * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
 * @since 5.1.10
 */
public class TemporaryStructuredDataTypeTestCase {
    @Test
    public void basic() {
        TemporaryStructuredDataType type = TemporaryStructuredDataType.create("banana");
        assertEquals("banana", type.getName());
        int originalId = type.getId();
        type.setName("apple");
        assertEquals("apple", type.getName());
        assertNotEquals(originalId, type.getId());
    }
}