Table of Contents

Testing a server method

When creating the server method, a test class is automatically created. This class inherits from ApplicationTest.

Executing the server method in a test

To execute the server method, you must instanciate it with the AutoMocker instance and manually call it. Code example:

// Arrange
ISendMail method = Mocker.CreateInstance<ISendMail>();

// Act
SendMailResult result = await method.ExecuteAync(to: "[email protected]", subject:"Test");

// Assert
...