This section explores a simple chat client app. First, a custom chat service that is used to send and receive messages is discussed. Next, you examine how to substitute types using mocking and look at mocking the chat service. You see how to test the functionality of a viewmodel without needing to create a view for it. Finally, you learn how to create coded UI tests using the UTF TestPanel in combination with the Microsoft Automation framework.
The code for this section is located in the
ChatClientViewModel classes in the downloadable sample code.
The chat client app relies on a chat service, represented by an
IChatService interface. The
IChatService specifies a method to send a message, presumably to ...