Exemplo n.º 1
0
        public void ToStringContainsProgrammer1Name()
        {
            var programmerName = "Joe";
            var session = new Session(new IntervalFactory(new DateTimeClock()));
            session.Start(new Programmer(programmerName), new Programmer("Bob"));
            session.Stop();

            Assert.That(session.ToString(), Contains.Substring(programmerName));
        }
Exemplo n.º 2
0
        public void PauseStopsCurrentIntervalButDoesntAddANewInterval()
        {
            var session = new Session(new IntervalFactory(new DateTimeClock()));

            session.Start(new Programmer("Joe"), new Programmer("Bob"));
            session.Pause();

            Assert.That(session.Intervals.Count(), Is.EqualTo(1));
            Assert.That(session.CurrentInterval, Is.Null);
        }