Example #1
0
        public void 開始()
        {
            var p1 = new Participant("A", 1000);
            _keeper.AddMenber(p1);

            _clock.SetNow(DateTime.Parse("2011/1/1 00:00:00"));
            _keeper.Start();

            Assert.That(p1.StartTime, Is.EqualTo(_clock.Now));
            Assert.That(_keeper.IsRunning, Is.True);
        }
Example #2
0
        public void 時間経過()
        {
            var p1 = new Participant("A", 1000);
            _keeper.AddMenber(p1);

            _clock.SetNow(DateTime.Parse("2011/1/1 00:00:00"));
            _keeper.Start();
            _clock.SetNow(DateTime.Parse("2011/1/1 01:00:00"));
            _keeper.Notify();

            Assert.That(p1.CostPerHour, Is.EqualTo(1000));
            Assert.That(_keeper.TotalCost, Is.EqualTo(1000));
        }
Example #3
0
 public void AddMenber(Participant participant)
 {
     _participants.Add(participant);
 }
Example #4
0
 public void AddMenber(Participant participant)
 {
     _participants.Add(participant);
 }
Example #5
0
 public void SetUp()
 {
     _participant = new Participant("name", 5000);
     Assert.That(_participant.Name, Is.EqualTo("name"));
     Assert.That(_participant.CostPerHour, Is.EqualTo(5000));
 }