public void ShouldConfigurePomodoroTimer() { var pomodoroMock = Substitute.For <IConfigurablePomodoro>(); int taskTimeResult = -1; int breakTimeResult = -1; int repeatTimeResult = -1; int longBreakTimeResult = -1; pomodoroMock.Configure(Arg.Do <IPomodoroConfig>(x => { taskTimeResult = x.TaskTime; breakTimeResult = x.BreakTime; repeatTimeResult = x.RepeatTime; longBreakTimeResult = x.LongBreakTime; })); manager.ChangePomodoroConfig(30, 10, 2, 20); IConfig config = manager.GetConfig(); config.ConfigurePomodoro(pomodoroMock); pomodoroMock.Received().Configure(Arg.Any <IPomodoroConfig>()); Assert.AreEqual(taskTimeResult, 30); Assert.AreEqual(breakTimeResult, 10); Assert.AreEqual(repeatTimeResult, 2); Assert.AreEqual(longBreakTimeResult, 20); }
public void Configure(IConfig config) { config.ConfigurePomodoro(this); }
public void Configure(IConfig config) { config.ConfigurePomodoro(this); }