aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/test/java/com/yahoo/document/datatypes/UriFieldValueTest.java
blob: 6aacb79f714385c95f63d0477b88ab057228ab05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.document.datatypes;

import org.junit.Test;

import java.net.URI;

import static org.junit.Assert.assertEquals;

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

    @Test
    public void requireThatURICanBeAssigned() {
        UriFieldValue value = new UriFieldValue();
        String uri = "http://user:pass@localhost:69/path#fragment?query";
        value.assign(URI.create(uri));
        assertEquals(uri, value.getWrappedValue());
    }
}