July 2019
Intermediate to advanced
410 pages
10h 32m
English
GetInventoryCommandTest covers a scenario when the GetInventoryCommand command is used to retrieve the collection of books. The test will define the expected messages (remember that the first parameter is for the parameters, the second parameter is for messages, and the third parameter is for warnings) that will occur when testing the user interface:
var expectedInterface = new Helpers.TestUserInterface( new List<Tuple<string, string>>(), new List<string> { "Gremlins \tQuantity:7", "Willowsong \tQuantity:3", }, new List<string>());
These messages will correspond to the mock repository, as follows:
var context = new TestInventoryContext(new Dictionary<string, Book>{ { "Gremlins", new Book { Id = 1, Name = "Gremlins", ...Read now
Unlock full access