package Ġio . art ic ulus . fhir . model . dst u 3 Ċ Ċ import Ġjava . io . File Ċ import Ġjava . lang . SuppressWarnings Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assertTrue Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ class ĠBasic Data Test Ġ: ĠData Tests () Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` basic - example 2 Ġ 5 0 3 ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjson Ġ= ĠFile ("./ src / test / resources / model / sample _ data / dst u 3 / basic - example 2 . json "). read Text And Close () ĊĠĠĠĠĠĠĠ Ġval Ġobj Ġ= Ġmapper . fromJson ( json , ĠBasic :: class . java ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Basic ", Ġobj . resourceType )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" class Model ", Ġobj . id )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" generated ", Ġobj . text !!. status )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match ("< div Ġxmlns =\" http :// www . w 3 . org ", Ġobj . text !!. div )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . extension [ 0 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" name ", Ġobj . extension [ 0 ]. extension [ 0 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Class 1 ", Ġobj . extension [ 0 ]. extension [ 0 ]. value String )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" attribute ", Ġobj . extension [ 0 ]. extension [ 1 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" name ", Ġobj . extension [ 0 ]. extension [ 1 ]. extension [ 0 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" attribute 1 ", Ġobj . extension [ 0 ]. extension [ 1 ]. extension [ 0 ]. value String )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" min Occurs ", Ġobj . extension [ 0 ]. extension [ 1 ]. extension [ 1 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġobj . extension [ 0 ]. extension [ 1 ]. extension [ 1 ]. value Integer ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" max Occurs ", Ġobj . extension [ 0 ]. extension [ 1 ]. extension [ 2 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match ("* ", Ġobj . extension [ 0 ]. extension [ 1 ]. extension [ 2 ]. value Code )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" attribute ", Ġobj . extension [ 0 ]. extension [ 2 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" name ", Ġobj . extension [ 0 ]. extension [ 2 ]. extension [ 0 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" attribute 2 ", Ġobj . extension [ 0 ]. extension [ 2 ]. extension [ 0 ]. value String )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" min Occurs ", Ġobj . extension [ 0 ]. extension [ 2 ]. extension [ 1 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 0 , Ġobj . extension [ 0 ]. extension [ 2 ]. extension [ 1 ]. value Integer ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" max Occurs ", Ġobj . extension [ 0 ]. extension [ 2 ]. extension [ 2 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġobj . extension [ 0 ]. extension [ 2 ]. extension [ 2 ]. value Integer ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . code . coding [ 0 ]. system )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" UML CLASS MODEL ", Ġobj . code . coding [ 0 ]. code )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġ` basic - example 2 ĠInit ` (@ SuppressWarnings (" unused ") Ġobj : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġobj . identifier Ġ Ġ// ĠNo - Op Ġto Ġsup r ress Ġunused Ġwarnings ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` basic - example - n arrative Ġ 5 0 4 ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjson Ġ= ĠFile ("./ src / test / resources / model / sample _ data / dst u 3 / basic - example - n arrative . json "). read Text And Close () ĊĠĠĠĠĠĠĠ Ġval Ġobj Ġ= Ġmapper . fromJson ( json , ĠBasic :: class . java ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Basic ", Ġobj . resourceType )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" basic - example - n arrative ", Ġobj . id )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" additional ", Ġobj . text !!. status )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match ("< div Ġxmlns =\" http :// www . w 3 . org ", Ġobj . text !!. div )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Example ĠN arrative ĠTest er ", Ġobj . code . text )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġ` basic - example - n arrative ĠInit ` (@ SuppressWarnings (" unused ") Ġobj : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġobj . identifier Ġ Ġ// ĠNo - Op Ġto Ġsup r ress Ġunused Ġwarnings ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` basic - example Ġ 5 0 5 ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjson Ġ= ĠFile ("./ src / test / resources / model / sample _ data / dst u 3 / basic - example . json "). read Text And Close () ĊĠĠĠĠĠĠĠ Ġval Ġobj Ġ= Ġmapper . fromJson ( json , ĠBasic :: class . java ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Basic ", Ġobj . resourceType )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" ref erral ", Ġobj . id )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" generated ", Ġobj . text !!. status )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match ("< div Ġxmlns =\" http :// www . w 3 . org ", Ġobj . text !!. div )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . extension [ 0 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Pract itioner / f 2 0 1 ", Ġobj . extension [ 0 ]. value Reference !!. reference )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" D ok ter ĠB ron sig ", Ġobj . extension [ 0 ]. value Reference !!. display )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . extension [ 1 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" The Ġpatient Ġhad Ġf ever Ġpe aks Ġo ", Ġobj . extension [ 1 ]. value String )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . extension [ 2 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Encounter / f 2 0 1 ", Ġobj . extension [ 2 ]. value Reference !!. reference )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . modifier Extension [ 0 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// sn ome d . info / s ct ", Ġobj . modifier Extension [ 0 ]. value Code able Concept !!. coding [ 0 ]. system )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" 1 1 4 2 9 0 0 6 ", Ġobj . modifier Extension [ 0 ]. value Code able Concept !!. coding [ 0 ]. code )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Consult ation ", Ġobj . modifier Extension [ 0 ]. value Code able Concept !!. coding [ 0 ]. display )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . modifier Extension [ 1 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" 2 0 1 3 - 0 4 - 0 1 ", Ġobj . modifier Extension [ 1 ]. value Period !!. start )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" 2 0 1 3 - 0 4 - 1 5 ", Ġobj . modifier Extension [ 1 ]. value Period !!. end )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// example . org / do - not - use ", Ġobj . modifier Extension [ 2 ]. url )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" complete ", Ġobj . modifier Extension [ 2 ]. value Code )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// good health . org / basic / i ", Ġobj . identifier [ 0 ]. system )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" 1 9 2 8 3 7 4 6 ", Ġobj . identifier [ 0 ]. value )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" http :// hl 7 . org / fhir / basic - res ", Ġobj . code . coding [ 0 ]. system )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" ref erral ", Ġobj . code . coding [ 0 ]. code )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Patient / f 2 0 1 ", Ġobj . subject !!. reference )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Ro el ", Ġobj . subject !!. display )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" 2 0 1 3 - 0 5 - 1 4 ", Ġobj . created )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( string Match (" Pract itioner / example ", Ġobj . author !!. reference )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġ` basic - example ĠInit ` (@ SuppressWarnings (" unused ") Ġobj : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġobj . identifier Ġ Ġ// ĠNo - Op Ġto Ġsup r ress Ġunused Ġwarnings ĊĠĠĠ Ġ} Ċ } Ċ