Exemple #1
0
        public void UpdateEmptyShouldNotUpdateWhenCompleteAdding()
        {
            var timeRecord = new ConcereteTimeRecord(1, 1, 1);

            timeRecord.Update(new IncomingRecordData()
            {
                CpuLoad = 100
            });
            timeRecord.CompleteAdding();
            timeRecord.UpdateEmpty();
            Assert.That(timeRecord.GetCpuLoad(), Is.EqualTo(100));
        }
Exemple #2
0
        public void CompleteAddingShouldStopUpdates()
        {
            var timeRecord = new ConcereteTimeRecord(1, 1, 1);

            timeRecord.CompleteAdding();
            Assert.That(timeRecord.GetCpuLoad(), Is.EqualTo(0));

            timeRecord.Update(new IncomingRecordData()
            {
                CpuLoad = 100
            });
            Assert.That(timeRecord.GetCpuLoad(), Is.EqualTo(0));
        }