package Ġcan on . parser . xml . strategy Ċ Ċ import Ġcan on . extension . to Node Ċ import Ġcan on . parser . xml . Can on Xml Parser Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ Ċ class ĠUpload Strategy Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Parse () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġxml Ġ= Ġ"< upload Ġid =' test Id ' Ġclass =' test Class ' Ġaccept =' jpeg , Ġpng ' Ġname =' test Name ' Ġ" Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" maxSize =' 5 . 0 ' Ġmax Compress Size =' 1 . 0 ' Ġrequired =' true '> test </ upload >" ĊĠĠĠĠĠĠĠ Ġval Ġparsed Ġ= ĠUpload Strategy (). parse ( xml . to Node (), ĠCan on Xml Parser () :: to Render ables ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( parsed ). isNotNull () ĊĠĠĠĠĠĠĠ ĠassertThat ( parsed . id ). isEqualTo (" test Id ") ĊĠĠĠĠĠĠĠ ĠassertThat ( parsed .` class `). isEqualTo (" test Class ") ĊĠĠĠĠĠĠĠ ĠassertThat ( parsed . accept ). isEqualTo (" jpeg , Ġpng ") ĊĠĠĠĠĠĠĠ ĠassertThat ( parsed . name ). isEqualTo (" test Name ") ĊĠĠĠĠĠĠĠ ĠassertThat ( parsed . maxSize ). isEqualTo ( 5 . 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( parsed . max Compress Size ). isEqualTo ( 1 . 0 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( parsed . required ). isTrue () ĊĠĠĠ Ġ} Ċ Ċ } Ċ