public void Run() { if (_file.Exists()) { var currentOptions = _file.Load(); var updatedOptions = Merge(currentOptions, _options); _file.Save(updatedOptions); } else { _file.Save(_options); } }
public void GivenNoPriorOptions_ThenTheConfigOptionFileShouldThrowOnLoad() { Assert.Throws <System.IO.FileNotFoundException>(() => _file.Load()); }