public void Ctor_SetsView()
		{
			// act
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);
			
			// assert
			Assert.That(presenter.View, Is.EqualTo(_view.Object));
		}
		public void ViewOnLoaded_DisplaysLoadLogsFromDefaultDirectoryAtStartup()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);

			// act
			_view.Raise(x => x.OnLoaded += null, new EventArgs());

			// assert
			_view.VerifySet(x => x.LoadLogsFromDefaultDirectoryAtStartup = true, Times.Once());
		}
		public void ViewOnLoaded_DisplaysDefaultExportDirectory()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);

			// act
			_view.Raise(x => x.OnLoaded += null, new EventArgs());

			// assert
			_view.VerifySet(x => x.DefaultExportDirectory = @"c:\exportedlogs", Times.Once());
		}
		public void ViewOnLoaded_DisplaysDefaultDateIntervalOptionsAndUsersSelectedValue()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);

			// act
			_view.Raise(x => x.OnLoaded += null, new EventArgs());

			// assert
			_view.Verify(x => x.LoadDefaultDateIntervalOptions(It.IsAny<IEnumerable<NameValuePair>>(), DateIntervalSpans.Month), Times.Once());
		}
		public void ViewOnLoaded_DisplaysMaxNumberOfLogsOptionsAndUsersSelectedValue()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);
			
			// act
			_view.Raise(x => x.OnLoaded += null, new EventArgs());

			// assert
			_view.Verify(x => x.LoadMaxNumberOfLogOptions(It.IsAny<List<NameValuePair>>(), "500"), Times.Once());
		}
		public void ViewOnSave_SavesLoadLogsFromDefaultDirectoryAtStartup()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);

			_view.Setup(x => x.LoadLogsFromDefaultDirectoryAtStartup).Returns(true);

			// act
			_view.Raise(x => x.OnSave += null, new EventArgs());

			// assert
			_userSettingsManager.Verify(x => x.SetLoadLogsFromDefaultDirectoryAtStartup(true), Times.Once());
		}
		public void ViewOnSave_SavesDefaultLogsDirectory()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);

			_view.Setup(x => x.DefaultLogsDirectory).Returns(@"c:\mylogs");

			// act
			_view.Raise(x => x.OnSave += null, new EventArgs());

			// assert
			_userSettingsManager.Verify(x => x.SetDefaultLogsDirectory(@"c:\mylogs"), Times.Once());
		}
		public void ViewOnSave_DefaultDateIntervalOption()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);

			_view.Setup(x => x.DefaultDateInterval).Returns(DateIntervalSpans.Year);

			// act
			_view.Raise(x => x.OnSave += null, new EventArgs());

			// assert
			_userSettingsManager.Verify(x => x.SetDefaultDateInterval(DateIntervalSpans.Year), Times.Once());
		}
		public void ViewOnSave_SavesMaxNumberOfLogsOption()
		{
			// arrange
			var presenter = new SettingsPresenter(_view.Object, _userSettingsManager.Object);

			_view.Setup(x => x.MaxNumberOfLogs).Returns(200);

			// act
			_view.Raise(x => x.OnSave += null, new EventArgs());

			// assert
			_userSettingsManager.Verify(x => x.SetMaxNumberOfLogs(200), Times.Once());
		}