public void GetRamLoadShouldRoundToTwo() { var timeRecord = new ConcereteTimeRecord(1, 1, 1); timeRecord.Update(new IncomingRecordData() { RamLoad = 100 }); timeRecord.UpdateEmpty(); timeRecord.UpdateEmpty(); Assert.That(timeRecord.GetRamLoad(), Is.EqualTo(33.33)); }
public void UpdateEmptyShouldAffectAverage() { var timeRecord = new ConcereteTimeRecord(1, 1, 1); timeRecord.Update(new IncomingRecordData() { CpuLoad = 100 }); timeRecord.UpdateEmpty(); Assert.That(timeRecord.GetCpuLoad(), Is.EqualTo(50)); }
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)); }