Validating sending mail messages in smart use case unit tests

Posted Posted in .Net, Adf.Net, C#, Frameworks, Smart use cases, Unit testing

When building applications with the Adf framework, smart use cases are implemented in task classes. Quite regularly mail messages are sent from tasks. To do so we use the MailManager class. Using this class mail messages are usually build up as in the following code example. To send mail messages, the MailManager plugs in an implementation of the IMailProvider interface. […]

Adding specific validation messages to value objects

Posted Posted in Adf.Net, Validation, Value objects

One of the requests we often get in projects that use the Adf.Net framework is to be able to get specific validation messages, especially when during persisting panels to domain objects, properties that have value objects as their type fail to persist, usually during call such as below. protected void lbOpslaan_Click(object sender, EventArgs e) { BindManager.Persist(Persoonsgegevens, panelPersoonsgegevens); MyTask.OpslaanPersoonsgegevens(); } I […]

Reaching post-conditions in tasks

Posted Posted in .Net, Adf.Net, C#, Design patterns, Frameworks, Smart use cases

Implementing use cases in Adf.Net is covered by the task pattern. Each smart use case in the model is implemented as a descendant of the Task class in Adf.Net. The task pattern consists of three major parts: Starting the task, either using a parameterized Init() method, or the default Start() method. After a task calls another task, and this second […]