Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 1.3 KB

README.md

File metadata and controls

21 lines (13 loc) · 1.3 KB

MVVM MessageBox Service for WPF (using Dependency Injection)

A C# MVVM Service for displaying simple MessageBox messages with custom styles included - Uses MVVM Toolkit with Microsoft.Extensions.DependencyInjection but can be adapted to any MVVM / DI Library. This service illustrate how you can have a view model that displays dialog boxes but still can be easily unit tested.

In the example the MainViewModel is unit tested at 100% code coverage even with a complex path that display mutiple dialogs with various choices.

Include samples and an Example to unit test code involving a complex path with multiple MessageBoxes

image

image

image

image

This shows a function including multiple decisions triggered by user input. The Unit test module shows how to unit test the function for full code coverage.

Complex Path