예제 #1
0
        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);
        }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var sortingServiceInstance = new SortingService();
            var controller             = new FormsMVCController(sortingServiceInstance);

            Application.Run(controller.View);
        }
예제 #3
0
        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);
        }