Issue 602 (#607)

* r5 changes

* r4 changes

* dstu3 changes

* dstu2 changes

* updating release notes
This commit is contained in:
Mark Iantorno 2021-09-27 14:04:59 -04:00 committed by GitHub
parent 3db881a93b
commit ad18e131d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
88 changed files with 3812 additions and 401 deletions

View File

@ -0,0 +1 @@
* https://github.com/hapifhir/org.hl7.fhir.core/issues/602

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.dstu2.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -100,7 +100,10 @@ public class IntegerType extends PrimitiveType<Integer> implements IBaseIntegerD
@Override
public IntegerType copy() {
return new IntegerType(getValue());
Integer value = getValue();
IntegerType ret = value == null ? new IntegerType() : new IntegerType(value);
copyValues(ret);
return ret;
}
public String fhirType() {

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.dstu2.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -88,7 +88,9 @@ public class PositiveIntType extends IntegerType {
@Override
public PositiveIntType copy() {
return new PositiveIntType(getValue());
PositiveIntType ret = getValue() == null ? new PositiveIntType() : new PositiveIntType(getValue());
copyValues(ret);
return ret;
}
public String fhirType() {

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.dstu2.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -89,7 +89,10 @@ public class UnsignedIntType extends IntegerType {
@Override
public UnsignedIntType copy() {
return new UnsignedIntType(getValue());
Integer value = getValue();
UnsignedIntType ret = value == null ? new UnsignedIntType() : new UnsignedIntType(value.intValue());
copyValues(ret);
return ret;
}
public String fhirType() {

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class Base64BinaryTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
Base64BinaryType nullBase64 = new Base64BinaryType();
System.out.println("Value -> " + nullBase64);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsDeep(validBase64));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsShallow(validBase64));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = nullBase64.copy();
Assertions.assertNull(copyBase64.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = (Base64BinaryType) nullBase64.typedCopy();
Assertions.assertNull(copyBase64.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class BooleanTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
BooleanType nullBoolean = new BooleanType();
System.out.println("Value -> " + nullBoolean);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsDeep(validBoolean));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsShallow(validBoolean));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = nullBoolean.copy();
Assertions.assertNull(copyBoolean.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = (BooleanType) nullBoolean.typedCopy();
Assertions.assertNull(copyBoolean.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class CodeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
CodeType nullCode = new CodeType();
System.out.println("Value -> " + nullCode);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsDeep(validCode));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsShallow(validCode));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
CodeType nullCode = new CodeType();
CodeType copyCode = nullCode.copy();
Assertions.assertNull(copyCode.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
CodeType nullCode = new CodeType();
CodeType copyCode = (CodeType) nullCode.typedCopy();
Assertions.assertNull(copyCode.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateTimeType nullDateTime = new DateTimeType();
System.out.println("Value -> " + nullDateTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsDeep(validDateTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsShallow(validDateTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = nullDateTime.copy();
Assertions.assertNull(copyDateTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = (DateTimeType) nullDateTime.typedCopy();
Assertions.assertNull(copyDateTime.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateType nullDate = new DateType();
System.out.println("Value -> " + nullDate);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsDeep(validDate));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsShallow(validDate));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateType nullDate = new DateType();
DateType copyDate = nullDate.copy();
Assertions.assertNull(copyDate.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateType nullDate = new DateType();
DateType copyDate = (DateType) nullDate.typedCopy();
Assertions.assertNull(copyDate.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DecimalTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DecimalType nullDecimal = new DecimalType();
System.out.println("Value -> " + nullDecimal);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsDeep(validDecimal));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsShallow(validDecimal));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = nullDecimal.copy();
Assertions.assertNull(copyDecimal.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = (DecimalType) nullDecimal.typedCopy();
Assertions.assertNull(copyDecimal.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IdTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IdType nullId = new IdType();
System.out.println("Value -> " + nullId);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsDeep(validId));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsShallow(validId));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IdType nullId = new IdType();
IdType copyId = nullId.copy();
Assertions.assertNull(copyId.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IdType nullId = new IdType();
IdType copyId = (IdType) nullId.typedCopy();
Assertions.assertNull(copyId.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class InstantTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
InstantType nullInstant = new InstantType();
System.out.println("Value -> " + nullInstant);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsDeep(validInstant));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsShallow(validInstant));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = nullInstant.copy();
Assertions.assertNull(copyInstant.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = (InstantType) nullInstant.typedCopy();
Assertions.assertNull(copyInstant.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IntegerTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IntegerType nullInteger = new IntegerType();
System.out.println("Value -> " + nullInteger);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsDeep(validInteger));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsShallow(validInteger));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = nullInteger.copy();
Assertions.assertNull(copyInteger.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = (IntegerType) nullInteger.typedCopy();
Assertions.assertNull(copyInteger.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class MarkdownTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
MarkdownType nullMarkdown = new MarkdownType();
System.out.println("Value -> " + nullMarkdown);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsDeep(validMarkdown));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsShallow(validMarkdown));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = nullMarkdown.copy();
Assertions.assertNull(copyMarkdown.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = (MarkdownType) nullMarkdown.typedCopy();
Assertions.assertNull(copyMarkdown.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class OidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
OidType nullOid = new OidType();
System.out.println("Value -> " + nullOid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsDeep(validOid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsShallow(validOid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
OidType nullOid = new OidType();
OidType copyOid = nullOid.copy();
Assertions.assertNull(copyOid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
OidType nullOid = new OidType();
OidType copyOid = (OidType) nullOid.typedCopy();
Assertions.assertNull(copyOid.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class PositiveIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
PositiveIntType nullPositiveInt = new PositiveIntType();
System.out.println("Value -> " + nullPositiveInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsDeep(validPositiveInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsShallow(validPositiveInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = nullPositiveInt.copy();
Assertions.assertNull(copyPositiveInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = (PositiveIntType) nullPositiveInt.typedCopy();
Assertions.assertNull(copyPositiveInt.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class StringTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
StringType nullString = new StringType();
System.out.println("Value -> " + nullString);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsDeep(validString));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsShallow(validString));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
StringType nullString = new StringType();
StringType copyString = nullString.copy();
Assertions.assertNull(copyString.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
StringType nullString = new StringType();
StringType copyString = (StringType) nullString.typedCopy();
Assertions.assertNull(copyString.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class TimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
TimeType nullTime = new TimeType();
System.out.println("Value -> " + nullTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsDeep(validTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsShallow(validTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
TimeType nullTime = new TimeType();
TimeType copyTime = nullTime.copy();
Assertions.assertNull(copyTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
TimeType nullTime = new TimeType();
TimeType copyTime = (TimeType) nullTime.typedCopy();
Assertions.assertNull(copyTime.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UnsignedIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
System.out.println("Value -> " + nullUnsignedInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsDeep(validUnsignedInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsShallow(validUnsignedInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = nullUnsignedInt.copy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = (UnsignedIntType) nullUnsignedInt.typedCopy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UriTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UriType nullUri = new UriType();
System.out.println("Value -> " + nullUri);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsDeep(validUri));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsShallow(validUri));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UriType nullUri = new UriType();
UriType copyUri = nullUri.copy();
Assertions.assertNull(copyUri.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UriType nullUri = new UriType();
UriType copyUri = (UriType) nullUri.typedCopy();
Assertions.assertNull(copyUri.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu2.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UuidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UuidType nullUuid = new UuidType();
System.out.println("Value -> " + nullUuid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsDeep(validUuid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsShallow(validUuid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = nullUuid.copy();
Assertions.assertNull(copyUuid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = (UuidType) nullUuid.typedCopy();
Assertions.assertNull(copyUuid.getValue());
}
}

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.dstu3.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -93,7 +93,7 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
@Override
protected Type typedCopy() {
return null;
return copy();
}
public String fhirType() {

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.dstu3.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -101,7 +101,10 @@ public class IntegerType extends PrimitiveType<Integer> implements IBaseIntegerD
@Override
public IntegerType copy() {
return new IntegerType(getValue());
Integer value = getValue();
IntegerType ret = value == null ? new IntegerType() : new IntegerType(value);
copyValues(ret);
return ret;
}
public String fhirType() {

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.dstu3.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -88,7 +88,9 @@ public class PositiveIntType extends IntegerType {
@Override
public PositiveIntType copy() {
return new PositiveIntType(getValue());
PositiveIntType ret = getValue() == null ? new PositiveIntType() : new PositiveIntType(getValue());
copyValues(ret);
return ret;
}
public String fhirType() {

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.dstu3.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -89,7 +89,10 @@ public class UnsignedIntType extends IntegerType {
@Override
public UnsignedIntType copy() {
return new UnsignedIntType(getValue());
Integer value = getValue();
UnsignedIntType ret = value == null ? new UnsignedIntType() : new UnsignedIntType(value.intValue());
copyValues(ret);
return ret;
}
public String fhirType() {

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class Base64BinaryTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
Base64BinaryType nullBase64 = new Base64BinaryType();
System.out.println("Value -> " + nullBase64);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsDeep(validBase64));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsShallow(validBase64));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = nullBase64.copy();
Assertions.assertNull(copyBase64.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = (Base64BinaryType) nullBase64.typedCopy();
Assertions.assertNull(copyBase64.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class BooleanTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
BooleanType nullBoolean = new BooleanType();
System.out.println("Value -> " + nullBoolean);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsDeep(validBoolean));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsShallow(validBoolean));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = nullBoolean.copy();
Assertions.assertNull(copyBoolean.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = (BooleanType) nullBoolean.typedCopy();
Assertions.assertNull(copyBoolean.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class CodeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
CodeType nullCode = new CodeType();
System.out.println("Value -> " + nullCode);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsDeep(validCode));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsShallow(validCode));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
CodeType nullCode = new CodeType();
CodeType copyCode = nullCode.copy();
Assertions.assertNull(copyCode.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
CodeType nullCode = new CodeType();
CodeType copyCode = (CodeType) nullCode.typedCopy();
Assertions.assertNull(copyCode.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateTimeType nullDateTime = new DateTimeType();
System.out.println("Value -> " + nullDateTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsDeep(validDateTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsShallow(validDateTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = nullDateTime.copy();
Assertions.assertNull(copyDateTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = (DateTimeType) nullDateTime.typedCopy();
Assertions.assertNull(copyDateTime.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateType nullDate = new DateType();
System.out.println("Value -> " + nullDate);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsDeep(validDate));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsShallow(validDate));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateType nullDate = new DateType();
DateType copyDate = nullDate.copy();
Assertions.assertNull(copyDate.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateType nullDate = new DateType();
DateType copyDate = (DateType) nullDate.typedCopy();
Assertions.assertNull(copyDate.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DecimalTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DecimalType nullDecimal = new DecimalType();
System.out.println("Value -> " + nullDecimal);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsDeep(validDecimal));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsShallow(validDecimal));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = nullDecimal.copy();
Assertions.assertNull(copyDecimal.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = (DecimalType) nullDecimal.typedCopy();
Assertions.assertNull(copyDecimal.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IdTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IdType nullId = new IdType();
System.out.println("Value -> " + nullId);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsDeep(validId));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsShallow(validId));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IdType nullId = new IdType();
IdType copyId = nullId.copy();
Assertions.assertNull(copyId.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IdType nullId = new IdType();
IdType copyId = (IdType) nullId.typedCopy();
Assertions.assertNull(copyId.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class InstantTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
InstantType nullInstant = new InstantType();
System.out.println("Value -> " + nullInstant);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsDeep(validInstant));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsShallow(validInstant));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = nullInstant.copy();
Assertions.assertNull(copyInstant.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = (InstantType) nullInstant.typedCopy();
Assertions.assertNull(copyInstant.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IntegerTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IntegerType nullInteger = new IntegerType();
System.out.println("Value -> " + nullInteger);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsDeep(validInteger));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsShallow(validInteger));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = nullInteger.copy();
Assertions.assertNull(copyInteger.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = (IntegerType) nullInteger.typedCopy();
Assertions.assertNull(copyInteger.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class MarkdownTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
MarkdownType nullMarkdown = new MarkdownType();
System.out.println("Value -> " + nullMarkdown);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsDeep(validMarkdown));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsShallow(validMarkdown));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = nullMarkdown.copy();
Assertions.assertNull(copyMarkdown.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = (MarkdownType) nullMarkdown.typedCopy();
Assertions.assertNull(copyMarkdown.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class OidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
OidType nullOid = new OidType();
System.out.println("Value -> " + nullOid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsDeep(validOid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsShallow(validOid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
OidType nullOid = new OidType();
OidType copyOid = nullOid.copy();
Assertions.assertNull(copyOid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
OidType nullOid = new OidType();
OidType copyOid = (OidType) nullOid.typedCopy();
Assertions.assertNull(copyOid.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class PositiveIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
PositiveIntType nullPositiveInt = new PositiveIntType();
System.out.println("Value -> " + nullPositiveInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsDeep(validPositiveInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsShallow(validPositiveInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = nullPositiveInt.copy();
Assertions.assertNull(copyPositiveInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = (PositiveIntType) nullPositiveInt.typedCopy();
Assertions.assertNull(copyPositiveInt.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class StringTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
StringType nullString = new StringType();
System.out.println("Value -> " + nullString);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsDeep(validString));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsShallow(validString));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
StringType nullString = new StringType();
StringType copyString = nullString.copy();
Assertions.assertNull(copyString.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
StringType nullString = new StringType();
StringType copyString = (StringType) nullString.typedCopy();
Assertions.assertNull(copyString.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class TimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
TimeType nullTime = new TimeType();
System.out.println("Value -> " + nullTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsDeep(validTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsShallow(validTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
TimeType nullTime = new TimeType();
TimeType copyTime = nullTime.copy();
Assertions.assertNull(copyTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
TimeType nullTime = new TimeType();
TimeType copyTime = (TimeType) nullTime.typedCopy();
Assertions.assertNull(copyTime.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UnsignedIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
System.out.println("Value -> " + nullUnsignedInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsDeep(validUnsignedInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsShallow(validUnsignedInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = nullUnsignedInt.copy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = (UnsignedIntType) nullUnsignedInt.typedCopy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UriTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UriType nullUri = new UriType();
System.out.println("Value -> " + nullUri);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsDeep(validUri));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsShallow(validUri));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UriType nullUri = new UriType();
UriType copyUri = nullUri.copy();
Assertions.assertNull(copyUri.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UriType nullUri = new UriType();
UriType copyUri = (UriType) nullUri.typedCopy();
Assertions.assertNull(copyUri.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.dstu3.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UuidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UuidType nullUuid = new UuidType();
System.out.println("Value -> " + nullUuid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsDeep(validUuid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsShallow(validUuid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = nullUuid.copy();
Assertions.assertNull(copyUuid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = (UuidType) nullUuid.typedCopy();
Assertions.assertNull(copyUuid.getValue());
}
}

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r4.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -94,7 +94,7 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
@Override
protected Type typedCopy() {
return null;
return copy();
}
public String fhirType() {

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r4.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -101,7 +101,8 @@ public class IntegerType extends PrimitiveType<Integer> implements IBaseIntegerD
@Override
public IntegerType copy() {
IntegerType ret = new IntegerType(getValue());
Integer value = getValue();
IntegerType ret = value == null ? new IntegerType() : new IntegerType(value);
copyValues(ret);
return ret;
}

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r4.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -88,7 +88,7 @@ public class PositiveIntType extends IntegerType {
@Override
public PositiveIntType copy() {
PositiveIntType ret = new PositiveIntType(getValue());
PositiveIntType ret = getValue() == null ? new PositiveIntType() : new PositiveIntType(getValue());
copyValues(ret);
return ret;
}

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r4.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -89,7 +89,8 @@ public class UnsignedIntType extends IntegerType {
@Override
public UnsignedIntType copy() {
UnsignedIntType ret = new UnsignedIntType(getValue());
Integer value = getValue();
UnsignedIntType ret = value == null ? new UnsignedIntType() : new UnsignedIntType(value);
copyValues(ret);
return ret;
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class Base64BinaryTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
Base64BinaryType nullBase64 = new Base64BinaryType();
System.out.println("Value -> " + nullBase64);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsDeep(validBase64));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsShallow(validBase64));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = nullBase64.copy();
Assertions.assertNull(copyBase64.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = (Base64BinaryType) nullBase64.typedCopy();
Assertions.assertNull(copyBase64.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class BooleanTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
BooleanType nullBoolean = new BooleanType();
System.out.println("Value -> " + nullBoolean);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsDeep(validBoolean));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsShallow(validBoolean));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = nullBoolean.copy();
Assertions.assertNull(copyBoolean.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = (BooleanType) nullBoolean.typedCopy();
Assertions.assertNull(copyBoolean.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class CanonicalTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
CanonicalType nullCanonical = new CanonicalType();
System.out.println("Value -> " + nullCanonical);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType validCanonical = new CanonicalType("theValue");
Assertions.assertFalse(nullCanonical.equalsDeep(validCanonical));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType validCanonical = new CanonicalType("theValue");
Assertions.assertFalse(nullCanonical.equalsShallow(validCanonical));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType copyCanonical = nullCanonical.copy();
Assertions.assertNull(copyCanonical.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType copyCanonical = (CanonicalType) nullCanonical.typedCopy();
Assertions.assertNull(copyCanonical.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class CodeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
CodeType nullCode = new CodeType();
System.out.println("Value -> " + nullCode);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsDeep(validCode));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsShallow(validCode));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
CodeType nullCode = new CodeType();
CodeType copyCode = nullCode.copy();
Assertions.assertNull(copyCode.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
CodeType nullCode = new CodeType();
CodeType copyCode = (CodeType) nullCode.typedCopy();
Assertions.assertNull(copyCode.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateTimeType nullDateTime = new DateTimeType();
System.out.println("Value -> " + nullDateTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsDeep(validDateTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsShallow(validDateTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = nullDateTime.copy();
Assertions.assertNull(copyDateTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = (DateTimeType) nullDateTime.typedCopy();
Assertions.assertNull(copyDateTime.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateType nullDate = new DateType();
System.out.println("Value -> " + nullDate);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsDeep(validDate));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsShallow(validDate));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateType nullDate = new DateType();
DateType copyDate = nullDate.copy();
Assertions.assertNull(copyDate.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateType nullDate = new DateType();
DateType copyDate = (DateType) nullDate.typedCopy();
Assertions.assertNull(copyDate.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DecimalTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DecimalType nullDecimal = new DecimalType();
System.out.println("Value -> " + nullDecimal);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsDeep(validDecimal));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsShallow(validDecimal));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = nullDecimal.copy();
Assertions.assertNull(copyDecimal.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = (DecimalType) nullDecimal.typedCopy();
Assertions.assertNull(copyDecimal.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IdTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IdType nullId = new IdType();
System.out.println("Value -> " + nullId);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsDeep(validId));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsShallow(validId));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IdType nullId = new IdType();
IdType copyId = nullId.copy();
Assertions.assertNull(copyId.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IdType nullId = new IdType();
IdType copyId = (IdType) nullId.typedCopy();
Assertions.assertNull(copyId.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class InstantTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
InstantType nullInstant = new InstantType();
System.out.println("Value -> " + nullInstant);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsDeep(validInstant));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsShallow(validInstant));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = nullInstant.copy();
Assertions.assertNull(copyInstant.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = (InstantType) nullInstant.typedCopy();
Assertions.assertNull(copyInstant.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IntegerTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IntegerType nullInteger = new IntegerType();
System.out.println("Value -> " + nullInteger);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsDeep(validInteger));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsShallow(validInteger));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = nullInteger.copy();
Assertions.assertNull(copyInteger.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = (IntegerType) nullInteger.typedCopy();
Assertions.assertNull(copyInteger.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class MarkdownTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
MarkdownType nullMarkdown = new MarkdownType();
System.out.println("Value -> " + nullMarkdown);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsDeep(validMarkdown));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsShallow(validMarkdown));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = nullMarkdown.copy();
Assertions.assertNull(copyMarkdown.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = (MarkdownType) nullMarkdown.typedCopy();
Assertions.assertNull(copyMarkdown.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class OidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
OidType nullOid = new OidType();
System.out.println("Value -> " + nullOid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsDeep(validOid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsShallow(validOid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
OidType nullOid = new OidType();
OidType copyOid = nullOid.copy();
Assertions.assertNull(copyOid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
OidType nullOid = new OidType();
OidType copyOid = (OidType) nullOid.typedCopy();
Assertions.assertNull(copyOid.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class PositiveIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
PositiveIntType nullPositiveInt = new PositiveIntType();
System.out.println("Value -> " + nullPositiveInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsDeep(validPositiveInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsShallow(validPositiveInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = nullPositiveInt.copy();
Assertions.assertNull(copyPositiveInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = (PositiveIntType) nullPositiveInt.typedCopy();
Assertions.assertNull(copyPositiveInt.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class StringTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
StringType nullString = new StringType();
System.out.println("Value -> " + nullString);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsDeep(validString));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsShallow(validString));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
StringType nullString = new StringType();
StringType copyString = nullString.copy();
Assertions.assertNull(copyString.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
StringType nullString = new StringType();
StringType copyString = (StringType) nullString.typedCopy();
Assertions.assertNull(copyString.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class TimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
TimeType nullTime = new TimeType();
System.out.println("Value -> " + nullTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsDeep(validTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsShallow(validTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
TimeType nullTime = new TimeType();
TimeType copyTime = nullTime.copy();
Assertions.assertNull(copyTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
TimeType nullTime = new TimeType();
TimeType copyTime = (TimeType) nullTime.typedCopy();
Assertions.assertNull(copyTime.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UnsignedIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
System.out.println("Value -> " + nullUnsignedInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsDeep(validUnsignedInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsShallow(validUnsignedInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = nullUnsignedInt.copy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = (UnsignedIntType) nullUnsignedInt.typedCopy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UriTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UriType nullUri = new UriType();
System.out.println("Value -> " + nullUri);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsDeep(validUri));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsShallow(validUri));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UriType nullUri = new UriType();
UriType copyUri = nullUri.copy();
Assertions.assertNull(copyUri.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UriType nullUri = new UriType();
UriType copyUri = (UriType) nullUri.typedCopy();
Assertions.assertNull(copyUri.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UrlTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UrlType nullUrl = new UrlType();
System.out.println("Value -> " + nullUrl);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UrlType nullUrl = new UrlType();
UrlType validUrl = new UrlType("tinyurl.com/45mpbc5d");
Assertions.assertFalse(nullUrl.equalsDeep(validUrl));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UrlType nullUrl = new UrlType();
UrlType validUrl = new UrlType("tinyurl.com/45mpbc5d");
Assertions.assertFalse(nullUrl.equalsShallow(validUrl));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UrlType nullUrl = new UrlType();
UrlType copyUrl = nullUrl.copy();
Assertions.assertNull(copyUrl.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UrlType nullUrl = new UrlType();
UrlType copyUrl = (UrlType) nullUrl.typedCopy();
Assertions.assertNull(copyUrl.getValue());
}
}

View File

@ -0,0 +1,47 @@
package org.hl7.fhir.r4.model;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UuidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UuidType nullUuid = new UuidType();
System.out.println("Value -> " + nullUuid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsDeep(validUuid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsShallow(validUuid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = nullUuid.copy();
Assertions.assertNull(copyUuid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = (UuidType) nullUuid.typedCopy();
Assertions.assertNull(copyUuid.getValue());
}
}

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r5.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -93,7 +93,7 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
@Override
protected DataType typedCopy() {
return null;
return copy();
}
public String fhirType() {

View File

@ -31,46 +31,35 @@ package org.hl7.fhir.r5.model;
// Generated on Tue, May 4, 2021 07:17+1000 for FHIR v4.6.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.r5.model.Enumerations.*;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
import org.hl7.fhir.instance.model.api.IBaseDatatype;
import ca.uhn.fhir.model.api.IElement;
/**
* Base StructureDefinition for DataType Type: The base class for all re-useable types defined as part of the FHIR Specification.
*/
@DatatypeDef(name="DataType")
@DatatypeDef(name = "DataType")
public abstract class DataType extends Element implements IBaseDatatype, IElement {
private static final long serialVersionUID = 0L;
private static final long serialVersionUID = 0L;
/**
* Constructor
*/
public DataType() {
super();
}
public DataType() {
super();
}
public String fhirType() {
return "DataType";
}
public abstract DataType copy();
public abstract DataType copy();
public void copyValues(DataType dst) {
super.copyValues(dst);
}
public void copyValues(DataType dst) {
super.copyValues(dst);
}
}

View File

@ -104,8 +104,8 @@ public class IntegerType extends PrimitiveType<Integer> implements IBaseIntegerD
@Override
public IntegerType copy() {
// IntegerType ret = getValue() == null ? new IntegerType() : new IntegerType(getValue());
IntegerType ret = new IntegerType(getValue());
Integer value = getValue();
IntegerType ret = value == null ? new IntegerType() : new IntegerType(value.intValue());
copyValues(ret);
return ret;
}

View File

@ -1,33 +1,33 @@
package org.hl7.fhir.r5.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
@ -88,7 +88,7 @@ public class PositiveIntType extends IntegerType {
@Override
public PositiveIntType copy() {
PositiveIntType ret = new PositiveIntType(getValue());
PositiveIntType ret = getValue() == null ? new PositiveIntType() : new PositiveIntType(getValue());
copyValues(ret);
return ret;
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.Base64BinaryType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class Base64BinaryTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
Base64BinaryType nullBase64 = new Base64BinaryType();
System.out.println("Value -> " + nullBase64);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsDeep(validBase64));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType validBase64 = new Base64BinaryType("theValue");
Assertions.assertFalse(nullBase64.equalsShallow(validBase64));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = nullBase64.copy();
Assertions.assertNull(copyBase64.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
Base64BinaryType nullBase64 = new Base64BinaryType();
Base64BinaryType copyBase64 = (Base64BinaryType) nullBase64.typedCopy();
Assertions.assertNull(copyBase64.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.BooleanType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class BooleanTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
BooleanType nullBoolean = new BooleanType();
System.out.println("Value -> " + nullBoolean);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsDeep(validBoolean));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
BooleanType nullBoolean = new BooleanType();
BooleanType validBoolean = new BooleanType("false");
Assertions.assertFalse(nullBoolean.equalsShallow(validBoolean));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = nullBoolean.copy();
Assertions.assertNull(copyBoolean.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
BooleanType nullBoolean = new BooleanType();
BooleanType copyBoolean = (BooleanType) nullBoolean.typedCopy();
Assertions.assertNull(copyBoolean.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.CanonicalType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class CanonicalTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
CanonicalType nullCanonical = new CanonicalType();
System.out.println("Value -> " + nullCanonical);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType validCanonical = new CanonicalType("theValue");
Assertions.assertFalse(nullCanonical.equalsDeep(validCanonical));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType validCanonical = new CanonicalType("theValue");
Assertions.assertFalse(nullCanonical.equalsShallow(validCanonical));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType copyCanonical = nullCanonical.copy();
Assertions.assertNull(copyCanonical.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
CanonicalType nullCanonical = new CanonicalType();
CanonicalType copyCanonical = (CanonicalType) nullCanonical.typedCopy();
Assertions.assertNull(copyCanonical.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.CodeType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class CodeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
CodeType nullCode = new CodeType();
System.out.println("Value -> " + nullCode);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsDeep(validCode));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
CodeType nullCode = new CodeType();
CodeType validCode = new CodeType("theValue");
Assertions.assertFalse(nullCode.equalsShallow(validCode));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
CodeType nullCode = new CodeType();
CodeType copyCode = nullCode.copy();
Assertions.assertNull(copyCode.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
CodeType nullCode = new CodeType();
CodeType copyCode = (CodeType) nullCode.typedCopy();
Assertions.assertNull(copyCode.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.DateTimeType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateTimeType nullDateTime = new DateTimeType();
System.out.println("Value -> " + nullDateTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsDeep(validDateTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType validDateTime = new DateTimeType("1969-07-20");
Assertions.assertFalse(nullDateTime.equalsShallow(validDateTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = nullDateTime.copy();
Assertions.assertNull(copyDateTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateTimeType nullDateTime = new DateTimeType();
DateTimeType copyDateTime = (DateTimeType) nullDateTime.typedCopy();
Assertions.assertNull(copyDateTime.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.DateType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DateTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DateType nullDate = new DateType();
System.out.println("Value -> " + nullDate);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsDeep(validDate));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DateType nullDate = new DateType();
DateType validDate = new DateType("1969-07-20");
Assertions.assertFalse(nullDate.equalsShallow(validDate));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DateType nullDate = new DateType();
DateType copyDate = nullDate.copy();
Assertions.assertNull(copyDate.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DateType nullDate = new DateType();
DateType copyDate = (DateType) nullDate.typedCopy();
Assertions.assertNull(copyDate.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.DecimalType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class DecimalTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
DecimalType nullDecimal = new DecimalType();
System.out.println("Value -> " + nullDecimal);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsDeep(validDecimal));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
DecimalType nullDecimal = new DecimalType();
DecimalType validDecimal = new DecimalType("3.14");
Assertions.assertFalse(nullDecimal.equalsShallow(validDecimal));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = nullDecimal.copy();
Assertions.assertNull(copyDecimal.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
DecimalType nullDecimal = new DecimalType();
DecimalType copyDecimal = (DecimalType) nullDecimal.typedCopy();
Assertions.assertNull(copyDecimal.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.IdType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IdTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IdType nullId = new IdType();
System.out.println("Value -> " + nullId);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsDeep(validId));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IdType nullId = new IdType();
IdType validId = new IdType("12345");
Assertions.assertFalse(nullId.equalsShallow(validId));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IdType nullId = new IdType();
IdType copyId = nullId.copy();
Assertions.assertNull(copyId.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IdType nullId = new IdType();
IdType copyId = (IdType) nullId.typedCopy();
Assertions.assertNull(copyId.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.InstantType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class InstantTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
InstantType nullInstant = new InstantType();
System.out.println("Value -> " + nullInstant);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsDeep(validInstant));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
InstantType nullInstant = new InstantType();
InstantType validInstant = new InstantType("2013-06-08T10:57:34+01:00");
Assertions.assertFalse(nullInstant.equalsShallow(validInstant));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = nullInstant.copy();
Assertions.assertNull(copyInstant.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
InstantType nullInstant = new InstantType();
InstantType copyInstant = (InstantType) nullInstant.typedCopy();
Assertions.assertNull(copyInstant.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.IntegerType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class IntegerTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
IntegerType nullInteger = new IntegerType();
System.out.println("Value -> " + nullInteger);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsDeep(validInteger));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
IntegerType nullInteger = new IntegerType();
IntegerType validInteger = new IntegerType("42");
Assertions.assertFalse(nullInteger.equalsShallow(validInteger));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = nullInteger.copy();
Assertions.assertNull(copyInteger.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
IntegerType nullInteger = new IntegerType();
IntegerType copyInteger = (IntegerType) nullInteger.typedCopy();
Assertions.assertNull(copyInteger.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.MarkdownType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class MarkdownTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
MarkdownType nullMarkdown = new MarkdownType();
System.out.println("Value -> " + nullMarkdown);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsDeep(validMarkdown));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType validMarkdown = new MarkdownType("__MARKDOWN__");
Assertions.assertFalse(nullMarkdown.equalsShallow(validMarkdown));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = nullMarkdown.copy();
Assertions.assertNull(copyMarkdown.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
MarkdownType nullMarkdown = new MarkdownType();
MarkdownType copyMarkdown = (MarkdownType) nullMarkdown.typedCopy();
Assertions.assertNull(copyMarkdown.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.OidType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class OidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
OidType nullOid = new OidType();
System.out.println("Value -> " + nullOid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsDeep(validOid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
OidType nullOid = new OidType();
OidType validOid = new OidType("urn:oid:2.16.840.1.113883.4.3.2");
Assertions.assertFalse(nullOid.equalsShallow(validOid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
OidType nullOid = new OidType();
OidType copyOid = nullOid.copy();
Assertions.assertNull(copyOid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
OidType nullOid = new OidType();
OidType copyOid = (OidType) nullOid.typedCopy();
Assertions.assertNull(copyOid.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.PositiveIntType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class PositiveIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
PositiveIntType nullPositiveInt = new PositiveIntType();
System.out.println("Value -> " + nullPositiveInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsDeep(validPositiveInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType validPositiveInt = new PositiveIntType("42");
Assertions.assertFalse(nullPositiveInt.equalsShallow(validPositiveInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = nullPositiveInt.copy();
Assertions.assertNull(copyPositiveInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
PositiveIntType nullPositiveInt = new PositiveIntType();
PositiveIntType copyPositiveInt = (PositiveIntType) nullPositiveInt.typedCopy();
Assertions.assertNull(copyPositiveInt.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.StringType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class StringTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
StringType nullString = new StringType();
System.out.println("Value -> " + nullString);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsDeep(validString));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
StringType nullString = new StringType();
StringType validString = new StringType("theValue");
Assertions.assertFalse(nullString.equalsShallow(validString));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
StringType nullString = new StringType();
StringType copyString = nullString.copy();
Assertions.assertNull(copyString.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
StringType nullString = new StringType();
StringType copyString = (StringType) nullString.typedCopy();
Assertions.assertNull(copyString.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.TimeType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class TimeTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
TimeType nullTime = new TimeType();
System.out.println("Value -> " + nullTime);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsDeep(validTime));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
TimeType nullTime = new TimeType();
TimeType validTime = new TimeType("42");
Assertions.assertFalse(nullTime.equalsShallow(validTime));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
TimeType nullTime = new TimeType();
TimeType copyTime = nullTime.copy();
Assertions.assertNull(copyTime.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
TimeType nullTime = new TimeType();
TimeType copyTime = (TimeType) nullTime.typedCopy();
Assertions.assertNull(copyTime.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.UnsignedIntType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UnsignedIntTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
System.out.println("Value -> " + nullUnsignedInt);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsDeep(validUnsignedInt));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType validUnsignedInt = new UnsignedIntType("42");
Assertions.assertFalse(nullUnsignedInt.equalsShallow(validUnsignedInt));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = nullUnsignedInt.copy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UnsignedIntType nullUnsignedInt = new UnsignedIntType();
UnsignedIntType copyUnsignedInt = (UnsignedIntType) nullUnsignedInt.typedCopy();
Assertions.assertNull(copyUnsignedInt.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.UriType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UriTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UriType nullUri = new UriType();
System.out.println("Value -> " + nullUri);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsDeep(validUri));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UriType nullUri = new UriType();
UriType validUri = new UriType("urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7");
Assertions.assertFalse(nullUri.equalsShallow(validUri));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UriType nullUri = new UriType();
UriType copyUri = nullUri.copy();
Assertions.assertNull(copyUri.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UriType nullUri = new UriType();
UriType copyUri = (UriType) nullUri.typedCopy();
Assertions.assertNull(copyUri.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.UrlType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UrlTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UrlType nullUrl = new UrlType();
System.out.println("Value -> " + nullUrl);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UrlType nullUrl = new UrlType();
UrlType validUrl = new UrlType("tinyurl.com/45mpbc5d");
Assertions.assertFalse(nullUrl.equalsDeep(validUrl));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UrlType nullUrl = new UrlType();
UrlType validUrl = new UrlType("tinyurl.com/45mpbc5d");
Assertions.assertFalse(nullUrl.equalsShallow(validUrl));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UrlType nullUrl = new UrlType();
UrlType copyUrl = nullUrl.copy();
Assertions.assertNull(copyUrl.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UrlType nullUrl = new UrlType();
UrlType copyUrl = (UrlType) nullUrl.typedCopy();
Assertions.assertNull(copyUrl.getValue());
}
}

View File

@ -0,0 +1,48 @@
package org.hl7.fhir.r5.model;
import org.hl7.fhir.r5.model.UuidType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
class UuidTypeNullTest {
@Test
@DisplayName("Test null value toString()")
void testToString() {
UuidType nullUuid = new UuidType();
System.out.println("Value -> " + nullUuid);
}
@Test
@DisplayName("Test null value equalsDeep()")
void equalsDeep() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsDeep(validUuid));
}
@Test
@DisplayName("Test null value equalsShallow()")
void equalsShallow() {
UuidType nullUuid = new UuidType();
UuidType validUuid = new UuidType("d6db3614-4c1c-4753-b319-771383b034cf");
Assertions.assertFalse(nullUuid.equalsShallow(validUuid));
}
@Test
@DisplayName("Test null value copy()")
void copy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = nullUuid.copy();
Assertions.assertNull(copyUuid.getValue());
}
@Test
@DisplayName("Test null value typedCopy()")
void typedCopy() {
UuidType nullUuid = new UuidType();
UuidType copyUuid = (UuidType) nullUuid.typedCopy();
Assertions.assertNull(copyUuid.getValue());
}
}