Urgent.News

What's breaking now, across thousands of outlets.

Tech

Armor, Frontend and Evolution: Architecture Tests, In-Memory SQLite and the Road to Modular Monolith (Part 3)

Llegamos a la última entrega de nuestra serie sobre Vertical Slice Architecture (VSA) en .NET. En la Parte 1 , eliminamos los proyectos innecesarios y sentamos las bases con Minimal APIs y auto-descubrimiento. En la Parte 2 , escribimos código de producción: handlers cohesivos, persistencia directa con EF Core, validación con filtros y eventos desacoplados. Pero cualquier arquitecto o…

Translated from Spanish Read in Spanish

This article concludes a series on Vertical Slice Architecture (VSA) in .NET, focusing on testing and architecture. It discusses the limitations of traditional unit testing with mock repositories and presents an alternative approach using SQLite in-memory databases with real schema. The article demonstrates how to create a test helper, `TestDb.Create()`, to quickly set up a realistic test environment.

It also shows examples of unit tests for handlers and validators, which run quickly and execute real SQL, while only mocking external boundaries. The approach allows for honest testing without mocks and provides a foundation for a Modular Monolith.

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Transition from Laravel to .NET

Sempre fui um grande fã de tecnologias microsoft. Tomei uma decisão a respeito do meu futuro. Atualmente, trabalho com Laravel e com o ecossistema PHP, mas resolvi voltar a estudar a tecnologia que eu…

More from Sunday 27 September →