コード例 #1
0
ファイル: WebPageController.cs プロジェクト: ArildF/Smeedee
		public void UpdateConfiguration(Configuration config)
		{
			Guard.Requires<ArgumentNullException>(config != null);
			Guard.Requires<ArgumentException>(config.ContainsSetting(url));
			Guard.Requires<ArgumentException>(config.ContainsSetting(refresh_interval));
			this.config = config;

			webPageViewModel.InputUrl = config.GetSetting(url).Value;
			webPageViewModel.ValidatedUrl = config.GetSetting(url).Value;
			webPageViewModel.RefreshInterval = int.Parse(config.GetSetting(refresh_interval).Value);
		}
コード例 #2
0
ファイル: ConfigurationSpecs.cs プロジェクト: ArildF/Smeedee
 public void Assure_its_possible_to_check_if_setting_exist_when_there_are_no_settings()
 {
     configuration = new Configuration("new config");
     configuration.ContainsSetting("does not exist").ShouldBeFalse();
 }