/* Ċ Ġ* ĠCopyright ĠAmazon . com , ĠInc . Ġor Ġits Ġaffiliates . ĠAll ĠRights ĠReserved . Ċ Ġ* ĠSPDX - License - Identifier : ĠApache - 2 . 0 . Ċ Ġ*/ Ċ Ċ package Ġsoftware . amazon . smithy . aws . swift . codegen . rest xml Ċ Ċ import Ġio . kot est . matchers . string . should Contain Only Once Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġsoftware . amazon . smithy . aws . swift . codegen . TestContext Ċ import Ġsoftware . amazon . smithy . aws . swift . codegen . TestContext Generator . Companion . getClient File Contents Ċ import Ġsoftware . amazon . smithy . aws . swift . codegen . TestContext Generator . Companion . init Context From Ċ import Ġsoftware . amazon . smithy . aws . swift . codegen . should Synt actic San ity Check Ċ import Ġsoftware . amazon . smithy . aws . traits . protocols . Rest Xml Trait Ċ Ċ class ĠRest XML Protocol XML Attributes Generator Tests Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` smoke Ġtest Ġfor Ġgenerating Ġrequest Ġtests `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= Ġsetup Tests (" rest xml - attributes - generator - test . smithy ", Ġ" aws . protocol tests . rest xml # Rest Xml ") ĊĠĠĠĠĠĠĠ Ġval Ġcontents Ġ= ĠgetClient File Contents (" Example Tests ", Ġ" Xml Attributes Request Test . swift ", Ġcontext . manifest ) ĊĠĠĠĠĠĠĠ Ġcontents . should Synt actic San ity Check () ĊĊĠĠĠĠĠĠĠ Ġval Ġexpected Contents Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ""" ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclass ĠXml Attributes Request Test : ĠHttpRequest TestBase Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ""" . trim Indent () ĊĠĠĠĠĠĠĠ Ġcontents . should Contain Only Once ( expected Contents ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġsetup Tests ( smithy File : ĠString , Ġservice Shape Id : ĠString ): ĠTest Context Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontext Ġ= Ġinit Context From ( smithy File , Ġservice Shape Id , ĠRest Xml Trait . ID , Ġ" rest Xml ", Ġ" rest Xml ") ĊĊĠĠĠĠĠĠĠ Ġval Ġgenerator Ġ= ĠRest Xml Protocol Generator () ĊĠĠĠĠĠĠĠ Ġgenerator . generate Protocol UnitTests ( context . ctx ) ĊĠĠĠĠĠĠĠ Ġcontext . ctx . deleg ator . flush Writ ers () ĊĠĠĠĠĠĠĠ Ġreturn Ġcontext ĊĠĠĠ Ġ} Ċ } Ċ