public void AddBinding_AddsANewBindingToTheSite() { var website = WebAdministrationFactory.CreateWebsite(); var sut = new WebsiteConfigurer(website); website.Bindings.Clear(); sut.AddBinding((binding) => { binding.OnPort(81); }); var actual = website.Bindings.Count; Assert.Equal(1, actual); }
public void AddBinding_PassesBindingToConfigurer() { var website = WebAdministrationFactory.CreateWebsite(); var sut = new WebsiteConfigurer(website); var actual = false; Action<IBindingConfigurer> action = (binding) => { actual = binding != null; }; sut.AddBinding(action); Assert.True(actual); }