public void Register_ThrowsWhenChangesArePrevented() { var settingsHolder = new SettingsHolder(); var pipelineSettings = new PipelineSettings(settingsHolder); pipelineSettings.PreventChanges(); Assert.Throws <InvalidOperationException>(() => pipelineSettings.Register(typeof(Behavior1), "newStep")); Assert.Throws <InvalidOperationException>(() => pipelineSettings.Remove("newStep")); Assert.Throws <InvalidOperationException>(() => pipelineSettings.Replace("newStep", typeof(Behavior1))); }