July 2019
Intermediate to advanced
410 pages
10h 32m
English
As part of a unit test of one of the InventoryCommand implementations, we do not want to test the referenced dependencies. Fortunately, because the commands adhere to the DIP, we can create a helper class to validate the implementation interactions with the dependencies. One of the dependencies is the IUserInterface, which is passed into the implementation in the constructor. The following is a reminder of the methods of the interface:
public interface IUserInterface : IReadUserInterface, IWriteUserInterface { }public interface IReadUserInterface{ string ReadValue(string message);}public interface IWriteUserInterface{ void WriteMessage(string message); void WriteWarning(string message);}
By implementing a helper
Read now
Unlock full access