Fix asStringValue on IdType
This commit is contained in:
parent
a7026ca51d
commit
0eca8d14ba
|
@ -409,6 +409,11 @@ public final class IdType extends UriType implements IPrimitiveType<String>, IId
|
|||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asStringValue() {
|
||||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersionIdPart() {
|
||||
return myUnqualifiedVersionId;
|
||||
|
|
|
@ -387,6 +387,11 @@ public final class IdType extends UriType implements IPrimitiveType<String>, IId
|
|||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asStringValue() {
|
||||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersionIdPart() {
|
||||
return myUnqualifiedVersionId;
|
||||
|
|
|
@ -384,6 +384,11 @@ public final class IdType extends UriType implements IPrimitiveType<String>, IId
|
|||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asStringValue() {
|
||||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersionIdPart() {
|
||||
return myUnqualifiedVersionId;
|
||||
|
|
|
@ -495,6 +495,11 @@ public final class IdType extends UriType implements IPrimitiveType<String>, IId
|
|||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asStringValue() {
|
||||
return getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value
|
||||
* <p>
|
||||
|
|
|
@ -493,6 +493,11 @@ public final class IdType extends UriType implements IPrimitiveType<String>, IId
|
|||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asStringValue() {
|
||||
return getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value
|
||||
* <p>
|
||||
|
|
|
@ -493,6 +493,11 @@ public final class IdType extends UriType implements IPrimitiveType<String>, IId
|
|||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asStringValue() {
|
||||
return getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value
|
||||
* <p>
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package org.hl7.fhir.r5.model;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class IdTypeTest {
|
||||
|
||||
@Test
|
||||
public void testAsString() {
|
||||
IdType t = new IdType("Patient/123");
|
||||
assertEquals("Patient/123", t.asStringValue());
|
||||
assertEquals("Patient/123", t.getValueAsString());
|
||||
assertEquals("Patient/123", t.getValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAsStringFromComponentParts() {
|
||||
IdType t = new IdType("http://foo", "Patient", "123", "1");
|
||||
assertEquals("http://foo/Patient/123/_history/1", t.asStringValue());
|
||||
assertEquals("http://foo/Patient/123/_history/1", t.getValueAsString());
|
||||
assertEquals("http://foo/Patient/123/_history/1", t.getValue());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue