public void HostSettingsPresenter_SaveSettings_Calls_HostController_Update()
        {
            //Arrange
            var mockCache = MockComponentProvider.CreateDataCacheProvider();

            var mockView = new Mock <IHostSettingsView>();
            var model    = new HostSettingsModel {
                Settings = new Dictionary <string, string>
                {
                    { "String_1_S", "MyValue" },
                    { "String_2_S", "MyNextValue" },
                    { "String_3_U", "MyOtherValue" },
                }
            };

            mockView.Setup(v => v.Model).Returns(model);

            var mockController = new Mock <IHostController>();

            var presenter = new HostSettingsPresenter(mockView.Object, mockController.Object);

            //Act (Raise the Save Event)
            mockView.Raise(v => v.SaveSettings += null, EventArgs.Empty);

            //Assert
            mockController.Verify((c) => c.Update(It.IsAny <Dictionary <string, string> >()));
        }
        public void HostSettingsPresenter_SaveSettings_Calls_HostController_Update()
        {
            //Arrange
            var mockCache = MockComponentProvider.CreateDataCacheProvider();

            var mockView = new Mock<IHostSettingsView>();
            var model = new HostSettingsModel { Settings = new Dictionary<string, string>
                                                      {
                                                          {"String_1_S", "MyValue"},
                                                          {"String_2_S", "MyNextValue"},
                                                          {"String_3_U", "MyOtherValue"},
                                                      }
                                                };
            mockView.Setup(v => v.Model).Returns(model);

            var mockController = new Mock<IHostController>();

            var presenter = new HostSettingsPresenter(mockView.Object, mockController.Object);

            //Act (Raise the Save Event)
            mockView.Raise(v => v.SaveSettings += null, EventArgs.Empty);

            //Assert
            mockController.Verify((c) => c.Update(It.IsAny<Dictionary<string,string>>()));
        }