public async Task LoadTopTags() { var repository = new Mock <ITagsRepository>(MockBehavior.Strict); repository .Setup(mock => mock.LoadTopTags(16)) .ReturnsAsync(new[] { new Tag { Id = Guid.Parse("c2fa02b7-b107-4261-8306-9465178f2949"), Name = "artsy" } }); var controller = new TagsController(repository.Object); var result = await controller.LoadTopTags(); result.ShouldDeepEqual(new[] { new TagViewModel { Name = "artsy" } }); }