Beispiel #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);
        }
Beispiel #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));
        }
Beispiel #3
0
 public void AddMenber(Participant participant)
 {
     _participants.Add(participant);
 }
Beispiel #4
0
 public void AddMenber(Participant participant)
 {
     _participants.Add(participant);
 }
Beispiel #5
0
 public void SetUp()
 {
     _participant = new Participant("name", 5000);
     Assert.That(_participant.Name, Is.EqualTo("name"));
     Assert.That(_participant.CostPerHour, Is.EqualTo(5000));
 }