[{"data":1,"prerenderedAt":4891},["ShallowReactive",2],{"/fr/architecture-craft/dependency-inversion-pratique":3,"search-api":-1},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"id":10,"date":11,"listed":12,"nocomments":6,"hidden":6,"categories":13,"tags":14,"--cover":19,"readingTime":20,"body":25,"_type":4885,"_id":4886,"_source":4887,"_file":4888,"_stem":4889,"_extension":4890},"/fr/architecture-craft/dependency-inversion-pratique","architecture-craft",false,"","Dependency Inversion Principle : 3 exemples concrets","Le DIP est le principe SOLID le plus mal compris. Pas un pattern de conception — une règle sur la direction des dépendances. Trois implémentations dans trois langages.",30,"2026-03-13",true,[5],[15,16,17,18],"SOLID","Dependency Inversion","Architecture","Clean Code","covers/articles/dependency-inversion-principe.jpg",{"text":21,"minutes":22,"time":23,"words":24},"8 min read",7.155,429300,1431,{"type":26,"children":27,"toc":4876},"root",[28,36,42,47,52,56,63,77,82,478,487,535,538,544,588,596,601,604,610,1690,1698,2192,2205,2208,2214,3706,3716,3719,3725,4650,4668,4671,4677,4685,4703,4711,4729,4747,4750,4756,4771,4784,4797,4818,4855,4858,4870],{"type":29,"tag":30,"props":31,"children":33},"element","h1",{"id":32},"dependency-inversion-principle-3-exemples-concrets",[34],{"type":35,"value":8},"text",{"type":29,"tag":37,"props":38,"children":39},"p",{},[40],{"type":35,"value":41},"Chez un client dans le secteur du retail en ligne que j'accompagnais (20 développeurs, 8 services backend), la suite de tests prenait 18 minutes à s'exécuter. Pas parce que les tests étaient lents. Parce que chaque test unitaire démarrait une vraie base de données PostgreSQL, un vrai serveur Redis, et appelait le vrai Sendgrid.",{"type":29,"tag":37,"props":43,"children":44},{},[45],{"type":35,"value":46},"Ce n'était pas un problème de tests. C'était un problème d'architecture : les modules métier dépendaient directement des implémentations concrètes d'infrastructure.",{"type":29,"tag":37,"props":48,"children":49},{},[50],{"type":35,"value":51},"Après avoir introduit le Dependency Inversion Principle sur les 8 services les plus critiques, la suite de tests est passée à 3 minutes. La couverture de tests a augmenté de 35% à 72% en 3 mois. Pas parce que les développeurs avaient soudain envie d'écrire des tests, mais parce que les tests étaient devenus faciles à écrire.",{"type":29,"tag":53,"props":54,"children":55},"hr",{},[],{"type":29,"tag":57,"props":58,"children":60},"h2",{"id":59},"le-problème-la-dépendance-directe",[61],{"type":35,"value":62},"Le problème : la dépendance directe",{"type":29,"tag":37,"props":64,"children":65},{},[66,68,75],{"type":35,"value":67},"Robert C. Martin (Uncle Bob) a formulé le DIP en 1996 dans ses travaux sur les principes SOLID : \"Les modules de haut niveau ne doivent pas dépendre des modules de bas niveau. Les deux doivent dépendre d'abstractions.\" C'est la règle de dépendance au cœur de la ",{"type":29,"tag":69,"props":70,"children":72},"a",{"href":71},"/fr/architecture-craft/clean-architecture-3-regles",[73],{"type":35,"value":74},"Clean Architecture",{"type":35,"value":76}," : les flèches de dépendance doivent toujours pointer vers l'intérieur, vers le domaine métier.",{"type":29,"tag":37,"props":78,"children":79},{},[80],{"type":35,"value":81},"En pratique, la quasi-totalité des codebases sans discipline architecturale viole ce principe :",{"type":29,"tag":83,"props":84,"children":88},"pre",{"code":85,"language":86,"meta":7,"className":87,"style":7},"# Violation du DIP — le module de haut niveau dépend du module de bas niveau\n\nclass OrderService:\n    def __init__(self):\n        self.db = PostgreSQLDatabase(host=\"localhost\", port=5432)  # dépendance directe\n        self.email = SendgridEmailClient(api_key=\"...\")              # dépendance directe\n\n    def create_order(self, order_data):\n        order_id = self.db.save(order_data)\n        self.email.send_confirmation(order_data[\"email\"], order_id)\n        return order_id\n","python","language-python shiki shiki-themes catppuccin-frappe github-dark",[89],{"type":29,"tag":90,"props":91,"children":92},"code",{"__ignoreMap":7},[93,105,114,136,167,250,303,311,347,397,464],{"type":29,"tag":94,"props":95,"children":98},"span",{"class":96,"line":97},"line",1,[99],{"type":29,"tag":94,"props":100,"children":102},{"style":101},"--shiki-default:#737994;--shiki-default-font-style:italic;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit",[103],{"type":35,"value":104},"# Violation du DIP — le module de haut niveau dépend du module de bas niveau\n",{"type":29,"tag":94,"props":106,"children":108},{"class":96,"line":107},2,[109],{"type":29,"tag":94,"props":110,"children":111},{"emptyLinePlaceholder":12},[112],{"type":35,"value":113},"\n",{"type":29,"tag":94,"props":115,"children":117},{"class":96,"line":116},3,[118,124,130],{"type":29,"tag":94,"props":119,"children":121},{"style":120},"--shiki-default:#CA9EE6;--shiki-dark:#F97583",[122],{"type":35,"value":123},"class",{"type":29,"tag":94,"props":125,"children":127},{"style":126},"--shiki-default:#E5C890;--shiki-default-font-style:italic;--shiki-dark:#B392F0;--shiki-dark-font-style:inherit",[128],{"type":35,"value":129}," OrderService",{"type":29,"tag":94,"props":131,"children":133},{"style":132},"--shiki-default:#949CBB;--shiki-dark:#E1E4E8",[134],{"type":35,"value":135},":\n",{"type":29,"tag":94,"props":137,"children":139},{"class":96,"line":138},4,[140,145,151,156,162],{"type":29,"tag":94,"props":141,"children":142},{"style":120},[143],{"type":35,"value":144},"    def",{"type":29,"tag":94,"props":146,"children":148},{"style":147},"--shiki-default:#99D1DB;--shiki-default-font-style:italic;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit",[149],{"type":35,"value":150}," __init__",{"type":29,"tag":94,"props":152,"children":153},{"style":132},[154],{"type":35,"value":155},"(",{"type":29,"tag":94,"props":157,"children":159},{"style":158},"--shiki-default:#E78284;--shiki-default-font-style:italic;--shiki-dark:#E1E4E8;--shiki-dark-font-style:inherit",[160],{"type":35,"value":161},"self",{"type":29,"tag":94,"props":163,"children":164},{"style":132},[165],{"type":35,"value":166},"):\n",{"type":29,"tag":94,"props":168,"children":170},{"class":96,"line":169},5,[171,177,182,188,194,200,204,210,214,220,225,230,234,240,245],{"type":29,"tag":94,"props":172,"children":174},{"style":173},"--shiki-default:#E78284;--shiki-default-font-style:italic;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit",[175],{"type":35,"value":176},"        self",{"type":29,"tag":94,"props":178,"children":179},{"style":132},[180],{"type":35,"value":181},".",{"type":29,"tag":94,"props":183,"children":185},{"style":184},"--shiki-default:#C6D0F5;--shiki-dark:#E1E4E8",[186],{"type":35,"value":187},"db ",{"type":29,"tag":94,"props":189,"children":191},{"style":190},"--shiki-default:#81C8BE;--shiki-dark:#F97583",[192],{"type":35,"value":193},"=",{"type":29,"tag":94,"props":195,"children":197},{"style":196},"--shiki-default:#8CAAEE;--shiki-dark:#E1E4E8",[198],{"type":35,"value":199}," PostgreSQLDatabase",{"type":29,"tag":94,"props":201,"children":202},{"style":132},[203],{"type":35,"value":155},{"type":29,"tag":94,"props":205,"children":207},{"style":206},"--shiki-default:#EA999C;--shiki-default-font-style:italic;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit",[208],{"type":35,"value":209},"host",{"type":29,"tag":94,"props":211,"children":212},{"style":190},[213],{"type":35,"value":193},{"type":29,"tag":94,"props":215,"children":217},{"style":216},"--shiki-default:#A6D189;--shiki-dark:#9ECBFF",[218],{"type":35,"value":219},"\"localhost\"",{"type":29,"tag":94,"props":221,"children":222},{"style":132},[223],{"type":35,"value":224},",",{"type":29,"tag":94,"props":226,"children":227},{"style":206},[228],{"type":35,"value":229}," port",{"type":29,"tag":94,"props":231,"children":232},{"style":190},[233],{"type":35,"value":193},{"type":29,"tag":94,"props":235,"children":237},{"style":236},"--shiki-default:#EF9F76;--shiki-dark:#79B8FF",[238],{"type":35,"value":239},"5432",{"type":29,"tag":94,"props":241,"children":242},{"style":132},[243],{"type":35,"value":244},")",{"type":29,"tag":94,"props":246,"children":247},{"style":101},[248],{"type":35,"value":249},"  # dépendance directe\n",{"type":29,"tag":94,"props":251,"children":253},{"class":96,"line":252},6,[254,258,262,267,271,276,280,285,289,294,298],{"type":29,"tag":94,"props":255,"children":256},{"style":173},[257],{"type":35,"value":176},{"type":29,"tag":94,"props":259,"children":260},{"style":132},[261],{"type":35,"value":181},{"type":29,"tag":94,"props":263,"children":264},{"style":184},[265],{"type":35,"value":266},"email ",{"type":29,"tag":94,"props":268,"children":269},{"style":190},[270],{"type":35,"value":193},{"type":29,"tag":94,"props":272,"children":273},{"style":196},[274],{"type":35,"value":275}," SendgridEmailClient",{"type":29,"tag":94,"props":277,"children":278},{"style":132},[279],{"type":35,"value":155},{"type":29,"tag":94,"props":281,"children":282},{"style":206},[283],{"type":35,"value":284},"api_key",{"type":29,"tag":94,"props":286,"children":287},{"style":190},[288],{"type":35,"value":193},{"type":29,"tag":94,"props":290,"children":291},{"style":216},[292],{"type":35,"value":293},"\"...\"",{"type":29,"tag":94,"props":295,"children":296},{"style":132},[297],{"type":35,"value":244},{"type":29,"tag":94,"props":299,"children":300},{"style":101},[301],{"type":35,"value":302},"              # dépendance directe\n",{"type":29,"tag":94,"props":304,"children":306},{"class":96,"line":305},7,[307],{"type":29,"tag":94,"props":308,"children":309},{"emptyLinePlaceholder":12},[310],{"type":35,"value":113},{"type":29,"tag":94,"props":312,"children":314},{"class":96,"line":313},8,[315,319,325,329,333,337,343],{"type":29,"tag":94,"props":316,"children":317},{"style":120},[318],{"type":35,"value":144},{"type":29,"tag":94,"props":320,"children":322},{"style":321},"--shiki-default:#8CAAEE;--shiki-default-font-style:italic;--shiki-dark:#B392F0;--shiki-dark-font-style:inherit",[323],{"type":35,"value":324}," create_order",{"type":29,"tag":94,"props":326,"children":327},{"style":132},[328],{"type":35,"value":155},{"type":29,"tag":94,"props":330,"children":331},{"style":158},[332],{"type":35,"value":161},{"type":29,"tag":94,"props":334,"children":335},{"style":132},[336],{"type":35,"value":224},{"type":29,"tag":94,"props":338,"children":340},{"style":339},"--shiki-default:#EA999C;--shiki-default-font-style:italic;--shiki-dark:#E1E4E8;--shiki-dark-font-style:inherit",[341],{"type":35,"value":342}," order_data",{"type":29,"tag":94,"props":344,"children":345},{"style":132},[346],{"type":35,"value":166},{"type":29,"tag":94,"props":348,"children":350},{"class":96,"line":349},9,[351,356,360,365,369,374,378,383,387,392],{"type":29,"tag":94,"props":352,"children":353},{"style":184},[354],{"type":35,"value":355},"        order_id ",{"type":29,"tag":94,"props":357,"children":358},{"style":190},[359],{"type":35,"value":193},{"type":29,"tag":94,"props":361,"children":362},{"style":173},[363],{"type":35,"value":364}," self",{"type":29,"tag":94,"props":366,"children":367},{"style":132},[368],{"type":35,"value":181},{"type":29,"tag":94,"props":370,"children":371},{"style":184},[372],{"type":35,"value":373},"db",{"type":29,"tag":94,"props":375,"children":376},{"style":132},[377],{"type":35,"value":181},{"type":29,"tag":94,"props":379,"children":380},{"style":196},[381],{"type":35,"value":382},"save",{"type":29,"tag":94,"props":384,"children":385},{"style":132},[386],{"type":35,"value":155},{"type":29,"tag":94,"props":388,"children":389},{"style":184},[390],{"type":35,"value":391},"order_data",{"type":29,"tag":94,"props":393,"children":394},{"style":132},[395],{"type":35,"value":396},")\n",{"type":29,"tag":94,"props":398,"children":400},{"class":96,"line":399},10,[401,405,409,414,418,423,427,431,436,441,446,450,455,460],{"type":29,"tag":94,"props":402,"children":403},{"style":173},[404],{"type":35,"value":176},{"type":29,"tag":94,"props":406,"children":407},{"style":132},[408],{"type":35,"value":181},{"type":29,"tag":94,"props":410,"children":411},{"style":184},[412],{"type":35,"value":413},"email",{"type":29,"tag":94,"props":415,"children":416},{"style":132},[417],{"type":35,"value":181},{"type":29,"tag":94,"props":419,"children":420},{"style":196},[421],{"type":35,"value":422},"send_confirmation",{"type":29,"tag":94,"props":424,"children":425},{"style":132},[426],{"type":35,"value":155},{"type":29,"tag":94,"props":428,"children":429},{"style":339},[430],{"type":35,"value":391},{"type":29,"tag":94,"props":432,"children":433},{"style":132},[434],{"type":35,"value":435},"[",{"type":29,"tag":94,"props":437,"children":438},{"style":216},[439],{"type":35,"value":440},"\"",{"type":29,"tag":94,"props":442,"children":444},{"style":443},"--shiki-default:#A6D189;--shiki-default-font-style:italic;--shiki-dark:#9ECBFF;--shiki-dark-font-style:inherit",[445],{"type":35,"value":413},{"type":29,"tag":94,"props":447,"children":448},{"style":216},[449],{"type":35,"value":440},{"type":29,"tag":94,"props":451,"children":452},{"style":132},[453],{"type":35,"value":454},"],",{"type":29,"tag":94,"props":456,"children":457},{"style":184},[458],{"type":35,"value":459}," order_id",{"type":29,"tag":94,"props":461,"children":462},{"style":132},[463],{"type":35,"value":396},{"type":29,"tag":94,"props":465,"children":467},{"class":96,"line":466},11,[468,473],{"type":29,"tag":94,"props":469,"children":470},{"style":120},[471],{"type":35,"value":472},"        return",{"type":29,"tag":94,"props":474,"children":475},{"style":184},[476],{"type":35,"value":477}," order_id\n",{"type":29,"tag":37,"props":479,"children":480},{},[481],{"type":29,"tag":482,"props":483,"children":484},"strong",{},[485],{"type":35,"value":486},"Ce que ça coûte concrètement :",{"type":29,"tag":488,"props":489,"children":490},"ul",{},[491,505,515,525],{"type":29,"tag":492,"props":493,"children":494},"li",{},[495,497,503],{"type":35,"value":496},"Impossible de tester ",{"type":29,"tag":90,"props":498,"children":500},{"className":499},[],[501],{"type":35,"value":502},"OrderService",{"type":35,"value":504}," sans une vraie base de données PostgreSQL et un compte Sendgrid",{"type":29,"tag":492,"props":506,"children":507},{},[508,510],{"type":35,"value":509},"Changer de base de données oblige à modifier ",{"type":29,"tag":90,"props":511,"children":513},{"className":512},[],[514],{"type":35,"value":502},{"type":29,"tag":492,"props":516,"children":517},{},[518,520],{"type":35,"value":519},"Changer d'email provider oblige à modifier ",{"type":29,"tag":90,"props":521,"children":523},{"className":522},[],[524],{"type":35,"value":502},{"type":29,"tag":492,"props":526,"children":527},{},[528,533],{"type":29,"tag":90,"props":529,"children":531},{"className":530},[],[532],{"type":35,"value":502},{"type":35,"value":534}," connaît des détails d'implémentation (host, port, api_key) qui n'ont rien à voir avec la logique métier de commande",{"type":29,"tag":53,"props":536,"children":537},{},[],{"type":29,"tag":57,"props":539,"children":541},{"id":540},"le-principe-inverser-la-direction-des-dépendances",[542],{"type":35,"value":543},"Le principe : inverser la direction des dépendances",{"type":29,"tag":37,"props":545,"children":546},{},[547,549,554,556,562,564,570,572,578,580,586],{"type":35,"value":548},"La solution DIP : ",{"type":29,"tag":90,"props":550,"children":552},{"className":551},[],[553],{"type":35,"value":502},{"type":35,"value":555}," ne dépend pas de ",{"type":29,"tag":90,"props":557,"children":559},{"className":558},[],[560],{"type":35,"value":561},"PostgreSQLDatabase",{"type":35,"value":563}," ni de ",{"type":29,"tag":90,"props":565,"children":567},{"className":566},[],[568],{"type":35,"value":569},"SendgridEmailClient",{"type":35,"value":571},". Il dépend d'abstractions (",{"type":29,"tag":90,"props":573,"children":575},{"className":574},[],[576],{"type":35,"value":577},"OrderRepository",{"type":35,"value":579},", ",{"type":29,"tag":90,"props":581,"children":583},{"className":582},[],[584],{"type":35,"value":585},"EmailNotifier",{"type":35,"value":587},") que les implémentations concrètes respectent.",{"type":29,"tag":83,"props":589,"children":591},{"code":590},"Sans DIP :\nOrderService → PostgreSQLDatabase\nOrderService → SendgridEmailClient\n\nAvec DIP :\nOrderService → OrderRepository (abstraction) ← PostgreSQLOrderRepository (implémentation)\nOrderService → EmailNotifier (abstraction)   ← SendgridEmailNotifier (implémentation)\n",[592],{"type":29,"tag":90,"props":593,"children":594},{"__ignoreMap":7},[595],{"type":35,"value":590},{"type":29,"tag":37,"props":597,"children":598},{},[599],{"type":35,"value":600},"La flèche s'inverse : l'implémentation concrète dépend de l'abstraction, pas l'inverse.",{"type":29,"tag":53,"props":602,"children":603},{},[],{"type":29,"tag":57,"props":605,"children":607},{"id":606},"exemple-1-python-injection-par-constructeur",[608],{"type":35,"value":609},"Exemple 1 : Python, injection par constructeur",{"type":29,"tag":83,"props":611,"children":613},{"code":612,"language":86,"meta":7,"className":87,"style":7},"from abc import ABC, abstractmethod\n\nclass OrderRepository(ABC):\n    @abstractmethod\n    def save(self, order_data: dict) -> str:\n        pass\n\nclass EmailNotifier(ABC):\n    @abstractmethod\n    def send_confirmation(self, email: str, order_id: str) -> None:\n        pass\n\n# Le module de haut niveau — dépend uniquement des abstractions\nclass OrderService:\n    def __init__(self, repository: OrderRepository, notifier: EmailNotifier):\n        self.repository = repository\n        self.notifier = notifier\n\n    def create_order(self, order_data: dict) -> str:\n        order_id = self.repository.save(order_data)\n        self.notifier.send_confirmation(order_data[\"email\"], order_id)\n        return order_id\n\n# Les implémentations concrètes\nclass PostgreSQLOrderRepository(OrderRepository):\n    def save(self, order_data: dict) -> str:\n        return self.db.execute(\"INSERT INTO orders ...\", order_data)\n\nclass SendgridEmailNotifier(EmailNotifier):\n    def send_confirmation(self, email: str, order_id: str) -> None:\n        self.client.send(to=email, template=\"order_confirmation\", data={\"order_id\": order_id})\n\n# Composition à la racine de l'application\ndef create_order_service():\n    repository = PostgreSQLOrderRepository(db)\n    notifier = SendgridEmailNotifier(api_key=os.getenv(\"SENDGRID_KEY\"))\n    return OrderService(repository, notifier)\n",[614],{"type":29,"tag":90,"props":615,"children":616},{"__ignoreMap":7},[617,650,657,682,691,748,756,763,787,794,865,872,880,889,905,964,990,1016,1024,1076,1121,1182,1194,1202,1211,1236,1288,1338,1346,1371,1438,1535,1543,1552,1571,1600,1657],{"type":29,"tag":94,"props":618,"children":619},{"class":96,"line":97},[620,625,630,635,641,645],{"type":29,"tag":94,"props":621,"children":622},{"style":120},[623],{"type":35,"value":624},"from",{"type":29,"tag":94,"props":626,"children":627},{"style":184},[628],{"type":35,"value":629}," abc ",{"type":29,"tag":94,"props":631,"children":632},{"style":120},[633],{"type":35,"value":634},"import",{"type":29,"tag":94,"props":636,"children":638},{"style":637},"--shiki-default:#C6D0F5;--shiki-dark:#79B8FF",[639],{"type":35,"value":640}," ABC",{"type":29,"tag":94,"props":642,"children":643},{"style":132},[644],{"type":35,"value":224},{"type":29,"tag":94,"props":646,"children":647},{"style":184},[648],{"type":35,"value":649}," abstractmethod\n",{"type":29,"tag":94,"props":651,"children":652},{"class":96,"line":107},[653],{"type":29,"tag":94,"props":654,"children":655},{"emptyLinePlaceholder":12},[656],{"type":35,"value":113},{"type":29,"tag":94,"props":658,"children":659},{"class":96,"line":116},[660,664,669,673,678],{"type":29,"tag":94,"props":661,"children":662},{"style":120},[663],{"type":35,"value":123},{"type":29,"tag":94,"props":665,"children":666},{"style":126},[667],{"type":35,"value":668}," OrderRepository",{"type":29,"tag":94,"props":670,"children":671},{"style":132},[672],{"type":35,"value":155},{"type":29,"tag":94,"props":674,"children":675},{"style":637},[676],{"type":35,"value":677},"ABC",{"type":29,"tag":94,"props":679,"children":680},{"style":132},[681],{"type":35,"value":166},{"type":29,"tag":94,"props":683,"children":684},{"class":96,"line":138},[685],{"type":29,"tag":94,"props":686,"children":688},{"style":687},"--shiki-default:#EF9F76;--shiki-default-font-style:italic;--shiki-dark:#B392F0;--shiki-dark-font-style:inherit",[689],{"type":35,"value":690},"    @abstractmethod\n",{"type":29,"tag":94,"props":692,"children":693},{"class":96,"line":169},[694,698,703,707,711,715,719,724,730,734,739,744],{"type":29,"tag":94,"props":695,"children":696},{"style":120},[697],{"type":35,"value":144},{"type":29,"tag":94,"props":699,"children":700},{"style":321},[701],{"type":35,"value":702}," save",{"type":29,"tag":94,"props":704,"children":705},{"style":132},[706],{"type":35,"value":155},{"type":29,"tag":94,"props":708,"children":709},{"style":158},[710],{"type":35,"value":161},{"type":29,"tag":94,"props":712,"children":713},{"style":132},[714],{"type":35,"value":224},{"type":29,"tag":94,"props":716,"children":717},{"style":339},[718],{"type":35,"value":342},{"type":29,"tag":94,"props":720,"children":721},{"style":132},[722],{"type":35,"value":723},":",{"type":29,"tag":94,"props":725,"children":727},{"style":726},"--shiki-default:#EF9F76;--shiki-default-font-style:italic;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit",[728],{"type":35,"value":729}," dict",{"type":29,"tag":94,"props":731,"children":732},{"style":132},[733],{"type":35,"value":244},{"type":29,"tag":94,"props":735,"children":736},{"style":132},[737],{"type":35,"value":738}," ->",{"type":29,"tag":94,"props":740,"children":741},{"style":726},[742],{"type":35,"value":743}," str",{"type":29,"tag":94,"props":745,"children":746},{"style":132},[747],{"type":35,"value":135},{"type":29,"tag":94,"props":749,"children":750},{"class":96,"line":252},[751],{"type":29,"tag":94,"props":752,"children":753},{"style":120},[754],{"type":35,"value":755},"        pass\n",{"type":29,"tag":94,"props":757,"children":758},{"class":96,"line":305},[759],{"type":29,"tag":94,"props":760,"children":761},{"emptyLinePlaceholder":12},[762],{"type":35,"value":113},{"type":29,"tag":94,"props":764,"children":765},{"class":96,"line":313},[766,770,775,779,783],{"type":29,"tag":94,"props":767,"children":768},{"style":120},[769],{"type":35,"value":123},{"type":29,"tag":94,"props":771,"children":772},{"style":126},[773],{"type":35,"value":774}," EmailNotifier",{"type":29,"tag":94,"props":776,"children":777},{"style":132},[778],{"type":35,"value":155},{"type":29,"tag":94,"props":780,"children":781},{"style":637},[782],{"type":35,"value":677},{"type":29,"tag":94,"props":784,"children":785},{"style":132},[786],{"type":35,"value":166},{"type":29,"tag":94,"props":788,"children":789},{"class":96,"line":349},[790],{"type":29,"tag":94,"props":791,"children":792},{"style":687},[793],{"type":35,"value":690},{"type":29,"tag":94,"props":795,"children":796},{"class":96,"line":399},[797,801,806,810,814,818,823,827,831,835,839,843,847,851,855,861],{"type":29,"tag":94,"props":798,"children":799},{"style":120},[800],{"type":35,"value":144},{"type":29,"tag":94,"props":802,"children":803},{"style":321},[804],{"type":35,"value":805}," send_confirmation",{"type":29,"tag":94,"props":807,"children":808},{"style":132},[809],{"type":35,"value":155},{"type":29,"tag":94,"props":811,"children":812},{"style":158},[813],{"type":35,"value":161},{"type":29,"tag":94,"props":815,"children":816},{"style":132},[817],{"type":35,"value":224},{"type":29,"tag":94,"props":819,"children":820},{"style":339},[821],{"type":35,"value":822}," email",{"type":29,"tag":94,"props":824,"children":825},{"style":132},[826],{"type":35,"value":723},{"type":29,"tag":94,"props":828,"children":829},{"style":726},[830],{"type":35,"value":743},{"type":29,"tag":94,"props":832,"children":833},{"style":132},[834],{"type":35,"value":224},{"type":29,"tag":94,"props":836,"children":837},{"style":339},[838],{"type":35,"value":459},{"type":29,"tag":94,"props":840,"children":841},{"style":132},[842],{"type":35,"value":723},{"type":29,"tag":94,"props":844,"children":845},{"style":726},[846],{"type":35,"value":743},{"type":29,"tag":94,"props":848,"children":849},{"style":132},[850],{"type":35,"value":244},{"type":29,"tag":94,"props":852,"children":853},{"style":132},[854],{"type":35,"value":738},{"type":29,"tag":94,"props":856,"children":858},{"style":857},"--shiki-default:#CA9EE6;--shiki-dark:#79B8FF",[859],{"type":35,"value":860}," None",{"type":29,"tag":94,"props":862,"children":863},{"style":132},[864],{"type":35,"value":135},{"type":29,"tag":94,"props":866,"children":867},{"class":96,"line":466},[868],{"type":29,"tag":94,"props":869,"children":870},{"style":120},[871],{"type":35,"value":755},{"type":29,"tag":94,"props":873,"children":875},{"class":96,"line":874},12,[876],{"type":29,"tag":94,"props":877,"children":878},{"emptyLinePlaceholder":12},[879],{"type":35,"value":113},{"type":29,"tag":94,"props":881,"children":883},{"class":96,"line":882},13,[884],{"type":29,"tag":94,"props":885,"children":886},{"style":101},[887],{"type":35,"value":888},"# Le module de haut niveau — dépend uniquement des abstractions\n",{"type":29,"tag":94,"props":890,"children":892},{"class":96,"line":891},14,[893,897,901],{"type":29,"tag":94,"props":894,"children":895},{"style":120},[896],{"type":35,"value":123},{"type":29,"tag":94,"props":898,"children":899},{"style":126},[900],{"type":35,"value":129},{"type":29,"tag":94,"props":902,"children":903},{"style":132},[904],{"type":35,"value":135},{"type":29,"tag":94,"props":906,"children":908},{"class":96,"line":907},15,[909,913,917,921,925,929,934,938,943,947,952,956,960],{"type":29,"tag":94,"props":910,"children":911},{"style":120},[912],{"type":35,"value":144},{"type":29,"tag":94,"props":914,"children":915},{"style":147},[916],{"type":35,"value":150},{"type":29,"tag":94,"props":918,"children":919},{"style":132},[920],{"type":35,"value":155},{"type":29,"tag":94,"props":922,"children":923},{"style":158},[924],{"type":35,"value":161},{"type":29,"tag":94,"props":926,"children":927},{"style":132},[928],{"type":35,"value":224},{"type":29,"tag":94,"props":930,"children":931},{"style":339},[932],{"type":35,"value":933}," repository",{"type":29,"tag":94,"props":935,"children":936},{"style":132},[937],{"type":35,"value":723},{"type":29,"tag":94,"props":939,"children":941},{"style":940},"--shiki-default:#EA999C;--shiki-dark:#E1E4E8",[942],{"type":35,"value":668},{"type":29,"tag":94,"props":944,"children":945},{"style":132},[946],{"type":35,"value":224},{"type":29,"tag":94,"props":948,"children":949},{"style":339},[950],{"type":35,"value":951}," notifier",{"type":29,"tag":94,"props":953,"children":954},{"style":132},[955],{"type":35,"value":723},{"type":29,"tag":94,"props":957,"children":958},{"style":940},[959],{"type":35,"value":774},{"type":29,"tag":94,"props":961,"children":962},{"style":132},[963],{"type":35,"value":166},{"type":29,"tag":94,"props":965,"children":967},{"class":96,"line":966},16,[968,972,976,981,985],{"type":29,"tag":94,"props":969,"children":970},{"style":173},[971],{"type":35,"value":176},{"type":29,"tag":94,"props":973,"children":974},{"style":132},[975],{"type":35,"value":181},{"type":29,"tag":94,"props":977,"children":978},{"style":184},[979],{"type":35,"value":980},"repository ",{"type":29,"tag":94,"props":982,"children":983},{"style":190},[984],{"type":35,"value":193},{"type":29,"tag":94,"props":986,"children":987},{"style":184},[988],{"type":35,"value":989}," repository\n",{"type":29,"tag":94,"props":991,"children":993},{"class":96,"line":992},17,[994,998,1002,1007,1011],{"type":29,"tag":94,"props":995,"children":996},{"style":173},[997],{"type":35,"value":176},{"type":29,"tag":94,"props":999,"children":1000},{"style":132},[1001],{"type":35,"value":181},{"type":29,"tag":94,"props":1003,"children":1004},{"style":184},[1005],{"type":35,"value":1006},"notifier ",{"type":29,"tag":94,"props":1008,"children":1009},{"style":190},[1010],{"type":35,"value":193},{"type":29,"tag":94,"props":1012,"children":1013},{"style":184},[1014],{"type":35,"value":1015}," notifier\n",{"type":29,"tag":94,"props":1017,"children":1019},{"class":96,"line":1018},18,[1020],{"type":29,"tag":94,"props":1021,"children":1022},{"emptyLinePlaceholder":12},[1023],{"type":35,"value":113},{"type":29,"tag":94,"props":1025,"children":1027},{"class":96,"line":1026},19,[1028,1032,1036,1040,1044,1048,1052,1056,1060,1064,1068,1072],{"type":29,"tag":94,"props":1029,"children":1030},{"style":120},[1031],{"type":35,"value":144},{"type":29,"tag":94,"props":1033,"children":1034},{"style":321},[1035],{"type":35,"value":324},{"type":29,"tag":94,"props":1037,"children":1038},{"style":132},[1039],{"type":35,"value":155},{"type":29,"tag":94,"props":1041,"children":1042},{"style":158},[1043],{"type":35,"value":161},{"type":29,"tag":94,"props":1045,"children":1046},{"style":132},[1047],{"type":35,"value":224},{"type":29,"tag":94,"props":1049,"children":1050},{"style":339},[1051],{"type":35,"value":342},{"type":29,"tag":94,"props":1053,"children":1054},{"style":132},[1055],{"type":35,"value":723},{"type":29,"tag":94,"props":1057,"children":1058},{"style":726},[1059],{"type":35,"value":729},{"type":29,"tag":94,"props":1061,"children":1062},{"style":132},[1063],{"type":35,"value":244},{"type":29,"tag":94,"props":1065,"children":1066},{"style":132},[1067],{"type":35,"value":738},{"type":29,"tag":94,"props":1069,"children":1070},{"style":726},[1071],{"type":35,"value":743},{"type":29,"tag":94,"props":1073,"children":1074},{"style":132},[1075],{"type":35,"value":135},{"type":29,"tag":94,"props":1077,"children":1079},{"class":96,"line":1078},20,[1080,1084,1088,1092,1096,1101,1105,1109,1113,1117],{"type":29,"tag":94,"props":1081,"children":1082},{"style":184},[1083],{"type":35,"value":355},{"type":29,"tag":94,"props":1085,"children":1086},{"style":190},[1087],{"type":35,"value":193},{"type":29,"tag":94,"props":1089,"children":1090},{"style":173},[1091],{"type":35,"value":364},{"type":29,"tag":94,"props":1093,"children":1094},{"style":132},[1095],{"type":35,"value":181},{"type":29,"tag":94,"props":1097,"children":1098},{"style":184},[1099],{"type":35,"value":1100},"repository",{"type":29,"tag":94,"props":1102,"children":1103},{"style":132},[1104],{"type":35,"value":181},{"type":29,"tag":94,"props":1106,"children":1107},{"style":196},[1108],{"type":35,"value":382},{"type":29,"tag":94,"props":1110,"children":1111},{"style":132},[1112],{"type":35,"value":155},{"type":29,"tag":94,"props":1114,"children":1115},{"style":184},[1116],{"type":35,"value":391},{"type":29,"tag":94,"props":1118,"children":1119},{"style":132},[1120],{"type":35,"value":396},{"type":29,"tag":94,"props":1122,"children":1124},{"class":96,"line":1123},21,[1125,1129,1133,1138,1142,1146,1150,1154,1158,1162,1166,1170,1174,1178],{"type":29,"tag":94,"props":1126,"children":1127},{"style":173},[1128],{"type":35,"value":176},{"type":29,"tag":94,"props":1130,"children":1131},{"style":132},[1132],{"type":35,"value":181},{"type":29,"tag":94,"props":1134,"children":1135},{"style":184},[1136],{"type":35,"value":1137},"notifier",{"type":29,"tag":94,"props":1139,"children":1140},{"style":132},[1141],{"type":35,"value":181},{"type":29,"tag":94,"props":1143,"children":1144},{"style":196},[1145],{"type":35,"value":422},{"type":29,"tag":94,"props":1147,"children":1148},{"style":132},[1149],{"type":35,"value":155},{"type":29,"tag":94,"props":1151,"children":1152},{"style":339},[1153],{"type":35,"value":391},{"type":29,"tag":94,"props":1155,"children":1156},{"style":132},[1157],{"type":35,"value":435},{"type":29,"tag":94,"props":1159,"children":1160},{"style":216},[1161],{"type":35,"value":440},{"type":29,"tag":94,"props":1163,"children":1164},{"style":443},[1165],{"type":35,"value":413},{"type":29,"tag":94,"props":1167,"children":1168},{"style":216},[1169],{"type":35,"value":440},{"type":29,"tag":94,"props":1171,"children":1172},{"style":132},[1173],{"type":35,"value":454},{"type":29,"tag":94,"props":1175,"children":1176},{"style":184},[1177],{"type":35,"value":459},{"type":29,"tag":94,"props":1179,"children":1180},{"style":132},[1181],{"type":35,"value":396},{"type":29,"tag":94,"props":1183,"children":1185},{"class":96,"line":1184},22,[1186,1190],{"type":29,"tag":94,"props":1187,"children":1188},{"style":120},[1189],{"type":35,"value":472},{"type":29,"tag":94,"props":1191,"children":1192},{"style":184},[1193],{"type":35,"value":477},{"type":29,"tag":94,"props":1195,"children":1197},{"class":96,"line":1196},23,[1198],{"type":29,"tag":94,"props":1199,"children":1200},{"emptyLinePlaceholder":12},[1201],{"type":35,"value":113},{"type":29,"tag":94,"props":1203,"children":1205},{"class":96,"line":1204},24,[1206],{"type":29,"tag":94,"props":1207,"children":1208},{"style":101},[1209],{"type":35,"value":1210},"# Les implémentations concrètes\n",{"type":29,"tag":94,"props":1212,"children":1214},{"class":96,"line":1213},25,[1215,1219,1224,1228,1232],{"type":29,"tag":94,"props":1216,"children":1217},{"style":120},[1218],{"type":35,"value":123},{"type":29,"tag":94,"props":1220,"children":1221},{"style":126},[1222],{"type":35,"value":1223}," PostgreSQLOrderRepository",{"type":29,"tag":94,"props":1225,"children":1226},{"style":132},[1227],{"type":35,"value":155},{"type":29,"tag":94,"props":1229,"children":1230},{"style":126},[1231],{"type":35,"value":577},{"type":29,"tag":94,"props":1233,"children":1234},{"style":132},[1235],{"type":35,"value":166},{"type":29,"tag":94,"props":1237,"children":1239},{"class":96,"line":1238},26,[1240,1244,1248,1252,1256,1260,1264,1268,1272,1276,1280,1284],{"type":29,"tag":94,"props":1241,"children":1242},{"style":120},[1243],{"type":35,"value":144},{"type":29,"tag":94,"props":1245,"children":1246},{"style":321},[1247],{"type":35,"value":702},{"type":29,"tag":94,"props":1249,"children":1250},{"style":132},[1251],{"type":35,"value":155},{"type":29,"tag":94,"props":1253,"children":1254},{"style":158},[1255],{"type":35,"value":161},{"type":29,"tag":94,"props":1257,"children":1258},{"style":132},[1259],{"type":35,"value":224},{"type":29,"tag":94,"props":1261,"children":1262},{"style":339},[1263],{"type":35,"value":342},{"type":29,"tag":94,"props":1265,"children":1266},{"style":132},[1267],{"type":35,"value":723},{"type":29,"tag":94,"props":1269,"children":1270},{"style":726},[1271],{"type":35,"value":729},{"type":29,"tag":94,"props":1273,"children":1274},{"style":132},[1275],{"type":35,"value":244},{"type":29,"tag":94,"props":1277,"children":1278},{"style":132},[1279],{"type":35,"value":738},{"type":29,"tag":94,"props":1281,"children":1282},{"style":726},[1283],{"type":35,"value":743},{"type":29,"tag":94,"props":1285,"children":1286},{"style":132},[1287],{"type":35,"value":135},{"type":29,"tag":94,"props":1289,"children":1291},{"class":96,"line":1290},27,[1292,1296,1300,1304,1308,1312,1317,1321,1326,1330,1334],{"type":29,"tag":94,"props":1293,"children":1294},{"style":120},[1295],{"type":35,"value":472},{"type":29,"tag":94,"props":1297,"children":1298},{"style":173},[1299],{"type":35,"value":364},{"type":29,"tag":94,"props":1301,"children":1302},{"style":132},[1303],{"type":35,"value":181},{"type":29,"tag":94,"props":1305,"children":1306},{"style":184},[1307],{"type":35,"value":373},{"type":29,"tag":94,"props":1309,"children":1310},{"style":132},[1311],{"type":35,"value":181},{"type":29,"tag":94,"props":1313,"children":1314},{"style":196},[1315],{"type":35,"value":1316},"execute",{"type":29,"tag":94,"props":1318,"children":1319},{"style":132},[1320],{"type":35,"value":155},{"type":29,"tag":94,"props":1322,"children":1323},{"style":216},[1324],{"type":35,"value":1325},"\"INSERT INTO orders ...\"",{"type":29,"tag":94,"props":1327,"children":1328},{"style":132},[1329],{"type":35,"value":224},{"type":29,"tag":94,"props":1331,"children":1332},{"style":184},[1333],{"type":35,"value":342},{"type":29,"tag":94,"props":1335,"children":1336},{"style":132},[1337],{"type":35,"value":396},{"type":29,"tag":94,"props":1339,"children":1341},{"class":96,"line":1340},28,[1342],{"type":29,"tag":94,"props":1343,"children":1344},{"emptyLinePlaceholder":12},[1345],{"type":35,"value":113},{"type":29,"tag":94,"props":1347,"children":1349},{"class":96,"line":1348},29,[1350,1354,1359,1363,1367],{"type":29,"tag":94,"props":1351,"children":1352},{"style":120},[1353],{"type":35,"value":123},{"type":29,"tag":94,"props":1355,"children":1356},{"style":126},[1357],{"type":35,"value":1358}," SendgridEmailNotifier",{"type":29,"tag":94,"props":1360,"children":1361},{"style":132},[1362],{"type":35,"value":155},{"type":29,"tag":94,"props":1364,"children":1365},{"style":126},[1366],{"type":35,"value":585},{"type":29,"tag":94,"props":1368,"children":1369},{"style":132},[1370],{"type":35,"value":166},{"type":29,"tag":94,"props":1372,"children":1373},{"class":96,"line":10},[1374,1378,1382,1386,1390,1394,1398,1402,1406,1410,1414,1418,1422,1426,1430,1434],{"type":29,"tag":94,"props":1375,"children":1376},{"style":120},[1377],{"type":35,"value":144},{"type":29,"tag":94,"props":1379,"children":1380},{"style":321},[1381],{"type":35,"value":805},{"type":29,"tag":94,"props":1383,"children":1384},{"style":132},[1385],{"type":35,"value":155},{"type":29,"tag":94,"props":1387,"children":1388},{"style":158},[1389],{"type":35,"value":161},{"type":29,"tag":94,"props":1391,"children":1392},{"style":132},[1393],{"type":35,"value":224},{"type":29,"tag":94,"props":1395,"children":1396},{"style":339},[1397],{"type":35,"value":822},{"type":29,"tag":94,"props":1399,"children":1400},{"style":132},[1401],{"type":35,"value":723},{"type":29,"tag":94,"props":1403,"children":1404},{"style":726},[1405],{"type":35,"value":743},{"type":29,"tag":94,"props":1407,"children":1408},{"style":132},[1409],{"type":35,"value":224},{"type":29,"tag":94,"props":1411,"children":1412},{"style":339},[1413],{"type":35,"value":459},{"type":29,"tag":94,"props":1415,"children":1416},{"style":132},[1417],{"type":35,"value":723},{"type":29,"tag":94,"props":1419,"children":1420},{"style":726},[1421],{"type":35,"value":743},{"type":29,"tag":94,"props":1423,"children":1424},{"style":132},[1425],{"type":35,"value":244},{"type":29,"tag":94,"props":1427,"children":1428},{"style":132},[1429],{"type":35,"value":738},{"type":29,"tag":94,"props":1431,"children":1432},{"style":857},[1433],{"type":35,"value":860},{"type":29,"tag":94,"props":1435,"children":1436},{"style":132},[1437],{"type":35,"value":135},{"type":29,"tag":94,"props":1439,"children":1441},{"class":96,"line":1440},31,[1442,1446,1450,1455,1459,1464,1468,1473,1477,1481,1485,1490,1494,1499,1503,1508,1512,1517,1522,1526,1530],{"type":29,"tag":94,"props":1443,"children":1444},{"style":173},[1445],{"type":35,"value":176},{"type":29,"tag":94,"props":1447,"children":1448},{"style":132},[1449],{"type":35,"value":181},{"type":29,"tag":94,"props":1451,"children":1452},{"style":184},[1453],{"type":35,"value":1454},"client",{"type":29,"tag":94,"props":1456,"children":1457},{"style":132},[1458],{"type":35,"value":181},{"type":29,"tag":94,"props":1460,"children":1461},{"style":196},[1462],{"type":35,"value":1463},"send",{"type":29,"tag":94,"props":1465,"children":1466},{"style":132},[1467],{"type":35,"value":155},{"type":29,"tag":94,"props":1469,"children":1470},{"style":206},[1471],{"type":35,"value":1472},"to",{"type":29,"tag":94,"props":1474,"children":1475},{"style":190},[1476],{"type":35,"value":193},{"type":29,"tag":94,"props":1478,"children":1479},{"style":184},[1480],{"type":35,"value":413},{"type":29,"tag":94,"props":1482,"children":1483},{"style":132},[1484],{"type":35,"value":224},{"type":29,"tag":94,"props":1486,"children":1487},{"style":206},[1488],{"type":35,"value":1489}," template",{"type":29,"tag":94,"props":1491,"children":1492},{"style":190},[1493],{"type":35,"value":193},{"type":29,"tag":94,"props":1495,"children":1496},{"style":216},[1497],{"type":35,"value":1498},"\"order_confirmation\"",{"type":29,"tag":94,"props":1500,"children":1501},{"style":132},[1502],{"type":35,"value":224},{"type":29,"tag":94,"props":1504,"children":1505},{"style":206},[1506],{"type":35,"value":1507}," data",{"type":29,"tag":94,"props":1509,"children":1510},{"style":190},[1511],{"type":35,"value":193},{"type":29,"tag":94,"props":1513,"children":1514},{"style":132},[1515],{"type":35,"value":1516},"{",{"type":29,"tag":94,"props":1518,"children":1519},{"style":216},[1520],{"type":35,"value":1521},"\"order_id\"",{"type":29,"tag":94,"props":1523,"children":1524},{"style":132},[1525],{"type":35,"value":723},{"type":29,"tag":94,"props":1527,"children":1528},{"style":184},[1529],{"type":35,"value":459},{"type":29,"tag":94,"props":1531,"children":1532},{"style":132},[1533],{"type":35,"value":1534},"})\n",{"type":29,"tag":94,"props":1536,"children":1538},{"class":96,"line":1537},32,[1539],{"type":29,"tag":94,"props":1540,"children":1541},{"emptyLinePlaceholder":12},[1542],{"type":35,"value":113},{"type":29,"tag":94,"props":1544,"children":1546},{"class":96,"line":1545},33,[1547],{"type":29,"tag":94,"props":1548,"children":1549},{"style":101},[1550],{"type":35,"value":1551},"# Composition à la racine de l'application\n",{"type":29,"tag":94,"props":1553,"children":1555},{"class":96,"line":1554},34,[1556,1561,1566],{"type":29,"tag":94,"props":1557,"children":1558},{"style":120},[1559],{"type":35,"value":1560},"def",{"type":29,"tag":94,"props":1562,"children":1563},{"style":321},[1564],{"type":35,"value":1565}," create_order_service",{"type":29,"tag":94,"props":1567,"children":1568},{"style":132},[1569],{"type":35,"value":1570},"():\n",{"type":29,"tag":94,"props":1572,"children":1574},{"class":96,"line":1573},35,[1575,1580,1584,1588,1592,1596],{"type":29,"tag":94,"props":1576,"children":1577},{"style":184},[1578],{"type":35,"value":1579},"    repository ",{"type":29,"tag":94,"props":1581,"children":1582},{"style":190},[1583],{"type":35,"value":193},{"type":29,"tag":94,"props":1585,"children":1586},{"style":196},[1587],{"type":35,"value":1223},{"type":29,"tag":94,"props":1589,"children":1590},{"style":132},[1591],{"type":35,"value":155},{"type":29,"tag":94,"props":1593,"children":1594},{"style":184},[1595],{"type":35,"value":373},{"type":29,"tag":94,"props":1597,"children":1598},{"style":132},[1599],{"type":35,"value":396},{"type":29,"tag":94,"props":1601,"children":1603},{"class":96,"line":1602},36,[1604,1609,1613,1617,1621,1625,1629,1634,1638,1643,1647,1652],{"type":29,"tag":94,"props":1605,"children":1606},{"style":184},[1607],{"type":35,"value":1608},"    notifier ",{"type":29,"tag":94,"props":1610,"children":1611},{"style":190},[1612],{"type":35,"value":193},{"type":29,"tag":94,"props":1614,"children":1615},{"style":196},[1616],{"type":35,"value":1358},{"type":29,"tag":94,"props":1618,"children":1619},{"style":132},[1620],{"type":35,"value":155},{"type":29,"tag":94,"props":1622,"children":1623},{"style":206},[1624],{"type":35,"value":284},{"type":29,"tag":94,"props":1626,"children":1627},{"style":190},[1628],{"type":35,"value":193},{"type":29,"tag":94,"props":1630,"children":1631},{"style":184},[1632],{"type":35,"value":1633},"os",{"type":29,"tag":94,"props":1635,"children":1636},{"style":132},[1637],{"type":35,"value":181},{"type":29,"tag":94,"props":1639,"children":1640},{"style":196},[1641],{"type":35,"value":1642},"getenv",{"type":29,"tag":94,"props":1644,"children":1645},{"style":132},[1646],{"type":35,"value":155},{"type":29,"tag":94,"props":1648,"children":1649},{"style":216},[1650],{"type":35,"value":1651},"\"SENDGRID_KEY\"",{"type":29,"tag":94,"props":1653,"children":1654},{"style":132},[1655],{"type":35,"value":1656},"))\n",{"type":29,"tag":94,"props":1658,"children":1660},{"class":96,"line":1659},37,[1661,1666,1670,1674,1678,1682,1686],{"type":29,"tag":94,"props":1662,"children":1663},{"style":120},[1664],{"type":35,"value":1665},"    return",{"type":29,"tag":94,"props":1667,"children":1668},{"style":196},[1669],{"type":35,"value":129},{"type":29,"tag":94,"props":1671,"children":1672},{"style":132},[1673],{"type":35,"value":155},{"type":29,"tag":94,"props":1675,"children":1676},{"style":184},[1677],{"type":35,"value":1100},{"type":29,"tag":94,"props":1679,"children":1680},{"style":132},[1681],{"type":35,"value":224},{"type":29,"tag":94,"props":1683,"children":1684},{"style":184},[1685],{"type":35,"value":951},{"type":29,"tag":94,"props":1687,"children":1688},{"style":132},[1689],{"type":35,"value":396},{"type":29,"tag":37,"props":1691,"children":1692},{},[1693],{"type":29,"tag":482,"props":1694,"children":1695},{},[1696],{"type":35,"value":1697},"Le gain pour les tests :",{"type":29,"tag":83,"props":1699,"children":1701},{"code":1700,"language":86,"meta":7,"className":87,"style":7},"# Test sans base de données ni Sendgrid — s'exécute en millisecondes\nclass InMemoryOrderRepository(OrderRepository):\n    def __init__(self):\n        self.orders = {}\n\n    def save(self, order_data: dict) -> str:\n        order_id = str(uuid.uuid4())\n        self.orders[order_id] = order_data\n        return order_id\n\ndef test_create_order():\n    repository = InMemoryOrderRepository()\n    notifier = MockEmailNotifier()\n    service = OrderService(repository, notifier)\n\n    order_id = service.create_order({\"email\": \"user@example.com\", \"items\": [...]})\n\n    assert order_id in repository.orders\n    assert len(notifier.sent_confirmations) == 1\n",[1702],{"type":29,"tag":90,"props":1703,"children":1704},{"__ignoreMap":7},[1705,1713,1737,1760,1785,1792,1843,1881,1921,1932,1939,1955,1975,1995,2031,2038,2111,2118,2149],{"type":29,"tag":94,"props":1706,"children":1707},{"class":96,"line":97},[1708],{"type":29,"tag":94,"props":1709,"children":1710},{"style":101},[1711],{"type":35,"value":1712},"# Test sans base de données ni Sendgrid — s'exécute en millisecondes\n",{"type":29,"tag":94,"props":1714,"children":1715},{"class":96,"line":107},[1716,1720,1725,1729,1733],{"type":29,"tag":94,"props":1717,"children":1718},{"style":120},[1719],{"type":35,"value":123},{"type":29,"tag":94,"props":1721,"children":1722},{"style":126},[1723],{"type":35,"value":1724}," InMemoryOrderRepository",{"type":29,"tag":94,"props":1726,"children":1727},{"style":132},[1728],{"type":35,"value":155},{"type":29,"tag":94,"props":1730,"children":1731},{"style":126},[1732],{"type":35,"value":577},{"type":29,"tag":94,"props":1734,"children":1735},{"style":132},[1736],{"type":35,"value":166},{"type":29,"tag":94,"props":1738,"children":1739},{"class":96,"line":116},[1740,1744,1748,1752,1756],{"type":29,"tag":94,"props":1741,"children":1742},{"style":120},[1743],{"type":35,"value":144},{"type":29,"tag":94,"props":1745,"children":1746},{"style":147},[1747],{"type":35,"value":150},{"type":29,"tag":94,"props":1749,"children":1750},{"style":132},[1751],{"type":35,"value":155},{"type":29,"tag":94,"props":1753,"children":1754},{"style":158},[1755],{"type":35,"value":161},{"type":29,"tag":94,"props":1757,"children":1758},{"style":132},[1759],{"type":35,"value":166},{"type":29,"tag":94,"props":1761,"children":1762},{"class":96,"line":138},[1763,1767,1771,1776,1780],{"type":29,"tag":94,"props":1764,"children":1765},{"style":173},[1766],{"type":35,"value":176},{"type":29,"tag":94,"props":1768,"children":1769},{"style":132},[1770],{"type":35,"value":181},{"type":29,"tag":94,"props":1772,"children":1773},{"style":184},[1774],{"type":35,"value":1775},"orders ",{"type":29,"tag":94,"props":1777,"children":1778},{"style":190},[1779],{"type":35,"value":193},{"type":29,"tag":94,"props":1781,"children":1782},{"style":132},[1783],{"type":35,"value":1784}," {}\n",{"type":29,"tag":94,"props":1786,"children":1787},{"class":96,"line":169},[1788],{"type":29,"tag":94,"props":1789,"children":1790},{"emptyLinePlaceholder":12},[1791],{"type":35,"value":113},{"type":29,"tag":94,"props":1793,"children":1794},{"class":96,"line":252},[1795,1799,1803,1807,1811,1815,1819,1823,1827,1831,1835,1839],{"type":29,"tag":94,"props":1796,"children":1797},{"style":120},[1798],{"type":35,"value":144},{"type":29,"tag":94,"props":1800,"children":1801},{"style":321},[1802],{"type":35,"value":702},{"type":29,"tag":94,"props":1804,"children":1805},{"style":132},[1806],{"type":35,"value":155},{"type":29,"tag":94,"props":1808,"children":1809},{"style":158},[1810],{"type":35,"value":161},{"type":29,"tag":94,"props":1812,"children":1813},{"style":132},[1814],{"type":35,"value":224},{"type":29,"tag":94,"props":1816,"children":1817},{"style":339},[1818],{"type":35,"value":342},{"type":29,"tag":94,"props":1820,"children":1821},{"style":132},[1822],{"type":35,"value":723},{"type":29,"tag":94,"props":1824,"children":1825},{"style":726},[1826],{"type":35,"value":729},{"type":29,"tag":94,"props":1828,"children":1829},{"style":132},[1830],{"type":35,"value":244},{"type":29,"tag":94,"props":1832,"children":1833},{"style":132},[1834],{"type":35,"value":738},{"type":29,"tag":94,"props":1836,"children":1837},{"style":726},[1838],{"type":35,"value":743},{"type":29,"tag":94,"props":1840,"children":1841},{"style":132},[1842],{"type":35,"value":135},{"type":29,"tag":94,"props":1844,"children":1845},{"class":96,"line":305},[1846,1850,1854,1858,1862,1867,1871,1876],{"type":29,"tag":94,"props":1847,"children":1848},{"style":184},[1849],{"type":35,"value":355},{"type":29,"tag":94,"props":1851,"children":1852},{"style":190},[1853],{"type":35,"value":193},{"type":29,"tag":94,"props":1855,"children":1856},{"style":726},[1857],{"type":35,"value":743},{"type":29,"tag":94,"props":1859,"children":1860},{"style":132},[1861],{"type":35,"value":155},{"type":29,"tag":94,"props":1863,"children":1864},{"style":184},[1865],{"type":35,"value":1866},"uuid",{"type":29,"tag":94,"props":1868,"children":1869},{"style":132},[1870],{"type":35,"value":181},{"type":29,"tag":94,"props":1872,"children":1873},{"style":196},[1874],{"type":35,"value":1875},"uuid4",{"type":29,"tag":94,"props":1877,"children":1878},{"style":132},[1879],{"type":35,"value":1880},"())\n",{"type":29,"tag":94,"props":1882,"children":1883},{"class":96,"line":313},[1884,1888,1892,1897,1901,1906,1911,1916],{"type":29,"tag":94,"props":1885,"children":1886},{"style":173},[1887],{"type":35,"value":176},{"type":29,"tag":94,"props":1889,"children":1890},{"style":132},[1891],{"type":35,"value":181},{"type":29,"tag":94,"props":1893,"children":1894},{"style":339},[1895],{"type":35,"value":1896},"orders",{"type":29,"tag":94,"props":1898,"children":1899},{"style":132},[1900],{"type":35,"value":435},{"type":29,"tag":94,"props":1902,"children":1903},{"style":339},[1904],{"type":35,"value":1905},"order_id",{"type":29,"tag":94,"props":1907,"children":1908},{"style":132},[1909],{"type":35,"value":1910},"]",{"type":29,"tag":94,"props":1912,"children":1913},{"style":190},[1914],{"type":35,"value":1915}," =",{"type":29,"tag":94,"props":1917,"children":1918},{"style":184},[1919],{"type":35,"value":1920}," order_data\n",{"type":29,"tag":94,"props":1922,"children":1923},{"class":96,"line":349},[1924,1928],{"type":29,"tag":94,"props":1925,"children":1926},{"style":120},[1927],{"type":35,"value":472},{"type":29,"tag":94,"props":1929,"children":1930},{"style":184},[1931],{"type":35,"value":477},{"type":29,"tag":94,"props":1933,"children":1934},{"class":96,"line":399},[1935],{"type":29,"tag":94,"props":1936,"children":1937},{"emptyLinePlaceholder":12},[1938],{"type":35,"value":113},{"type":29,"tag":94,"props":1940,"children":1941},{"class":96,"line":466},[1942,1946,1951],{"type":29,"tag":94,"props":1943,"children":1944},{"style":120},[1945],{"type":35,"value":1560},{"type":29,"tag":94,"props":1947,"children":1948},{"style":321},[1949],{"type":35,"value":1950}," test_create_order",{"type":29,"tag":94,"props":1952,"children":1953},{"style":132},[1954],{"type":35,"value":1570},{"type":29,"tag":94,"props":1956,"children":1957},{"class":96,"line":874},[1958,1962,1966,1970],{"type":29,"tag":94,"props":1959,"children":1960},{"style":184},[1961],{"type":35,"value":1579},{"type":29,"tag":94,"props":1963,"children":1964},{"style":190},[1965],{"type":35,"value":193},{"type":29,"tag":94,"props":1967,"children":1968},{"style":196},[1969],{"type":35,"value":1724},{"type":29,"tag":94,"props":1971,"children":1972},{"style":132},[1973],{"type":35,"value":1974},"()\n",{"type":29,"tag":94,"props":1976,"children":1977},{"class":96,"line":882},[1978,1982,1986,1991],{"type":29,"tag":94,"props":1979,"children":1980},{"style":184},[1981],{"type":35,"value":1608},{"type":29,"tag":94,"props":1983,"children":1984},{"style":190},[1985],{"type":35,"value":193},{"type":29,"tag":94,"props":1987,"children":1988},{"style":196},[1989],{"type":35,"value":1990}," MockEmailNotifier",{"type":29,"tag":94,"props":1992,"children":1993},{"style":132},[1994],{"type":35,"value":1974},{"type":29,"tag":94,"props":1996,"children":1997},{"class":96,"line":891},[1998,2003,2007,2011,2015,2019,2023,2027],{"type":29,"tag":94,"props":1999,"children":2000},{"style":184},[2001],{"type":35,"value":2002},"    service ",{"type":29,"tag":94,"props":2004,"children":2005},{"style":190},[2006],{"type":35,"value":193},{"type":29,"tag":94,"props":2008,"children":2009},{"style":196},[2010],{"type":35,"value":129},{"type":29,"tag":94,"props":2012,"children":2013},{"style":132},[2014],{"type":35,"value":155},{"type":29,"tag":94,"props":2016,"children":2017},{"style":184},[2018],{"type":35,"value":1100},{"type":29,"tag":94,"props":2020,"children":2021},{"style":132},[2022],{"type":35,"value":224},{"type":29,"tag":94,"props":2024,"children":2025},{"style":184},[2026],{"type":35,"value":951},{"type":29,"tag":94,"props":2028,"children":2029},{"style":132},[2030],{"type":35,"value":396},{"type":29,"tag":94,"props":2032,"children":2033},{"class":96,"line":907},[2034],{"type":29,"tag":94,"props":2035,"children":2036},{"emptyLinePlaceholder":12},[2037],{"type":35,"value":113},{"type":29,"tag":94,"props":2039,"children":2040},{"class":96,"line":966},[2041,2046,2050,2055,2059,2064,2069,2074,2078,2083,2087,2092,2096,2101,2106],{"type":29,"tag":94,"props":2042,"children":2043},{"style":184},[2044],{"type":35,"value":2045},"    order_id ",{"type":29,"tag":94,"props":2047,"children":2048},{"style":190},[2049],{"type":35,"value":193},{"type":29,"tag":94,"props":2051,"children":2052},{"style":184},[2053],{"type":35,"value":2054}," service",{"type":29,"tag":94,"props":2056,"children":2057},{"style":132},[2058],{"type":35,"value":181},{"type":29,"tag":94,"props":2060,"children":2061},{"style":196},[2062],{"type":35,"value":2063},"create_order",{"type":29,"tag":94,"props":2065,"children":2066},{"style":132},[2067],{"type":35,"value":2068},"({",{"type":29,"tag":94,"props":2070,"children":2071},{"style":216},[2072],{"type":35,"value":2073},"\"email\"",{"type":29,"tag":94,"props":2075,"children":2076},{"style":132},[2077],{"type":35,"value":723},{"type":29,"tag":94,"props":2079,"children":2080},{"style":216},[2081],{"type":35,"value":2082}," \"user@example.com\"",{"type":29,"tag":94,"props":2084,"children":2085},{"style":132},[2086],{"type":35,"value":224},{"type":29,"tag":94,"props":2088,"children":2089},{"style":216},[2090],{"type":35,"value":2091}," \"items\"",{"type":29,"tag":94,"props":2093,"children":2094},{"style":132},[2095],{"type":35,"value":723},{"type":29,"tag":94,"props":2097,"children":2098},{"style":132},[2099],{"type":35,"value":2100}," [",{"type":29,"tag":94,"props":2102,"children":2103},{"style":637},[2104],{"type":35,"value":2105},"...",{"type":29,"tag":94,"props":2107,"children":2108},{"style":132},[2109],{"type":35,"value":2110},"]})\n",{"type":29,"tag":94,"props":2112,"children":2113},{"class":96,"line":992},[2114],{"type":29,"tag":94,"props":2115,"children":2116},{"emptyLinePlaceholder":12},[2117],{"type":35,"value":113},{"type":29,"tag":94,"props":2119,"children":2120},{"class":96,"line":1018},[2121,2126,2131,2136,2140,2144],{"type":29,"tag":94,"props":2122,"children":2123},{"style":120},[2124],{"type":35,"value":2125},"    assert",{"type":29,"tag":94,"props":2127,"children":2128},{"style":184},[2129],{"type":35,"value":2130}," order_id ",{"type":29,"tag":94,"props":2132,"children":2133},{"style":120},[2134],{"type":35,"value":2135},"in",{"type":29,"tag":94,"props":2137,"children":2138},{"style":184},[2139],{"type":35,"value":933},{"type":29,"tag":94,"props":2141,"children":2142},{"style":132},[2143],{"type":35,"value":181},{"type":29,"tag":94,"props":2145,"children":2146},{"style":184},[2147],{"type":35,"value":2148},"orders\n",{"type":29,"tag":94,"props":2150,"children":2151},{"class":96,"line":1026},[2152,2156,2161,2165,2169,2173,2178,2182,2187],{"type":29,"tag":94,"props":2153,"children":2154},{"style":120},[2155],{"type":35,"value":2125},{"type":29,"tag":94,"props":2157,"children":2158},{"style":726},[2159],{"type":35,"value":2160}," len",{"type":29,"tag":94,"props":2162,"children":2163},{"style":132},[2164],{"type":35,"value":155},{"type":29,"tag":94,"props":2166,"children":2167},{"style":184},[2168],{"type":35,"value":1137},{"type":29,"tag":94,"props":2170,"children":2171},{"style":132},[2172],{"type":35,"value":181},{"type":29,"tag":94,"props":2174,"children":2175},{"style":184},[2176],{"type":35,"value":2177},"sent_confirmations",{"type":29,"tag":94,"props":2179,"children":2180},{"style":132},[2181],{"type":35,"value":244},{"type":29,"tag":94,"props":2183,"children":2184},{"style":190},[2185],{"type":35,"value":2186}," ==",{"type":29,"tag":94,"props":2188,"children":2189},{"style":236},[2190],{"type":35,"value":2191}," 1\n",{"type":29,"tag":2193,"props":2194,"children":2199},"cta",{"cta":2195,"href":2196,"title":2197,"type":2198},"Réserver mon diagnostic gratuit →","https://app.kamanga.fr/forms/discovery-call","Votre codebase est difficile à tester parce que les dépendances sont fortement couplées ?","call",[2200],{"type":29,"tag":37,"props":2201,"children":2202},{},[2203],{"type":35,"value":2204},"Introduire le DIP dans un codebase existant nécessite une stratégie progressive, pas un refactoring massif qui bloque toute l'équipe. En 30 minutes, on peut identifier les zones de couplage les plus problématiques et définir un plan de refactoring réaliste avec des gains mesurables.",{"type":29,"tag":53,"props":2206,"children":2207},{},[],{"type":29,"tag":57,"props":2209,"children":2211},{"id":2210},"exemple-2-typescript-interfaces-et-injection-par-framework",[2212],{"type":35,"value":2213},"Exemple 2 : TypeScript, interfaces et injection par framework",{"type":29,"tag":83,"props":2215,"children":2219},{"code":2216,"language":2217,"meta":7,"className":2218,"style":7},"// Les abstractions (interfaces TypeScript)\ninterface OrderRepository {\n    save(orderData: OrderData): Promise\u003Cstring>;\n    findById(orderId: string): Promise\u003COrder | null>;\n}\n\ninterface PaymentGateway {\n    charge(amount: number, currency: string, paymentMethod: string): Promise\u003CPaymentResult>;\n}\n\n// Le module de haut niveau\nclass OrderService {\n    constructor(\n        private readonly repository: OrderRepository,\n        private readonly payment: PaymentGateway\n    ) {}\n\n    async createPaidOrder(orderData: OrderData): Promise\u003COrder> {\n        const paymentResult = await this.payment.charge(\n            orderData.total,\n            orderData.currency,\n            orderData.paymentMethodId\n        );\n\n        if (!paymentResult.success) {\n            throw new PaymentFailedError(paymentResult.errorCode);\n        }\n\n        const orderId = await this.repository.save({\n            ...orderData,\n            paymentId: paymentResult.transactionId,\n            status: 'paid'\n        });\n\n        return this.repository.findById(orderId);\n    }\n}\n\n// Test — sans Stripe, sans base de données\ndescribe('OrderService', () => {\n    it('should create order with successful payment', async () => {\n        const mockRepository: OrderRepository = {\n            save: jest.fn().mockResolvedValue('order-123'),\n            findById: jest.fn().mockResolvedValue({ id: 'order-123', status: 'paid' })\n        };\n\n        const mockPayment: PaymentGateway = {\n            charge: jest.fn().mockResolvedValue({ success: true, transactionId: 'txn-456' })\n        };\n\n        const service = new OrderService(mockRepository, mockPayment);\n        const order = await service.createPaidOrder({ total: 1000, currency: 'EUR' });\n\n        expect(order.status).toBe('paid');\n    });\n});\n","typescript","language-typescript shiki shiki-themes catppuccin-frappe github-dark",[2220],{"type":29,"tag":90,"props":2221,"children":2222},{"__ignoreMap":7},[2223,2231,2248,2308,2374,2382,2389,2405,2494,2501,2508,2516,2531,2544,2574,2599,2611,2618,2675,2726,2747,2767,2783,2795,2802,2839,2876,2884,2891,2939,2955,2984,3001,3017,3024,3061,3069,3076,3084,3093,3129,3168,3197,3255,3341,3350,3358,3387,3472,3480,3488,3530,3615,3623,3672,3689],{"type":29,"tag":94,"props":2224,"children":2225},{"class":96,"line":97},[2226],{"type":29,"tag":94,"props":2227,"children":2228},{"style":101},[2229],{"type":35,"value":2230},"// Les abstractions (interfaces TypeScript)\n",{"type":29,"tag":94,"props":2232,"children":2233},{"class":96,"line":107},[2234,2239,2243],{"type":29,"tag":94,"props":2235,"children":2236},{"style":120},[2237],{"type":35,"value":2238},"interface",{"type":29,"tag":94,"props":2240,"children":2241},{"style":126},[2242],{"type":35,"value":668},{"type":29,"tag":94,"props":2244,"children":2245},{"style":132},[2246],{"type":35,"value":2247}," {\n",{"type":29,"tag":94,"props":2249,"children":2250},{"class":96,"line":116},[2251,2256,2260,2265,2269,2274,2278,2282,2287,2293,2298,2303],{"type":29,"tag":94,"props":2252,"children":2253},{"style":321},[2254],{"type":35,"value":2255},"    save",{"type":29,"tag":94,"props":2257,"children":2258},{"style":132},[2259],{"type":35,"value":155},{"type":29,"tag":94,"props":2261,"children":2262},{"style":206},[2263],{"type":35,"value":2264},"orderData",{"type":29,"tag":94,"props":2266,"children":2267},{"style":190},[2268],{"type":35,"value":723},{"type":29,"tag":94,"props":2270,"children":2271},{"style":126},[2272],{"type":35,"value":2273}," OrderData",{"type":29,"tag":94,"props":2275,"children":2276},{"style":132},[2277],{"type":35,"value":244},{"type":29,"tag":94,"props":2279,"children":2280},{"style":190},[2281],{"type":35,"value":723},{"type":29,"tag":94,"props":2283,"children":2284},{"style":126},[2285],{"type":35,"value":2286}," Promise",{"type":29,"tag":94,"props":2288,"children":2290},{"style":2289},"--shiki-default:#99D1DB;--shiki-dark:#E1E4E8",[2291],{"type":35,"value":2292},"\u003C",{"type":29,"tag":94,"props":2294,"children":2295},{"style":857},[2296],{"type":35,"value":2297},"string",{"type":29,"tag":94,"props":2299,"children":2300},{"style":2289},[2301],{"type":35,"value":2302},">",{"type":29,"tag":94,"props":2304,"children":2305},{"style":132},[2306],{"type":35,"value":2307},";\n",{"type":29,"tag":94,"props":2309,"children":2310},{"class":96,"line":138},[2311,2316,2320,2325,2329,2334,2338,2342,2346,2350,2355,2360,2366,2370],{"type":29,"tag":94,"props":2312,"children":2313},{"style":321},[2314],{"type":35,"value":2315},"    findById",{"type":29,"tag":94,"props":2317,"children":2318},{"style":132},[2319],{"type":35,"value":155},{"type":29,"tag":94,"props":2321,"children":2322},{"style":206},[2323],{"type":35,"value":2324},"orderId",{"type":29,"tag":94,"props":2326,"children":2327},{"style":190},[2328],{"type":35,"value":723},{"type":29,"tag":94,"props":2330,"children":2331},{"style":857},[2332],{"type":35,"value":2333}," string",{"type":29,"tag":94,"props":2335,"children":2336},{"style":132},[2337],{"type":35,"value":244},{"type":29,"tag":94,"props":2339,"children":2340},{"style":190},[2341],{"type":35,"value":723},{"type":29,"tag":94,"props":2343,"children":2344},{"style":126},[2345],{"type":35,"value":2286},{"type":29,"tag":94,"props":2347,"children":2348},{"style":2289},[2349],{"type":35,"value":2292},{"type":29,"tag":94,"props":2351,"children":2352},{"style":126},[2353],{"type":35,"value":2354},"Order",{"type":29,"tag":94,"props":2356,"children":2357},{"style":190},[2358],{"type":35,"value":2359}," |",{"type":29,"tag":94,"props":2361,"children":2363},{"style":2362},"--shiki-default:#CA9EE6;--shiki-default-font-style:italic;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit",[2364],{"type":35,"value":2365}," null",{"type":29,"tag":94,"props":2367,"children":2368},{"style":2289},[2369],{"type":35,"value":2302},{"type":29,"tag":94,"props":2371,"children":2372},{"style":132},[2373],{"type":35,"value":2307},{"type":29,"tag":94,"props":2375,"children":2376},{"class":96,"line":169},[2377],{"type":29,"tag":94,"props":2378,"children":2379},{"style":132},[2380],{"type":35,"value":2381},"}\n",{"type":29,"tag":94,"props":2383,"children":2384},{"class":96,"line":252},[2385],{"type":29,"tag":94,"props":2386,"children":2387},{"emptyLinePlaceholder":12},[2388],{"type":35,"value":113},{"type":29,"tag":94,"props":2390,"children":2391},{"class":96,"line":305},[2392,2396,2401],{"type":29,"tag":94,"props":2393,"children":2394},{"style":120},[2395],{"type":35,"value":2238},{"type":29,"tag":94,"props":2397,"children":2398},{"style":126},[2399],{"type":35,"value":2400}," PaymentGateway",{"type":29,"tag":94,"props":2402,"children":2403},{"style":132},[2404],{"type":35,"value":2247},{"type":29,"tag":94,"props":2406,"children":2407},{"class":96,"line":313},[2408,2413,2417,2422,2426,2431,2435,2440,2444,2448,2452,2457,2461,2465,2469,2473,2477,2481,2486,2490],{"type":29,"tag":94,"props":2409,"children":2410},{"style":321},[2411],{"type":35,"value":2412},"    charge",{"type":29,"tag":94,"props":2414,"children":2415},{"style":132},[2416],{"type":35,"value":155},{"type":29,"tag":94,"props":2418,"children":2419},{"style":206},[2420],{"type":35,"value":2421},"amount",{"type":29,"tag":94,"props":2423,"children":2424},{"style":190},[2425],{"type":35,"value":723},{"type":29,"tag":94,"props":2427,"children":2428},{"style":857},[2429],{"type":35,"value":2430}," number",{"type":29,"tag":94,"props":2432,"children":2433},{"style":132},[2434],{"type":35,"value":224},{"type":29,"tag":94,"props":2436,"children":2437},{"style":206},[2438],{"type":35,"value":2439}," currency",{"type":29,"tag":94,"props":2441,"children":2442},{"style":190},[2443],{"type":35,"value":723},{"type":29,"tag":94,"props":2445,"children":2446},{"style":857},[2447],{"type":35,"value":2333},{"type":29,"tag":94,"props":2449,"children":2450},{"style":132},[2451],{"type":35,"value":224},{"type":29,"tag":94,"props":2453,"children":2454},{"style":206},[2455],{"type":35,"value":2456}," paymentMethod",{"type":29,"tag":94,"props":2458,"children":2459},{"style":190},[2460],{"type":35,"value":723},{"type":29,"tag":94,"props":2462,"children":2463},{"style":857},[2464],{"type":35,"value":2333},{"type":29,"tag":94,"props":2466,"children":2467},{"style":132},[2468],{"type":35,"value":244},{"type":29,"tag":94,"props":2470,"children":2471},{"style":190},[2472],{"type":35,"value":723},{"type":29,"tag":94,"props":2474,"children":2475},{"style":126},[2476],{"type":35,"value":2286},{"type":29,"tag":94,"props":2478,"children":2479},{"style":2289},[2480],{"type":35,"value":2292},{"type":29,"tag":94,"props":2482,"children":2483},{"style":126},[2484],{"type":35,"value":2485},"PaymentResult",{"type":29,"tag":94,"props":2487,"children":2488},{"style":2289},[2489],{"type":35,"value":2302},{"type":29,"tag":94,"props":2491,"children":2492},{"style":132},[2493],{"type":35,"value":2307},{"type":29,"tag":94,"props":2495,"children":2496},{"class":96,"line":349},[2497],{"type":29,"tag":94,"props":2498,"children":2499},{"style":132},[2500],{"type":35,"value":2381},{"type":29,"tag":94,"props":2502,"children":2503},{"class":96,"line":399},[2504],{"type":29,"tag":94,"props":2505,"children":2506},{"emptyLinePlaceholder":12},[2507],{"type":35,"value":113},{"type":29,"tag":94,"props":2509,"children":2510},{"class":96,"line":466},[2511],{"type":29,"tag":94,"props":2512,"children":2513},{"style":101},[2514],{"type":35,"value":2515},"// Le module de haut niveau\n",{"type":29,"tag":94,"props":2517,"children":2518},{"class":96,"line":874},[2519,2523,2527],{"type":29,"tag":94,"props":2520,"children":2521},{"style":120},[2522],{"type":35,"value":123},{"type":29,"tag":94,"props":2524,"children":2525},{"style":126},[2526],{"type":35,"value":129},{"type":29,"tag":94,"props":2528,"children":2529},{"style":132},[2530],{"type":35,"value":2247},{"type":29,"tag":94,"props":2532,"children":2533},{"class":96,"line":882},[2534,2539],{"type":29,"tag":94,"props":2535,"children":2536},{"style":120},[2537],{"type":35,"value":2538},"    constructor",{"type":29,"tag":94,"props":2540,"children":2541},{"style":132},[2542],{"type":35,"value":2543},"(\n",{"type":29,"tag":94,"props":2545,"children":2546},{"class":96,"line":891},[2547,2552,2557,2561,2565,2569],{"type":29,"tag":94,"props":2548,"children":2549},{"style":120},[2550],{"type":35,"value":2551},"        private",{"type":29,"tag":94,"props":2553,"children":2554},{"style":120},[2555],{"type":35,"value":2556}," readonly",{"type":29,"tag":94,"props":2558,"children":2559},{"style":206},[2560],{"type":35,"value":933},{"type":29,"tag":94,"props":2562,"children":2563},{"style":190},[2564],{"type":35,"value":723},{"type":29,"tag":94,"props":2566,"children":2567},{"style":126},[2568],{"type":35,"value":668},{"type":29,"tag":94,"props":2570,"children":2571},{"style":132},[2572],{"type":35,"value":2573},",\n",{"type":29,"tag":94,"props":2575,"children":2576},{"class":96,"line":907},[2577,2581,2585,2590,2594],{"type":29,"tag":94,"props":2578,"children":2579},{"style":120},[2580],{"type":35,"value":2551},{"type":29,"tag":94,"props":2582,"children":2583},{"style":120},[2584],{"type":35,"value":2556},{"type":29,"tag":94,"props":2586,"children":2587},{"style":206},[2588],{"type":35,"value":2589}," payment",{"type":29,"tag":94,"props":2591,"children":2592},{"style":190},[2593],{"type":35,"value":723},{"type":29,"tag":94,"props":2595,"children":2596},{"style":126},[2597],{"type":35,"value":2598}," PaymentGateway\n",{"type":29,"tag":94,"props":2600,"children":2601},{"class":96,"line":966},[2602,2607],{"type":29,"tag":94,"props":2603,"children":2604},{"style":132},[2605],{"type":35,"value":2606},"    )",{"type":29,"tag":94,"props":2608,"children":2609},{"style":132},[2610],{"type":35,"value":1784},{"type":29,"tag":94,"props":2612,"children":2613},{"class":96,"line":992},[2614],{"type":29,"tag":94,"props":2615,"children":2616},{"emptyLinePlaceholder":12},[2617],{"type":35,"value":113},{"type":29,"tag":94,"props":2619,"children":2620},{"class":96,"line":1018},[2621,2626,2631,2635,2639,2643,2647,2651,2655,2659,2663,2667,2671],{"type":29,"tag":94,"props":2622,"children":2623},{"style":120},[2624],{"type":35,"value":2625},"    async",{"type":29,"tag":94,"props":2627,"children":2628},{"style":321},[2629],{"type":35,"value":2630}," createPaidOrder",{"type":29,"tag":94,"props":2632,"children":2633},{"style":132},[2634],{"type":35,"value":155},{"type":29,"tag":94,"props":2636,"children":2637},{"style":206},[2638],{"type":35,"value":2264},{"type":29,"tag":94,"props":2640,"children":2641},{"style":190},[2642],{"type":35,"value":723},{"type":29,"tag":94,"props":2644,"children":2645},{"style":126},[2646],{"type":35,"value":2273},{"type":29,"tag":94,"props":2648,"children":2649},{"style":132},[2650],{"type":35,"value":244},{"type":29,"tag":94,"props":2652,"children":2653},{"style":190},[2654],{"type":35,"value":723},{"type":29,"tag":94,"props":2656,"children":2657},{"style":126},[2658],{"type":35,"value":2286},{"type":29,"tag":94,"props":2660,"children":2661},{"style":2289},[2662],{"type":35,"value":2292},{"type":29,"tag":94,"props":2664,"children":2665},{"style":126},[2666],{"type":35,"value":2354},{"type":29,"tag":94,"props":2668,"children":2669},{"style":2289},[2670],{"type":35,"value":2302},{"type":29,"tag":94,"props":2672,"children":2673},{"style":132},[2674],{"type":35,"value":2247},{"type":29,"tag":94,"props":2676,"children":2677},{"class":96,"line":1026},[2678,2683,2688,2692,2697,2703,2708,2713,2717,2722],{"type":29,"tag":94,"props":2679,"children":2680},{"style":120},[2681],{"type":35,"value":2682},"        const",{"type":29,"tag":94,"props":2684,"children":2685},{"style":637},[2686],{"type":35,"value":2687}," paymentResult",{"type":29,"tag":94,"props":2689,"children":2690},{"style":190},[2691],{"type":35,"value":1915},{"type":29,"tag":94,"props":2693,"children":2694},{"style":120},[2695],{"type":35,"value":2696}," await",{"type":29,"tag":94,"props":2698,"children":2700},{"style":2699},"--shiki-default:#E78284;--shiki-dark:#79B8FF",[2701],{"type":35,"value":2702}," this",{"type":29,"tag":94,"props":2704,"children":2706},{"style":2705},"--shiki-default:#81C8BE;--shiki-dark:#E1E4E8",[2707],{"type":35,"value":181},{"type":29,"tag":94,"props":2709,"children":2710},{"style":184},[2711],{"type":35,"value":2712},"payment",{"type":29,"tag":94,"props":2714,"children":2715},{"style":2705},[2716],{"type":35,"value":181},{"type":29,"tag":94,"props":2718,"children":2719},{"style":321},[2720],{"type":35,"value":2721},"charge",{"type":29,"tag":94,"props":2723,"children":2724},{"style":184},[2725],{"type":35,"value":2543},{"type":29,"tag":94,"props":2727,"children":2728},{"class":96,"line":1078},[2729,2734,2738,2743],{"type":29,"tag":94,"props":2730,"children":2731},{"style":184},[2732],{"type":35,"value":2733},"            orderData",{"type":29,"tag":94,"props":2735,"children":2736},{"style":2705},[2737],{"type":35,"value":181},{"type":29,"tag":94,"props":2739,"children":2740},{"style":184},[2741],{"type":35,"value":2742},"total",{"type":29,"tag":94,"props":2744,"children":2745},{"style":132},[2746],{"type":35,"value":2573},{"type":29,"tag":94,"props":2748,"children":2749},{"class":96,"line":1123},[2750,2754,2758,2763],{"type":29,"tag":94,"props":2751,"children":2752},{"style":184},[2753],{"type":35,"value":2733},{"type":29,"tag":94,"props":2755,"children":2756},{"style":2705},[2757],{"type":35,"value":181},{"type":29,"tag":94,"props":2759,"children":2760},{"style":184},[2761],{"type":35,"value":2762},"currency",{"type":29,"tag":94,"props":2764,"children":2765},{"style":132},[2766],{"type":35,"value":2573},{"type":29,"tag":94,"props":2768,"children":2769},{"class":96,"line":1184},[2770,2774,2778],{"type":29,"tag":94,"props":2771,"children":2772},{"style":184},[2773],{"type":35,"value":2733},{"type":29,"tag":94,"props":2775,"children":2776},{"style":2705},[2777],{"type":35,"value":181},{"type":29,"tag":94,"props":2779,"children":2780},{"style":184},[2781],{"type":35,"value":2782},"paymentMethodId\n",{"type":29,"tag":94,"props":2784,"children":2785},{"class":96,"line":1196},[2786,2791],{"type":29,"tag":94,"props":2787,"children":2788},{"style":184},[2789],{"type":35,"value":2790},"        )",{"type":29,"tag":94,"props":2792,"children":2793},{"style":132},[2794],{"type":35,"value":2307},{"type":29,"tag":94,"props":2796,"children":2797},{"class":96,"line":1204},[2798],{"type":29,"tag":94,"props":2799,"children":2800},{"emptyLinePlaceholder":12},[2801],{"type":35,"value":113},{"type":29,"tag":94,"props":2803,"children":2804},{"class":96,"line":1213},[2805,2810,2815,2820,2825,2829,2834],{"type":29,"tag":94,"props":2806,"children":2807},{"style":120},[2808],{"type":35,"value":2809},"        if",{"type":29,"tag":94,"props":2811,"children":2812},{"style":184},[2813],{"type":35,"value":2814}," (",{"type":29,"tag":94,"props":2816,"children":2817},{"style":190},[2818],{"type":35,"value":2819},"!",{"type":29,"tag":94,"props":2821,"children":2822},{"style":184},[2823],{"type":35,"value":2824},"paymentResult",{"type":29,"tag":94,"props":2826,"children":2827},{"style":2705},[2828],{"type":35,"value":181},{"type":29,"tag":94,"props":2830,"children":2831},{"style":184},[2832],{"type":35,"value":2833},"success) ",{"type":29,"tag":94,"props":2835,"children":2836},{"style":132},[2837],{"type":35,"value":2838},"{\n",{"type":29,"tag":94,"props":2840,"children":2841},{"class":96,"line":1238},[2842,2847,2853,2858,2863,2867,2872],{"type":29,"tag":94,"props":2843,"children":2844},{"style":120},[2845],{"type":35,"value":2846},"            throw",{"type":29,"tag":94,"props":2848,"children":2850},{"style":2849},"--shiki-default:#CA9EE6;--shiki-default-font-weight:bold;--shiki-dark:#F97583;--shiki-dark-font-weight:inherit",[2851],{"type":35,"value":2852}," new",{"type":29,"tag":94,"props":2854,"children":2855},{"style":321},[2856],{"type":35,"value":2857}," PaymentFailedError",{"type":29,"tag":94,"props":2859,"children":2860},{"style":184},[2861],{"type":35,"value":2862},"(paymentResult",{"type":29,"tag":94,"props":2864,"children":2865},{"style":2705},[2866],{"type":35,"value":181},{"type":29,"tag":94,"props":2868,"children":2869},{"style":184},[2870],{"type":35,"value":2871},"errorCode)",{"type":29,"tag":94,"props":2873,"children":2874},{"style":132},[2875],{"type":35,"value":2307},{"type":29,"tag":94,"props":2877,"children":2878},{"class":96,"line":1290},[2879],{"type":29,"tag":94,"props":2880,"children":2881},{"style":132},[2882],{"type":35,"value":2883},"        }\n",{"type":29,"tag":94,"props":2885,"children":2886},{"class":96,"line":1340},[2887],{"type":29,"tag":94,"props":2888,"children":2889},{"emptyLinePlaceholder":12},[2890],{"type":35,"value":113},{"type":29,"tag":94,"props":2892,"children":2893},{"class":96,"line":1348},[2894,2898,2903,2907,2911,2915,2919,2923,2927,2931,2935],{"type":29,"tag":94,"props":2895,"children":2896},{"style":120},[2897],{"type":35,"value":2682},{"type":29,"tag":94,"props":2899,"children":2900},{"style":637},[2901],{"type":35,"value":2902}," orderId",{"type":29,"tag":94,"props":2904,"children":2905},{"style":190},[2906],{"type":35,"value":1915},{"type":29,"tag":94,"props":2908,"children":2909},{"style":120},[2910],{"type":35,"value":2696},{"type":29,"tag":94,"props":2912,"children":2913},{"style":2699},[2914],{"type":35,"value":2702},{"type":29,"tag":94,"props":2916,"children":2917},{"style":2705},[2918],{"type":35,"value":181},{"type":29,"tag":94,"props":2920,"children":2921},{"style":184},[2922],{"type":35,"value":1100},{"type":29,"tag":94,"props":2924,"children":2925},{"style":2705},[2926],{"type":35,"value":181},{"type":29,"tag":94,"props":2928,"children":2929},{"style":321},[2930],{"type":35,"value":382},{"type":29,"tag":94,"props":2932,"children":2933},{"style":184},[2934],{"type":35,"value":155},{"type":29,"tag":94,"props":2936,"children":2937},{"style":132},[2938],{"type":35,"value":2838},{"type":29,"tag":94,"props":2940,"children":2941},{"class":96,"line":10},[2942,2947,2951],{"type":29,"tag":94,"props":2943,"children":2944},{"style":190},[2945],{"type":35,"value":2946},"            ...",{"type":29,"tag":94,"props":2948,"children":2949},{"style":184},[2950],{"type":35,"value":2264},{"type":29,"tag":94,"props":2952,"children":2953},{"style":132},[2954],{"type":35,"value":2573},{"type":29,"tag":94,"props":2956,"children":2957},{"class":96,"line":1440},[2958,2963,2967,2971,2975,2980],{"type":29,"tag":94,"props":2959,"children":2960},{"style":184},[2961],{"type":35,"value":2962},"            paymentId",{"type":29,"tag":94,"props":2964,"children":2965},{"style":2705},[2966],{"type":35,"value":723},{"type":29,"tag":94,"props":2968,"children":2969},{"style":184},[2970],{"type":35,"value":2687},{"type":29,"tag":94,"props":2972,"children":2973},{"style":2705},[2974],{"type":35,"value":181},{"type":29,"tag":94,"props":2976,"children":2977},{"style":184},[2978],{"type":35,"value":2979},"transactionId",{"type":29,"tag":94,"props":2981,"children":2982},{"style":132},[2983],{"type":35,"value":2573},{"type":29,"tag":94,"props":2985,"children":2986},{"class":96,"line":1537},[2987,2992,2996],{"type":29,"tag":94,"props":2988,"children":2989},{"style":184},[2990],{"type":35,"value":2991},"            status",{"type":29,"tag":94,"props":2993,"children":2994},{"style":2705},[2995],{"type":35,"value":723},{"type":29,"tag":94,"props":2997,"children":2998},{"style":216},[2999],{"type":35,"value":3000}," 'paid'\n",{"type":29,"tag":94,"props":3002,"children":3003},{"class":96,"line":1545},[3004,3009,3013],{"type":29,"tag":94,"props":3005,"children":3006},{"style":132},[3007],{"type":35,"value":3008},"        }",{"type":29,"tag":94,"props":3010,"children":3011},{"style":184},[3012],{"type":35,"value":244},{"type":29,"tag":94,"props":3014,"children":3015},{"style":132},[3016],{"type":35,"value":2307},{"type":29,"tag":94,"props":3018,"children":3019},{"class":96,"line":1554},[3020],{"type":29,"tag":94,"props":3021,"children":3022},{"emptyLinePlaceholder":12},[3023],{"type":35,"value":113},{"type":29,"tag":94,"props":3025,"children":3026},{"class":96,"line":1573},[3027,3031,3035,3039,3043,3047,3052,3057],{"type":29,"tag":94,"props":3028,"children":3029},{"style":120},[3030],{"type":35,"value":472},{"type":29,"tag":94,"props":3032,"children":3033},{"style":2699},[3034],{"type":35,"value":2702},{"type":29,"tag":94,"props":3036,"children":3037},{"style":2705},[3038],{"type":35,"value":181},{"type":29,"tag":94,"props":3040,"children":3041},{"style":184},[3042],{"type":35,"value":1100},{"type":29,"tag":94,"props":3044,"children":3045},{"style":2705},[3046],{"type":35,"value":181},{"type":29,"tag":94,"props":3048,"children":3049},{"style":321},[3050],{"type":35,"value":3051},"findById",{"type":29,"tag":94,"props":3053,"children":3054},{"style":184},[3055],{"type":35,"value":3056},"(orderId)",{"type":29,"tag":94,"props":3058,"children":3059},{"style":132},[3060],{"type":35,"value":2307},{"type":29,"tag":94,"props":3062,"children":3063},{"class":96,"line":1602},[3064],{"type":29,"tag":94,"props":3065,"children":3066},{"style":132},[3067],{"type":35,"value":3068},"    }\n",{"type":29,"tag":94,"props":3070,"children":3071},{"class":96,"line":1659},[3072],{"type":29,"tag":94,"props":3073,"children":3074},{"style":132},[3075],{"type":35,"value":2381},{"type":29,"tag":94,"props":3077,"children":3079},{"class":96,"line":3078},38,[3080],{"type":29,"tag":94,"props":3081,"children":3082},{"emptyLinePlaceholder":12},[3083],{"type":35,"value":113},{"type":29,"tag":94,"props":3085,"children":3087},{"class":96,"line":3086},39,[3088],{"type":29,"tag":94,"props":3089,"children":3090},{"style":101},[3091],{"type":35,"value":3092},"// Test — sans Stripe, sans base de données\n",{"type":29,"tag":94,"props":3094,"children":3096},{"class":96,"line":3095},40,[3097,3102,3106,3111,3115,3120,3125],{"type":29,"tag":94,"props":3098,"children":3099},{"style":321},[3100],{"type":35,"value":3101},"describe",{"type":29,"tag":94,"props":3103,"children":3104},{"style":184},[3105],{"type":35,"value":155},{"type":29,"tag":94,"props":3107,"children":3108},{"style":216},[3109],{"type":35,"value":3110},"'OrderService'",{"type":29,"tag":94,"props":3112,"children":3113},{"style":132},[3114],{"type":35,"value":224},{"type":29,"tag":94,"props":3116,"children":3117},{"style":132},[3118],{"type":35,"value":3119}," ()",{"type":29,"tag":94,"props":3121,"children":3122},{"style":190},[3123],{"type":35,"value":3124}," =>",{"type":29,"tag":94,"props":3126,"children":3127},{"style":132},[3128],{"type":35,"value":2247},{"type":29,"tag":94,"props":3130,"children":3132},{"class":96,"line":3131},41,[3133,3138,3142,3147,3151,3156,3160,3164],{"type":29,"tag":94,"props":3134,"children":3135},{"style":321},[3136],{"type":35,"value":3137},"    it",{"type":29,"tag":94,"props":3139,"children":3140},{"style":184},[3141],{"type":35,"value":155},{"type":29,"tag":94,"props":3143,"children":3144},{"style":216},[3145],{"type":35,"value":3146},"'should create order with successful payment'",{"type":29,"tag":94,"props":3148,"children":3149},{"style":132},[3150],{"type":35,"value":224},{"type":29,"tag":94,"props":3152,"children":3153},{"style":120},[3154],{"type":35,"value":3155}," async",{"type":29,"tag":94,"props":3157,"children":3158},{"style":132},[3159],{"type":35,"value":3119},{"type":29,"tag":94,"props":3161,"children":3162},{"style":190},[3163],{"type":35,"value":3124},{"type":29,"tag":94,"props":3165,"children":3166},{"style":132},[3167],{"type":35,"value":2247},{"type":29,"tag":94,"props":3169,"children":3171},{"class":96,"line":3170},42,[3172,3176,3181,3185,3189,3193],{"type":29,"tag":94,"props":3173,"children":3174},{"style":120},[3175],{"type":35,"value":2682},{"type":29,"tag":94,"props":3177,"children":3178},{"style":637},[3179],{"type":35,"value":3180}," mockRepository",{"type":29,"tag":94,"props":3182,"children":3183},{"style":190},[3184],{"type":35,"value":723},{"type":29,"tag":94,"props":3186,"children":3187},{"style":126},[3188],{"type":35,"value":668},{"type":29,"tag":94,"props":3190,"children":3191},{"style":190},[3192],{"type":35,"value":1915},{"type":29,"tag":94,"props":3194,"children":3195},{"style":132},[3196],{"type":35,"value":2247},{"type":29,"tag":94,"props":3198,"children":3200},{"class":96,"line":3199},43,[3201,3206,3210,3215,3219,3224,3229,3233,3238,3242,3247,3251],{"type":29,"tag":94,"props":3202,"children":3203},{"style":184},[3204],{"type":35,"value":3205},"            save",{"type":29,"tag":94,"props":3207,"children":3208},{"style":2705},[3209],{"type":35,"value":723},{"type":29,"tag":94,"props":3211,"children":3212},{"style":184},[3213],{"type":35,"value":3214}," jest",{"type":29,"tag":94,"props":3216,"children":3217},{"style":2705},[3218],{"type":35,"value":181},{"type":29,"tag":94,"props":3220,"children":3221},{"style":321},[3222],{"type":35,"value":3223},"fn",{"type":29,"tag":94,"props":3225,"children":3226},{"style":184},[3227],{"type":35,"value":3228},"()",{"type":29,"tag":94,"props":3230,"children":3231},{"style":2705},[3232],{"type":35,"value":181},{"type":29,"tag":94,"props":3234,"children":3235},{"style":321},[3236],{"type":35,"value":3237},"mockResolvedValue",{"type":29,"tag":94,"props":3239,"children":3240},{"style":184},[3241],{"type":35,"value":155},{"type":29,"tag":94,"props":3243,"children":3244},{"style":216},[3245],{"type":35,"value":3246},"'order-123'",{"type":29,"tag":94,"props":3248,"children":3249},{"style":184},[3250],{"type":35,"value":244},{"type":29,"tag":94,"props":3252,"children":3253},{"style":132},[3254],{"type":35,"value":2573},{"type":29,"tag":94,"props":3256,"children":3258},{"class":96,"line":3257},44,[3259,3264,3268,3272,3276,3280,3284,3288,3292,3296,3300,3305,3309,3314,3318,3323,3327,3332,3337],{"type":29,"tag":94,"props":3260,"children":3261},{"style":184},[3262],{"type":35,"value":3263},"            findById",{"type":29,"tag":94,"props":3265,"children":3266},{"style":2705},[3267],{"type":35,"value":723},{"type":29,"tag":94,"props":3269,"children":3270},{"style":184},[3271],{"type":35,"value":3214},{"type":29,"tag":94,"props":3273,"children":3274},{"style":2705},[3275],{"type":35,"value":181},{"type":29,"tag":94,"props":3277,"children":3278},{"style":321},[3279],{"type":35,"value":3223},{"type":29,"tag":94,"props":3281,"children":3282},{"style":184},[3283],{"type":35,"value":3228},{"type":29,"tag":94,"props":3285,"children":3286},{"style":2705},[3287],{"type":35,"value":181},{"type":29,"tag":94,"props":3289,"children":3290},{"style":321},[3291],{"type":35,"value":3237},{"type":29,"tag":94,"props":3293,"children":3294},{"style":184},[3295],{"type":35,"value":155},{"type":29,"tag":94,"props":3297,"children":3298},{"style":132},[3299],{"type":35,"value":1516},{"type":29,"tag":94,"props":3301,"children":3302},{"style":184},[3303],{"type":35,"value":3304}," id",{"type":29,"tag":94,"props":3306,"children":3307},{"style":2705},[3308],{"type":35,"value":723},{"type":29,"tag":94,"props":3310,"children":3311},{"style":216},[3312],{"type":35,"value":3313}," 'order-123'",{"type":29,"tag":94,"props":3315,"children":3316},{"style":132},[3317],{"type":35,"value":224},{"type":29,"tag":94,"props":3319,"children":3320},{"style":184},[3321],{"type":35,"value":3322}," status",{"type":29,"tag":94,"props":3324,"children":3325},{"style":2705},[3326],{"type":35,"value":723},{"type":29,"tag":94,"props":3328,"children":3329},{"style":216},[3330],{"type":35,"value":3331}," 'paid'",{"type":29,"tag":94,"props":3333,"children":3334},{"style":132},[3335],{"type":35,"value":3336}," }",{"type":29,"tag":94,"props":3338,"children":3339},{"style":184},[3340],{"type":35,"value":396},{"type":29,"tag":94,"props":3342,"children":3344},{"class":96,"line":3343},45,[3345],{"type":29,"tag":94,"props":3346,"children":3347},{"style":132},[3348],{"type":35,"value":3349},"        };\n",{"type":29,"tag":94,"props":3351,"children":3353},{"class":96,"line":3352},46,[3354],{"type":29,"tag":94,"props":3355,"children":3356},{"emptyLinePlaceholder":12},[3357],{"type":35,"value":113},{"type":29,"tag":94,"props":3359,"children":3361},{"class":96,"line":3360},47,[3362,3366,3371,3375,3379,3383],{"type":29,"tag":94,"props":3363,"children":3364},{"style":120},[3365],{"type":35,"value":2682},{"type":29,"tag":94,"props":3367,"children":3368},{"style":637},[3369],{"type":35,"value":3370}," mockPayment",{"type":29,"tag":94,"props":3372,"children":3373},{"style":190},[3374],{"type":35,"value":723},{"type":29,"tag":94,"props":3376,"children":3377},{"style":126},[3378],{"type":35,"value":2400},{"type":29,"tag":94,"props":3380,"children":3381},{"style":190},[3382],{"type":35,"value":1915},{"type":29,"tag":94,"props":3384,"children":3385},{"style":132},[3386],{"type":35,"value":2247},{"type":29,"tag":94,"props":3388,"children":3390},{"class":96,"line":3389},48,[3391,3396,3400,3404,3408,3412,3416,3420,3424,3428,3432,3437,3441,3446,3450,3455,3459,3464,3468],{"type":29,"tag":94,"props":3392,"children":3393},{"style":184},[3394],{"type":35,"value":3395},"            charge",{"type":29,"tag":94,"props":3397,"children":3398},{"style":2705},[3399],{"type":35,"value":723},{"type":29,"tag":94,"props":3401,"children":3402},{"style":184},[3403],{"type":35,"value":3214},{"type":29,"tag":94,"props":3405,"children":3406},{"style":2705},[3407],{"type":35,"value":181},{"type":29,"tag":94,"props":3409,"children":3410},{"style":321},[3411],{"type":35,"value":3223},{"type":29,"tag":94,"props":3413,"children":3414},{"style":184},[3415],{"type":35,"value":3228},{"type":29,"tag":94,"props":3417,"children":3418},{"style":2705},[3419],{"type":35,"value":181},{"type":29,"tag":94,"props":3421,"children":3422},{"style":321},[3423],{"type":35,"value":3237},{"type":29,"tag":94,"props":3425,"children":3426},{"style":184},[3427],{"type":35,"value":155},{"type":29,"tag":94,"props":3429,"children":3430},{"style":132},[3431],{"type":35,"value":1516},{"type":29,"tag":94,"props":3433,"children":3434},{"style":184},[3435],{"type":35,"value":3436}," success",{"type":29,"tag":94,"props":3438,"children":3439},{"style":2705},[3440],{"type":35,"value":723},{"type":29,"tag":94,"props":3442,"children":3443},{"style":236},[3444],{"type":35,"value":3445}," true",{"type":29,"tag":94,"props":3447,"children":3448},{"style":132},[3449],{"type":35,"value":224},{"type":29,"tag":94,"props":3451,"children":3452},{"style":184},[3453],{"type":35,"value":3454}," transactionId",{"type":29,"tag":94,"props":3456,"children":3457},{"style":2705},[3458],{"type":35,"value":723},{"type":29,"tag":94,"props":3460,"children":3461},{"style":216},[3462],{"type":35,"value":3463}," 'txn-456'",{"type":29,"tag":94,"props":3465,"children":3466},{"style":132},[3467],{"type":35,"value":3336},{"type":29,"tag":94,"props":3469,"children":3470},{"style":184},[3471],{"type":35,"value":396},{"type":29,"tag":94,"props":3473,"children":3475},{"class":96,"line":3474},49,[3476],{"type":29,"tag":94,"props":3477,"children":3478},{"style":132},[3479],{"type":35,"value":3349},{"type":29,"tag":94,"props":3481,"children":3483},{"class":96,"line":3482},50,[3484],{"type":29,"tag":94,"props":3485,"children":3486},{"emptyLinePlaceholder":12},[3487],{"type":35,"value":113},{"type":29,"tag":94,"props":3489,"children":3491},{"class":96,"line":3490},51,[3492,3496,3500,3504,3508,3512,3517,3521,3526],{"type":29,"tag":94,"props":3493,"children":3494},{"style":120},[3495],{"type":35,"value":2682},{"type":29,"tag":94,"props":3497,"children":3498},{"style":637},[3499],{"type":35,"value":2054},{"type":29,"tag":94,"props":3501,"children":3502},{"style":190},[3503],{"type":35,"value":1915},{"type":29,"tag":94,"props":3505,"children":3506},{"style":2849},[3507],{"type":35,"value":2852},{"type":29,"tag":94,"props":3509,"children":3510},{"style":321},[3511],{"type":35,"value":129},{"type":29,"tag":94,"props":3513,"children":3514},{"style":184},[3515],{"type":35,"value":3516},"(mockRepository",{"type":29,"tag":94,"props":3518,"children":3519},{"style":132},[3520],{"type":35,"value":224},{"type":29,"tag":94,"props":3522,"children":3523},{"style":184},[3524],{"type":35,"value":3525}," mockPayment)",{"type":29,"tag":94,"props":3527,"children":3528},{"style":132},[3529],{"type":35,"value":2307},{"type":29,"tag":94,"props":3531,"children":3533},{"class":96,"line":3532},52,[3534,3538,3543,3547,3551,3555,3559,3564,3568,3572,3577,3581,3586,3590,3594,3598,3603,3607,3611],{"type":29,"tag":94,"props":3535,"children":3536},{"style":120},[3537],{"type":35,"value":2682},{"type":29,"tag":94,"props":3539,"children":3540},{"style":637},[3541],{"type":35,"value":3542}," order",{"type":29,"tag":94,"props":3544,"children":3545},{"style":190},[3546],{"type":35,"value":1915},{"type":29,"tag":94,"props":3548,"children":3549},{"style":120},[3550],{"type":35,"value":2696},{"type":29,"tag":94,"props":3552,"children":3553},{"style":184},[3554],{"type":35,"value":2054},{"type":29,"tag":94,"props":3556,"children":3557},{"style":2705},[3558],{"type":35,"value":181},{"type":29,"tag":94,"props":3560,"children":3561},{"style":321},[3562],{"type":35,"value":3563},"createPaidOrder",{"type":29,"tag":94,"props":3565,"children":3566},{"style":184},[3567],{"type":35,"value":155},{"type":29,"tag":94,"props":3569,"children":3570},{"style":132},[3571],{"type":35,"value":1516},{"type":29,"tag":94,"props":3573,"children":3574},{"style":184},[3575],{"type":35,"value":3576}," total",{"type":29,"tag":94,"props":3578,"children":3579},{"style":2705},[3580],{"type":35,"value":723},{"type":29,"tag":94,"props":3582,"children":3583},{"style":236},[3584],{"type":35,"value":3585}," 1000",{"type":29,"tag":94,"props":3587,"children":3588},{"style":132},[3589],{"type":35,"value":224},{"type":29,"tag":94,"props":3591,"children":3592},{"style":184},[3593],{"type":35,"value":2439},{"type":29,"tag":94,"props":3595,"children":3596},{"style":2705},[3597],{"type":35,"value":723},{"type":29,"tag":94,"props":3599,"children":3600},{"style":216},[3601],{"type":35,"value":3602}," 'EUR'",{"type":29,"tag":94,"props":3604,"children":3605},{"style":132},[3606],{"type":35,"value":3336},{"type":29,"tag":94,"props":3608,"children":3609},{"style":184},[3610],{"type":35,"value":244},{"type":29,"tag":94,"props":3612,"children":3613},{"style":132},[3614],{"type":35,"value":2307},{"type":29,"tag":94,"props":3616,"children":3618},{"class":96,"line":3617},53,[3619],{"type":29,"tag":94,"props":3620,"children":3621},{"emptyLinePlaceholder":12},[3622],{"type":35,"value":113},{"type":29,"tag":94,"props":3624,"children":3626},{"class":96,"line":3625},54,[3627,3632,3637,3641,3646,3650,3655,3659,3664,3668],{"type":29,"tag":94,"props":3628,"children":3629},{"style":321},[3630],{"type":35,"value":3631},"        expect",{"type":29,"tag":94,"props":3633,"children":3634},{"style":184},[3635],{"type":35,"value":3636},"(order",{"type":29,"tag":94,"props":3638,"children":3639},{"style":2705},[3640],{"type":35,"value":181},{"type":29,"tag":94,"props":3642,"children":3643},{"style":184},[3644],{"type":35,"value":3645},"status)",{"type":29,"tag":94,"props":3647,"children":3648},{"style":2705},[3649],{"type":35,"value":181},{"type":29,"tag":94,"props":3651,"children":3652},{"style":321},[3653],{"type":35,"value":3654},"toBe",{"type":29,"tag":94,"props":3656,"children":3657},{"style":184},[3658],{"type":35,"value":155},{"type":29,"tag":94,"props":3660,"children":3661},{"style":216},[3662],{"type":35,"value":3663},"'paid'",{"type":29,"tag":94,"props":3665,"children":3666},{"style":184},[3667],{"type":35,"value":244},{"type":29,"tag":94,"props":3669,"children":3670},{"style":132},[3671],{"type":35,"value":2307},{"type":29,"tag":94,"props":3673,"children":3675},{"class":96,"line":3674},55,[3676,3681,3685],{"type":29,"tag":94,"props":3677,"children":3678},{"style":132},[3679],{"type":35,"value":3680},"    }",{"type":29,"tag":94,"props":3682,"children":3683},{"style":184},[3684],{"type":35,"value":244},{"type":29,"tag":94,"props":3686,"children":3687},{"style":132},[3688],{"type":35,"value":2307},{"type":29,"tag":94,"props":3690,"children":3692},{"class":96,"line":3691},56,[3693,3698,3702],{"type":29,"tag":94,"props":3694,"children":3695},{"style":132},[3696],{"type":35,"value":3697},"}",{"type":29,"tag":94,"props":3699,"children":3700},{"style":184},[3701],{"type":35,"value":244},{"type":29,"tag":94,"props":3703,"children":3704},{"style":132},[3705],{"type":35,"value":2307},{"type":29,"tag":37,"props":3707,"children":3708},{},[3709,3714],{"type":29,"tag":482,"props":3710,"children":3711},{},[3712],{"type":35,"value":3713},"L'avantage TypeScript :",{"type":35,"value":3715}," les interfaces sont vérifiées à la compilation. Si une implémentation ne respecte pas l'interface, le compilateur rejette le code avant même l'exécution.",{"type":29,"tag":53,"props":3717,"children":3718},{},[],{"type":29,"tag":57,"props":3720,"children":3722},{"id":3721},"exemple-3-java-le-dip-avec-spring",[3723],{"type":35,"value":3724},"Exemple 3 : Java, le DIP avec Spring",{"type":29,"tag":83,"props":3726,"children":3730},{"code":3727,"language":3728,"meta":7,"className":3729,"style":7},"// L'abstraction\npublic interface NotificationService {\n    void sendOrderConfirmation(String userId, String orderId);\n    void sendShippingUpdate(String userId, String orderId, String trackingCode);\n}\n\n// Le module de haut niveau (service métier)\n@Service\npublic class OrderFulfillmentService {\n\n    private final OrderRepository orderRepository;\n    private final NotificationService notificationService;\n\n    public OrderFulfillmentService(\n            OrderRepository orderRepository,\n            NotificationService notificationService) {\n        this.orderRepository = orderRepository;\n        this.notificationService = notificationService;\n    }\n\n    public void fulfillOrder(String orderId) {\n        Order order = orderRepository.findById(orderId)\n            .orElseThrow(() -> new OrderNotFoundException(orderId));\n\n        order.setStatus(OrderStatus.FULFILLING);\n        orderRepository.save(order);\n\n        notificationService.sendOrderConfirmation(order.getUserId(), orderId);\n    }\n}\n\n// Implémentation de test\n@Service\n@Profile(\"test\")\npublic class MockNotificationService implements NotificationService {\n\n    private final List\u003CString> sentNotifications = new ArrayList\u003C>();\n\n    @Override\n    public void sendOrderConfirmation(String userId, String orderId) {\n        sentNotifications.add(\"confirmation:\" + userId + \":\" + orderId);\n    }\n}\n","java","language-java shiki shiki-themes catppuccin-frappe github-dark",[3731],{"type":29,"tag":90,"props":3732,"children":3733},{"__ignoreMap":7},[3734,3742,3764,3810,3863,3870,3877,3885,3900,3921,3928,3954,3978,3985,4001,4017,4037,4066,4094,4101,4108,4145,4186,4230,4237,4276,4305,4312,4359,4366,4373,4380,4388,4399,4424,4453,4460,4511,4518,4531,4578,4636,4643],{"type":29,"tag":94,"props":3735,"children":3736},{"class":96,"line":97},[3737],{"type":29,"tag":94,"props":3738,"children":3739},{"style":101},[3740],{"type":35,"value":3741},"// L'abstraction\n",{"type":29,"tag":94,"props":3743,"children":3744},{"class":96,"line":107},[3745,3750,3755,3760],{"type":29,"tag":94,"props":3746,"children":3747},{"style":120},[3748],{"type":35,"value":3749},"public",{"type":29,"tag":94,"props":3751,"children":3752},{"style":120},[3753],{"type":35,"value":3754}," interface",{"type":29,"tag":94,"props":3756,"children":3757},{"style":126},[3758],{"type":35,"value":3759}," NotificationService",{"type":29,"tag":94,"props":3761,"children":3762},{"style":132},[3763],{"type":35,"value":2247},{"type":29,"tag":94,"props":3765,"children":3766},{"class":96,"line":116},[3767,3772,3777,3781,3787,3792,3796,3801,3805],{"type":29,"tag":94,"props":3768,"children":3769},{"style":120},[3770],{"type":35,"value":3771},"    void",{"type":29,"tag":94,"props":3773,"children":3774},{"style":321},[3775],{"type":35,"value":3776}," sendOrderConfirmation",{"type":29,"tag":94,"props":3778,"children":3779},{"style":132},[3780],{"type":35,"value":155},{"type":29,"tag":94,"props":3782,"children":3784},{"style":3783},"--shiki-default:#CA9EE6;--shiki-dark:#E1E4E8",[3785],{"type":35,"value":3786},"String",{"type":29,"tag":94,"props":3788,"children":3789},{"style":206},[3790],{"type":35,"value":3791}," userId",{"type":29,"tag":94,"props":3793,"children":3794},{"style":132},[3795],{"type":35,"value":224},{"type":29,"tag":94,"props":3797,"children":3798},{"style":3783},[3799],{"type":35,"value":3800}," String",{"type":29,"tag":94,"props":3802,"children":3803},{"style":206},[3804],{"type":35,"value":2902},{"type":29,"tag":94,"props":3806,"children":3807},{"style":132},[3808],{"type":35,"value":3809},");\n",{"type":29,"tag":94,"props":3811,"children":3812},{"class":96,"line":138},[3813,3817,3822,3826,3830,3834,3838,3842,3846,3850,3854,3859],{"type":29,"tag":94,"props":3814,"children":3815},{"style":120},[3816],{"type":35,"value":3771},{"type":29,"tag":94,"props":3818,"children":3819},{"style":321},[3820],{"type":35,"value":3821}," sendShippingUpdate",{"type":29,"tag":94,"props":3823,"children":3824},{"style":132},[3825],{"type":35,"value":155},{"type":29,"tag":94,"props":3827,"children":3828},{"style":3783},[3829],{"type":35,"value":3786},{"type":29,"tag":94,"props":3831,"children":3832},{"style":206},[3833],{"type":35,"value":3791},{"type":29,"tag":94,"props":3835,"children":3836},{"style":132},[3837],{"type":35,"value":224},{"type":29,"tag":94,"props":3839,"children":3840},{"style":3783},[3841],{"type":35,"value":3800},{"type":29,"tag":94,"props":3843,"children":3844},{"style":206},[3845],{"type":35,"value":2902},{"type":29,"tag":94,"props":3847,"children":3848},{"style":132},[3849],{"type":35,"value":224},{"type":29,"tag":94,"props":3851,"children":3852},{"style":3783},[3853],{"type":35,"value":3800},{"type":29,"tag":94,"props":3855,"children":3856},{"style":206},[3857],{"type":35,"value":3858}," trackingCode",{"type":29,"tag":94,"props":3860,"children":3861},{"style":132},[3862],{"type":35,"value":3809},{"type":29,"tag":94,"props":3864,"children":3865},{"class":96,"line":169},[3866],{"type":29,"tag":94,"props":3867,"children":3868},{"style":132},[3869],{"type":35,"value":2381},{"type":29,"tag":94,"props":3871,"children":3872},{"class":96,"line":252},[3873],{"type":29,"tag":94,"props":3874,"children":3875},{"emptyLinePlaceholder":12},[3876],{"type":35,"value":113},{"type":29,"tag":94,"props":3878,"children":3879},{"class":96,"line":305},[3880],{"type":29,"tag":94,"props":3881,"children":3882},{"style":101},[3883],{"type":35,"value":3884},"// Le module de haut niveau (service métier)\n",{"type":29,"tag":94,"props":3886,"children":3887},{"class":96,"line":313},[3888,3894],{"type":29,"tag":94,"props":3889,"children":3891},{"style":3890},"--shiki-default:#EF9F76;--shiki-dark:#E1E4E8",[3892],{"type":35,"value":3893},"@",{"type":29,"tag":94,"props":3895,"children":3897},{"style":3896},"--shiki-default:#EF9F76;--shiki-dark:#F97583",[3898],{"type":35,"value":3899},"Service\n",{"type":29,"tag":94,"props":3901,"children":3902},{"class":96,"line":349},[3903,3907,3912,3917],{"type":29,"tag":94,"props":3904,"children":3905},{"style":120},[3906],{"type":35,"value":3749},{"type":29,"tag":94,"props":3908,"children":3909},{"style":120},[3910],{"type":35,"value":3911}," class",{"type":29,"tag":94,"props":3913,"children":3914},{"style":126},[3915],{"type":35,"value":3916}," OrderFulfillmentService",{"type":29,"tag":94,"props":3918,"children":3919},{"style":132},[3920],{"type":35,"value":2247},{"type":29,"tag":94,"props":3922,"children":3923},{"class":96,"line":399},[3924],{"type":29,"tag":94,"props":3925,"children":3926},{"emptyLinePlaceholder":12},[3927],{"type":35,"value":113},{"type":29,"tag":94,"props":3929,"children":3930},{"class":96,"line":466},[3931,3936,3941,3945,3950],{"type":29,"tag":94,"props":3932,"children":3933},{"style":120},[3934],{"type":35,"value":3935},"    private",{"type":29,"tag":94,"props":3937,"children":3938},{"style":120},[3939],{"type":35,"value":3940}," final",{"type":29,"tag":94,"props":3942,"children":3943},{"style":3783},[3944],{"type":35,"value":668},{"type":29,"tag":94,"props":3946,"children":3947},{"style":184},[3948],{"type":35,"value":3949}," orderRepository",{"type":29,"tag":94,"props":3951,"children":3952},{"style":132},[3953],{"type":35,"value":2307},{"type":29,"tag":94,"props":3955,"children":3956},{"class":96,"line":874},[3957,3961,3965,3969,3974],{"type":29,"tag":94,"props":3958,"children":3959},{"style":120},[3960],{"type":35,"value":3935},{"type":29,"tag":94,"props":3962,"children":3963},{"style":120},[3964],{"type":35,"value":3940},{"type":29,"tag":94,"props":3966,"children":3967},{"style":3783},[3968],{"type":35,"value":3759},{"type":29,"tag":94,"props":3970,"children":3971},{"style":184},[3972],{"type":35,"value":3973}," notificationService",{"type":29,"tag":94,"props":3975,"children":3976},{"style":132},[3977],{"type":35,"value":2307},{"type":29,"tag":94,"props":3979,"children":3980},{"class":96,"line":882},[3981],{"type":29,"tag":94,"props":3982,"children":3983},{"emptyLinePlaceholder":12},[3984],{"type":35,"value":113},{"type":29,"tag":94,"props":3986,"children":3987},{"class":96,"line":891},[3988,3993,3997],{"type":29,"tag":94,"props":3989,"children":3990},{"style":120},[3991],{"type":35,"value":3992},"    public",{"type":29,"tag":94,"props":3994,"children":3995},{"style":321},[3996],{"type":35,"value":3916},{"type":29,"tag":94,"props":3998,"children":3999},{"style":132},[4000],{"type":35,"value":2543},{"type":29,"tag":94,"props":4002,"children":4003},{"class":96,"line":907},[4004,4009,4013],{"type":29,"tag":94,"props":4005,"children":4006},{"style":3783},[4007],{"type":35,"value":4008},"            OrderRepository",{"type":29,"tag":94,"props":4010,"children":4011},{"style":206},[4012],{"type":35,"value":3949},{"type":29,"tag":94,"props":4014,"children":4015},{"style":132},[4016],{"type":35,"value":2573},{"type":29,"tag":94,"props":4018,"children":4019},{"class":96,"line":966},[4020,4025,4029,4033],{"type":29,"tag":94,"props":4021,"children":4022},{"style":3783},[4023],{"type":35,"value":4024},"            NotificationService",{"type":29,"tag":94,"props":4026,"children":4027},{"style":206},[4028],{"type":35,"value":3973},{"type":29,"tag":94,"props":4030,"children":4031},{"style":132},[4032],{"type":35,"value":244},{"type":29,"tag":94,"props":4034,"children":4035},{"style":132},[4036],{"type":35,"value":2247},{"type":29,"tag":94,"props":4038,"children":4039},{"class":96,"line":992},[4040,4045,4049,4054,4058,4062],{"type":29,"tag":94,"props":4041,"children":4042},{"style":2699},[4043],{"type":35,"value":4044},"        this",{"type":29,"tag":94,"props":4046,"children":4047},{"style":132},[4048],{"type":35,"value":181},{"type":29,"tag":94,"props":4050,"children":4051},{"style":184},[4052],{"type":35,"value":4053},"orderRepository ",{"type":29,"tag":94,"props":4055,"children":4056},{"style":190},[4057],{"type":35,"value":193},{"type":29,"tag":94,"props":4059,"children":4060},{"style":184},[4061],{"type":35,"value":3949},{"type":29,"tag":94,"props":4063,"children":4064},{"style":132},[4065],{"type":35,"value":2307},{"type":29,"tag":94,"props":4067,"children":4068},{"class":96,"line":1018},[4069,4073,4077,4082,4086,4090],{"type":29,"tag":94,"props":4070,"children":4071},{"style":2699},[4072],{"type":35,"value":4044},{"type":29,"tag":94,"props":4074,"children":4075},{"style":132},[4076],{"type":35,"value":181},{"type":29,"tag":94,"props":4078,"children":4079},{"style":184},[4080],{"type":35,"value":4081},"notificationService ",{"type":29,"tag":94,"props":4083,"children":4084},{"style":190},[4085],{"type":35,"value":193},{"type":29,"tag":94,"props":4087,"children":4088},{"style":184},[4089],{"type":35,"value":3973},{"type":29,"tag":94,"props":4091,"children":4092},{"style":132},[4093],{"type":35,"value":2307},{"type":29,"tag":94,"props":4095,"children":4096},{"class":96,"line":1026},[4097],{"type":29,"tag":94,"props":4098,"children":4099},{"style":132},[4100],{"type":35,"value":3068},{"type":29,"tag":94,"props":4102,"children":4103},{"class":96,"line":1078},[4104],{"type":29,"tag":94,"props":4105,"children":4106},{"emptyLinePlaceholder":12},[4107],{"type":35,"value":113},{"type":29,"tag":94,"props":4109,"children":4110},{"class":96,"line":1123},[4111,4115,4120,4125,4129,4133,4137,4141],{"type":29,"tag":94,"props":4112,"children":4113},{"style":120},[4114],{"type":35,"value":3992},{"type":29,"tag":94,"props":4116,"children":4117},{"style":120},[4118],{"type":35,"value":4119}," void",{"type":29,"tag":94,"props":4121,"children":4122},{"style":321},[4123],{"type":35,"value":4124}," fulfillOrder",{"type":29,"tag":94,"props":4126,"children":4127},{"style":132},[4128],{"type":35,"value":155},{"type":29,"tag":94,"props":4130,"children":4131},{"style":3783},[4132],{"type":35,"value":3786},{"type":29,"tag":94,"props":4134,"children":4135},{"style":206},[4136],{"type":35,"value":2902},{"type":29,"tag":94,"props":4138,"children":4139},{"style":132},[4140],{"type":35,"value":244},{"type":29,"tag":94,"props":4142,"children":4143},{"style":132},[4144],{"type":35,"value":2247},{"type":29,"tag":94,"props":4146,"children":4147},{"class":96,"line":1184},[4148,4153,4158,4162,4166,4170,4174,4178,4182],{"type":29,"tag":94,"props":4149,"children":4150},{"style":3783},[4151],{"type":35,"value":4152},"        Order",{"type":29,"tag":94,"props":4154,"children":4155},{"style":184},[4156],{"type":35,"value":4157}," order ",{"type":29,"tag":94,"props":4159,"children":4160},{"style":190},[4161],{"type":35,"value":193},{"type":29,"tag":94,"props":4163,"children":4164},{"style":184},[4165],{"type":35,"value":3949},{"type":29,"tag":94,"props":4167,"children":4168},{"style":132},[4169],{"type":35,"value":181},{"type":29,"tag":94,"props":4171,"children":4172},{"style":321},[4173],{"type":35,"value":3051},{"type":29,"tag":94,"props":4175,"children":4176},{"style":132},[4177],{"type":35,"value":155},{"type":29,"tag":94,"props":4179,"children":4180},{"style":184},[4181],{"type":35,"value":2324},{"type":29,"tag":94,"props":4183,"children":4184},{"style":132},[4185],{"type":35,"value":396},{"type":29,"tag":94,"props":4187,"children":4188},{"class":96,"line":1196},[4189,4194,4199,4204,4208,4212,4217,4221,4225],{"type":29,"tag":94,"props":4190,"children":4191},{"style":132},[4192],{"type":35,"value":4193},"            .",{"type":29,"tag":94,"props":4195,"children":4196},{"style":321},[4197],{"type":35,"value":4198},"orElseThrow",{"type":29,"tag":94,"props":4200,"children":4201},{"style":132},[4202],{"type":35,"value":4203},"(()",{"type":29,"tag":94,"props":4205,"children":4206},{"style":120},[4207],{"type":35,"value":738},{"type":29,"tag":94,"props":4209,"children":4210},{"style":120},[4211],{"type":35,"value":2852},{"type":29,"tag":94,"props":4213,"children":4214},{"style":321},[4215],{"type":35,"value":4216}," OrderNotFoundException",{"type":29,"tag":94,"props":4218,"children":4219},{"style":132},[4220],{"type":35,"value":155},{"type":29,"tag":94,"props":4222,"children":4223},{"style":184},[4224],{"type":35,"value":2324},{"type":29,"tag":94,"props":4226,"children":4227},{"style":132},[4228],{"type":35,"value":4229},"));\n",{"type":29,"tag":94,"props":4231,"children":4232},{"class":96,"line":1204},[4233],{"type":29,"tag":94,"props":4234,"children":4235},{"emptyLinePlaceholder":12},[4236],{"type":35,"value":113},{"type":29,"tag":94,"props":4238,"children":4239},{"class":96,"line":1213},[4240,4245,4249,4254,4258,4263,4267,4272],{"type":29,"tag":94,"props":4241,"children":4242},{"style":184},[4243],{"type":35,"value":4244},"        order",{"type":29,"tag":94,"props":4246,"children":4247},{"style":132},[4248],{"type":35,"value":181},{"type":29,"tag":94,"props":4250,"children":4251},{"style":321},[4252],{"type":35,"value":4253},"setStatus",{"type":29,"tag":94,"props":4255,"children":4256},{"style":132},[4257],{"type":35,"value":155},{"type":29,"tag":94,"props":4259,"children":4260},{"style":184},[4261],{"type":35,"value":4262},"OrderStatus",{"type":29,"tag":94,"props":4264,"children":4265},{"style":132},[4266],{"type":35,"value":181},{"type":29,"tag":94,"props":4268,"children":4269},{"style":184},[4270],{"type":35,"value":4271},"FULFILLING",{"type":29,"tag":94,"props":4273,"children":4274},{"style":132},[4275],{"type":35,"value":3809},{"type":29,"tag":94,"props":4277,"children":4278},{"class":96,"line":1238},[4279,4284,4288,4292,4296,4301],{"type":29,"tag":94,"props":4280,"children":4281},{"style":184},[4282],{"type":35,"value":4283},"        orderRepository",{"type":29,"tag":94,"props":4285,"children":4286},{"style":132},[4287],{"type":35,"value":181},{"type":29,"tag":94,"props":4289,"children":4290},{"style":321},[4291],{"type":35,"value":382},{"type":29,"tag":94,"props":4293,"children":4294},{"style":132},[4295],{"type":35,"value":155},{"type":29,"tag":94,"props":4297,"children":4298},{"style":184},[4299],{"type":35,"value":4300},"order",{"type":29,"tag":94,"props":4302,"children":4303},{"style":132},[4304],{"type":35,"value":3809},{"type":29,"tag":94,"props":4306,"children":4307},{"class":96,"line":1290},[4308],{"type":29,"tag":94,"props":4309,"children":4310},{"emptyLinePlaceholder":12},[4311],{"type":35,"value":113},{"type":29,"tag":94,"props":4313,"children":4314},{"class":96,"line":1340},[4315,4320,4324,4329,4333,4337,4341,4346,4351,4355],{"type":29,"tag":94,"props":4316,"children":4317},{"style":184},[4318],{"type":35,"value":4319},"        notificationService",{"type":29,"tag":94,"props":4321,"children":4322},{"style":132},[4323],{"type":35,"value":181},{"type":29,"tag":94,"props":4325,"children":4326},{"style":321},[4327],{"type":35,"value":4328},"sendOrderConfirmation",{"type":29,"tag":94,"props":4330,"children":4331},{"style":132},[4332],{"type":35,"value":155},{"type":29,"tag":94,"props":4334,"children":4335},{"style":184},[4336],{"type":35,"value":4300},{"type":29,"tag":94,"props":4338,"children":4339},{"style":132},[4340],{"type":35,"value":181},{"type":29,"tag":94,"props":4342,"children":4343},{"style":321},[4344],{"type":35,"value":4345},"getUserId",{"type":29,"tag":94,"props":4347,"children":4348},{"style":132},[4349],{"type":35,"value":4350},"(),",{"type":29,"tag":94,"props":4352,"children":4353},{"style":184},[4354],{"type":35,"value":2902},{"type":29,"tag":94,"props":4356,"children":4357},{"style":132},[4358],{"type":35,"value":3809},{"type":29,"tag":94,"props":4360,"children":4361},{"class":96,"line":1348},[4362],{"type":29,"tag":94,"props":4363,"children":4364},{"style":132},[4365],{"type":35,"value":3068},{"type":29,"tag":94,"props":4367,"children":4368},{"class":96,"line":10},[4369],{"type":29,"tag":94,"props":4370,"children":4371},{"style":132},[4372],{"type":35,"value":2381},{"type":29,"tag":94,"props":4374,"children":4375},{"class":96,"line":1440},[4376],{"type":29,"tag":94,"props":4377,"children":4378},{"emptyLinePlaceholder":12},[4379],{"type":35,"value":113},{"type":29,"tag":94,"props":4381,"children":4382},{"class":96,"line":1537},[4383],{"type":29,"tag":94,"props":4384,"children":4385},{"style":101},[4386],{"type":35,"value":4387},"// Implémentation de test\n",{"type":29,"tag":94,"props":4389,"children":4390},{"class":96,"line":1545},[4391,4395],{"type":29,"tag":94,"props":4392,"children":4393},{"style":3890},[4394],{"type":35,"value":3893},{"type":29,"tag":94,"props":4396,"children":4397},{"style":3896},[4398],{"type":35,"value":3899},{"type":29,"tag":94,"props":4400,"children":4401},{"class":96,"line":1554},[4402,4406,4411,4415,4420],{"type":29,"tag":94,"props":4403,"children":4404},{"style":3890},[4405],{"type":35,"value":3893},{"type":29,"tag":94,"props":4407,"children":4408},{"style":3896},[4409],{"type":35,"value":4410},"Profile",{"type":29,"tag":94,"props":4412,"children":4413},{"style":132},[4414],{"type":35,"value":155},{"type":29,"tag":94,"props":4416,"children":4417},{"style":216},[4418],{"type":35,"value":4419},"\"test\"",{"type":29,"tag":94,"props":4421,"children":4422},{"style":132},[4423],{"type":35,"value":396},{"type":29,"tag":94,"props":4425,"children":4426},{"class":96,"line":1573},[4427,4431,4435,4440,4445,4449],{"type":29,"tag":94,"props":4428,"children":4429},{"style":120},[4430],{"type":35,"value":3749},{"type":29,"tag":94,"props":4432,"children":4433},{"style":120},[4434],{"type":35,"value":3911},{"type":29,"tag":94,"props":4436,"children":4437},{"style":126},[4438],{"type":35,"value":4439}," MockNotificationService",{"type":29,"tag":94,"props":4441,"children":4442},{"style":120},[4443],{"type":35,"value":4444}," implements",{"type":29,"tag":94,"props":4446,"children":4447},{"style":126},[4448],{"type":35,"value":3759},{"type":29,"tag":94,"props":4450,"children":4451},{"style":132},[4452],{"type":35,"value":2247},{"type":29,"tag":94,"props":4454,"children":4455},{"class":96,"line":1602},[4456],{"type":29,"tag":94,"props":4457,"children":4458},{"emptyLinePlaceholder":12},[4459],{"type":35,"value":113},{"type":29,"tag":94,"props":4461,"children":4462},{"class":96,"line":1659},[4463,4467,4471,4476,4480,4484,4488,4493,4497,4501,4506],{"type":29,"tag":94,"props":4464,"children":4465},{"style":120},[4466],{"type":35,"value":3935},{"type":29,"tag":94,"props":4468,"children":4469},{"style":120},[4470],{"type":35,"value":3940},{"type":29,"tag":94,"props":4472,"children":4473},{"style":3783},[4474],{"type":35,"value":4475}," List",{"type":29,"tag":94,"props":4477,"children":4478},{"style":132},[4479],{"type":35,"value":2292},{"type":29,"tag":94,"props":4481,"children":4482},{"style":120},[4483],{"type":35,"value":3786},{"type":29,"tag":94,"props":4485,"children":4486},{"style":132},[4487],{"type":35,"value":2302},{"type":29,"tag":94,"props":4489,"children":4490},{"style":184},[4491],{"type":35,"value":4492}," sentNotifications ",{"type":29,"tag":94,"props":4494,"children":4495},{"style":190},[4496],{"type":35,"value":193},{"type":29,"tag":94,"props":4498,"children":4499},{"style":120},[4500],{"type":35,"value":2852},{"type":29,"tag":94,"props":4502,"children":4503},{"style":3783},[4504],{"type":35,"value":4505}," ArrayList",{"type":29,"tag":94,"props":4507,"children":4508},{"style":132},[4509],{"type":35,"value":4510},"\u003C>();\n",{"type":29,"tag":94,"props":4512,"children":4513},{"class":96,"line":3078},[4514],{"type":29,"tag":94,"props":4515,"children":4516},{"emptyLinePlaceholder":12},[4517],{"type":35,"value":113},{"type":29,"tag":94,"props":4519,"children":4520},{"class":96,"line":3086},[4521,4526],{"type":29,"tag":94,"props":4522,"children":4523},{"style":3890},[4524],{"type":35,"value":4525},"    @",{"type":29,"tag":94,"props":4527,"children":4528},{"style":3896},[4529],{"type":35,"value":4530},"Override\n",{"type":29,"tag":94,"props":4532,"children":4533},{"class":96,"line":3095},[4534,4538,4542,4546,4550,4554,4558,4562,4566,4570,4574],{"type":29,"tag":94,"props":4535,"children":4536},{"style":120},[4537],{"type":35,"value":3992},{"type":29,"tag":94,"props":4539,"children":4540},{"style":120},[4541],{"type":35,"value":4119},{"type":29,"tag":94,"props":4543,"children":4544},{"style":321},[4545],{"type":35,"value":3776},{"type":29,"tag":94,"props":4547,"children":4548},{"style":132},[4549],{"type":35,"value":155},{"type":29,"tag":94,"props":4551,"children":4552},{"style":3783},[4553],{"type":35,"value":3786},{"type":29,"tag":94,"props":4555,"children":4556},{"style":206},[4557],{"type":35,"value":3791},{"type":29,"tag":94,"props":4559,"children":4560},{"style":132},[4561],{"type":35,"value":224},{"type":29,"tag":94,"props":4563,"children":4564},{"style":3783},[4565],{"type":35,"value":3800},{"type":29,"tag":94,"props":4567,"children":4568},{"style":206},[4569],{"type":35,"value":2902},{"type":29,"tag":94,"props":4571,"children":4572},{"style":132},[4573],{"type":35,"value":244},{"type":29,"tag":94,"props":4575,"children":4576},{"style":132},[4577],{"type":35,"value":2247},{"type":29,"tag":94,"props":4579,"children":4580},{"class":96,"line":3131},[4581,4586,4590,4595,4599,4604,4609,4614,4619,4624,4628,4632],{"type":29,"tag":94,"props":4582,"children":4583},{"style":184},[4584],{"type":35,"value":4585},"        sentNotifications",{"type":29,"tag":94,"props":4587,"children":4588},{"style":132},[4589],{"type":35,"value":181},{"type":29,"tag":94,"props":4591,"children":4592},{"style":321},[4593],{"type":35,"value":4594},"add",{"type":29,"tag":94,"props":4596,"children":4597},{"style":132},[4598],{"type":35,"value":155},{"type":29,"tag":94,"props":4600,"children":4601},{"style":216},[4602],{"type":35,"value":4603},"\"confirmation:\"",{"type":29,"tag":94,"props":4605,"children":4606},{"style":190},[4607],{"type":35,"value":4608}," +",{"type":29,"tag":94,"props":4610,"children":4611},{"style":184},[4612],{"type":35,"value":4613}," userId ",{"type":29,"tag":94,"props":4615,"children":4616},{"style":190},[4617],{"type":35,"value":4618},"+",{"type":29,"tag":94,"props":4620,"children":4621},{"style":216},[4622],{"type":35,"value":4623}," \":\"",{"type":29,"tag":94,"props":4625,"children":4626},{"style":190},[4627],{"type":35,"value":4608},{"type":29,"tag":94,"props":4629,"children":4630},{"style":184},[4631],{"type":35,"value":2902},{"type":29,"tag":94,"props":4633,"children":4634},{"style":132},[4635],{"type":35,"value":3809},{"type":29,"tag":94,"props":4637,"children":4638},{"class":96,"line":3170},[4639],{"type":29,"tag":94,"props":4640,"children":4641},{"style":132},[4642],{"type":35,"value":3068},{"type":29,"tag":94,"props":4644,"children":4645},{"class":96,"line":3199},[4646],{"type":29,"tag":94,"props":4647,"children":4648},{"style":132},[4649],{"type":35,"value":2381},{"type":29,"tag":37,"props":4651,"children":4652},{},[4653,4658,4660,4666],{"type":29,"tag":482,"props":4654,"children":4655},{},[4656],{"type":35,"value":4657},"L'avantage Spring :",{"type":35,"value":4659}," ",{"type":29,"tag":90,"props":4661,"children":4663},{"className":4662},[],[4664],{"type":35,"value":4665},"@Profile(\"test\")",{"type":35,"value":4667}," permet d'utiliser automatiquement le mock en environnement de test sans modifier le code métier. Le framework gère le wiring, le code métier reste pur.",{"type":29,"tag":53,"props":4669,"children":4670},{},[],{"type":29,"tag":57,"props":4672,"children":4674},{"id":4673},"quand-appliquer-le-dip-et-quand-ne-pas-le-faire",[4675],{"type":35,"value":4676},"Quand appliquer le DIP, et quand ne pas le faire",{"type":29,"tag":37,"props":4678,"children":4679},{},[4680],{"type":29,"tag":482,"props":4681,"children":4682},{},[4683],{"type":35,"value":4684},"Appliquer le DIP :",{"type":29,"tag":488,"props":4686,"children":4687},{},[4688,4693,4698],{"type":29,"tag":492,"props":4689,"children":4690},{},[4691],{"type":35,"value":4692},"Toute dépendance vers un système externe (base de données, API tierce, service d'email, service de paiement, file de message)",{"type":29,"tag":492,"props":4694,"children":4695},{},[4696],{"type":35,"value":4697},"Toute dépendance vers une infrastructure susceptible de changer",{"type":29,"tag":492,"props":4699,"children":4700},{},[4701],{"type":35,"value":4702},"Tout code que vous voulez unit-tester sans infrastructure",{"type":29,"tag":37,"props":4704,"children":4705},{},[4706],{"type":29,"tag":482,"props":4707,"children":4708},{},[4709],{"type":35,"value":4710},"Ne pas appliquer le DIP mécaniquement :",{"type":29,"tag":488,"props":4712,"children":4713},{},[4714,4719,4724],{"type":29,"tag":492,"props":4715,"children":4716},{},[4717],{"type":35,"value":4718},"Les entités et value objects du domaine (Order, User, Money) : pas de logique d'infrastructure",{"type":29,"tag":492,"props":4720,"children":4721},{},[4722],{"type":35,"value":4723},"Les utilitaires purs (calculs mathématiques, formatage de dates) : pas d'effet de bord",{"type":29,"tag":492,"props":4725,"children":4726},{},[4727],{"type":35,"value":4728},"Les dépendances stables et peu susceptibles de changer dans des petits projets",{"type":29,"tag":37,"props":4730,"children":4731},{},[4732,4737,4739,4745],{"type":29,"tag":482,"props":4733,"children":4734},{},[4735],{"type":35,"value":4736},"Le signal",{"type":35,"value":4738}," : si écrire un test unitaire pour votre classe nécessite de démarrer une base de données, une queue de messages, ou de configurer un service externe, appliquez le DIP. Cette question est aussi centrale dans les ",{"type":29,"tag":69,"props":4740,"children":4742},{"href":4741},"/fr/dette-technique/tests-integration-legacy-pieges",[4743],{"type":35,"value":4744},"tests d'intégration sur du code legacy",{"type":35,"value":4746}," : l'absence de DIP est souvent ce qui rend ces tests si difficiles et si fragiles à mettre en place.",{"type":29,"tag":53,"props":4748,"children":4749},{},[],{"type":29,"tag":57,"props":4751,"children":4753},{"id":4752},"faq-sur-le-dependency-inversion-principle",[4754],{"type":35,"value":4755},"FAQ sur le Dependency Inversion Principle",{"type":29,"tag":4757,"props":4758,"children":4759},"details",{},[4760,4766],{"type":29,"tag":4761,"props":4762,"children":4763},"summary",{},[4764],{"type":35,"value":4765},"1. Quelle est la différence entre DIP et Dependency Injection ?",{"type":29,"tag":37,"props":4767,"children":4768},{},[4769],{"type":35,"value":4770},"Le DIP est un principe architectural : les modules doivent dépendre d'abstractions. La Dependency Injection (DI) est une technique d'implémentation du DIP : les dépendances sont fournies de l'extérieur plutôt que créées à l'intérieur. On peut respecter le DIP sans DI (ex : factory pattern). On peut utiliser la DI sans respecter le DIP (ex : injecter une classe concrète sans interface). En pratique, les deux vont généralement ensemble.",{"type":29,"tag":4757,"props":4772,"children":4773},{},[4774,4779],{"type":29,"tag":4761,"props":4775,"children":4776},{},[4777],{"type":35,"value":4778},"2. Les containers DI (Spring, .NET DI, Angular) font-ils le travail à notre place ?",{"type":29,"tag":37,"props":4780,"children":4781},{},[4782],{"type":35,"value":4783},"Ils automatisent le wiring (qui injecte quoi), mais ne créent pas les abstractions à notre place. Spring injecte les classes concrètes si vous ne créez pas d'interfaces. La discipline architecturale de créer des interfaces pour les dépendances d'infrastructure reste une décision de l'équipe. Le framework ne peut pas la prendre à votre place.",{"type":29,"tag":4757,"props":4785,"children":4786},{},[4787,4792],{"type":29,"tag":4761,"props":4788,"children":4789},{},[4790],{"type":35,"value":4791},"3. Le DIP ne crée-t-il pas trop d'abstractions ?",{"type":29,"tag":37,"props":4793,"children":4794},{},[4795],{"type":35,"value":4796},"Oui, si mal appliqué. Créer une interface pour chaque classe, même les plus stables, est du sur-engineering. La règle que Martin Fowler formule clairement : créer une abstraction quand il y a au moins 2 implémentations possibles (production + test, provider A + provider B) ou quand la dépendance est vers un système externe. \"Pas d'abstraction prématurée\" s'applique au DIP comme à tout principe.",{"type":29,"tag":4757,"props":4798,"children":4799},{},[4800,4805],{"type":29,"tag":4761,"props":4801,"children":4802},{},[4803],{"type":35,"value":4804},"4. Comment introduire le DIP progressivement dans un codebase existant ?",{"type":29,"tag":37,"props":4806,"children":4807},{},[4808,4810,4816],{"type":35,"value":4809},"Le strangler fig pattern appliqué au DIP : ne pas refactorer tout le code existant d'un coup. À chaque nouvelle fonctionnalité ou bug fix qui touche une classe avec dépendances directes, extraire l'interface et introduire l'injection. Après 6 mois de cette discipline, les zones les plus actives du codebase respectent le DIP. Les zones stables peuvent rester dans l'état existant si elles ne causent pas de problèmes. Dans un contexte de ",{"type":29,"tag":69,"props":4811,"children":4813},{"href":4812},"/fr/dette-technique/legacy-code-evaluer-risque",[4814],{"type":35,"value":4815},"code legacy fortement couplé",{"type":35,"value":4817},", cette approche progressive est souvent la seule viable sans bloquer les livraisons.",{"type":29,"tag":4757,"props":4819,"children":4820},{},[4821,4826],{"type":29,"tag":4761,"props":4822,"children":4823},{},[4824],{"type":35,"value":4825},"5. Le DIP s'applique-t-il aux frontends (React, Vue) ?",{"type":29,"tag":37,"props":4827,"children":4828},{},[4829,4831,4837,4839,4845,4847,4853],{"type":35,"value":4830},"Oui. En React : les composants ne doivent pas appeler directement ",{"type":29,"tag":90,"props":4832,"children":4834},{"className":4833},[],[4835],{"type":35,"value":4836},"fetch()",{"type":35,"value":4838}," ou ",{"type":29,"tag":90,"props":4840,"children":4842},{"className":4841},[],[4843],{"type":35,"value":4844},"axios",{"type":35,"value":4846}," : ils doivent dépendre d'une abstraction (un service, un hook custom, un context) qui peut être mockée dans les tests. ",{"type":29,"tag":90,"props":4848,"children":4850},{"className":4849},[],[4851],{"type":35,"value":4852},"useOrderService()",{"type":35,"value":4854}," hook qui cache l'implémentation HTTP, facilement mockable dans les tests. Le DIP s'applique partout où il y a des effets de bord, frontend inclus.",{"type":29,"tag":53,"props":4856,"children":4857},{},[],{"type":29,"tag":2193,"props":4859,"children":4864},{"cta":4860,"href":4861,"title":4862,"type":4863},"Faire mon auto-évaluation →","/ema","Ressource gratuite : Engineering Maturity Self-Assessment","resource",[4865],{"type":29,"tag":37,"props":4866,"children":4867},{},[4868],{"type":35,"value":4869},"L'Engineering Maturity Self-Assessment couvre le domaine Craft & Conception : évaluez votre niveau sur les principes SOLID, le couplage, et la testabilité. Obtenez un score de maturité et des recommandations concrètes en 10 minutes.",{"type":29,"tag":4871,"props":4872,"children":4873},"style",{},[4874],{"type":35,"value":4875},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":7,"searchDepth":107,"depth":107,"links":4877},[4878,4879,4880,4881,4882,4883,4884],{"id":59,"depth":107,"text":62},{"id":540,"depth":107,"text":543},{"id":606,"depth":107,"text":609},{"id":2210,"depth":107,"text":2213},{"id":3721,"depth":107,"text":3724},{"id":4673,"depth":107,"text":4676},{"id":4752,"depth":107,"text":4755},"markdown","content:fr:architecture-craft:dependency-inversion-pratique.md","content","fr/architecture-craft/dependency-inversion-pratique.md","fr/architecture-craft/dependency-inversion-pratique","md",1775679735684]