mpostol / TP

Programming in Practice - set of examples targeting education purpose.
http://mpostol.github.io/TP/
Apache License 2.0
55 stars 37 forks source link

CP - layers must be tested independently #313

Open mpostol opened 1 year ago

mpostol commented 1 year ago

Describe the bug

The unit test for ViemModel creates MainWindowViewModel and Model so finely it is an integration test. We must use the abstract API of the Model layer to detach the ViewModel and Model for UT.

To Reproduce

NA

Expected behavior

MainWindowViewModel must refer to the Model layer implementation designed for testing purposes only. Reuse the design pattern applied for the layered application example in InformationComputation.

mpostol commented 10 months ago

An example of how to accomplish it may be found in the graphical data included in the ExDM project