public void Controller_WithSortingSerivce_Should_Initialize_View() { var mockSortingService = new Mock <ISortingService>(); var controller = new FormsMVCController(mockSortingService.Object); var result = controller.View; Assert.IsNotNull(result); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var sortingServiceInstance = new SortingService(); var controller = new FormsMVCController(sortingServiceInstance); Application.Run(controller.View); }
public async Task SortInputAsync_Should_Update_View() { var mockSortingService = new Mock <ISortingService>(); var controller = new FormsMVCController(mockSortingService.Object); var view = controller.View; var result = await controller.SortInputAsync(new FormsMVCModel()); Assert.AreNotSame(view, result); }