public void Before_first_test() { var mocker = new RhinoAutoMocker<ApplicationSettingsService>(); mocker.Get<ISystemService>() .Expect(x => x.AppDataDirectory) .Return(@"x:\temp"); _applicationSettings = new ApplicationSettings(); mocker.Get<ISerializationService>() .Expect(x => x.DeserializeFromFile<ApplicationSettings>(Arg<string>.Is.NotNull)) .Return(new Notification<ApplicationSettings> { Item = _applicationSettings }) .Repeat.Any(); _result = mocker.ClassUnderTest.Load(); }
public Notification Save(ApplicationSettings applicationSettings) { return _serializationService.SerializeToFile(applicationSettings, GetSettingsPath()); }