public void ToStringContainsProgrammer1Name() { var programmerName = "Joe"; var session = new PairingSessionImpl(new IntervalFactory(new DateTimeClock())); session.Initialize(new Programmer(programmerName), new Programmer("Bob")); session.Start(); session.Stop(); Assert.That(session.ToString(), Contains.Substring(programmerName)); }
public void PauseStopsCurrentIntervalButDoesntAddANewInterval() { var session = new PairingSessionImpl(new IntervalFactory(new DateTimeClock())); session.Initialize(new Programmer("Joe"), new Programmer("Bob")); session.Start(); session.Pause(); Assert.That(session.Intervals.Count(), Is.EqualTo(1)); Assert.That(session.CurrentInterval, Is.Null); }