예제 #1
0
 public void TestDataVolumeValue()
 {
     Assert.AreEqual(10d, DataVolume.FromBit(10d).Bit, DoubleDelta);
     Assert.AreEqual(10d, DataVolume.FromByte(10d).Byte, DoubleDelta);
     Assert.AreEqual(10d, DataVolume.FromOctet(10d).Octet, DoubleDelta);
     Assert.AreEqual(10d, DataVolume.FromWord(10d).Word, DoubleDelta);
 }
예제 #2
0
 public void TestDataVolumeCrossCalculation()
 {
     Assert.AreEqual(10_000d, (DataVolume.FromBit(10d) / Duration.FromSecond(1d, UnitPrefix.Milli)).BitPerSecond);
 }
예제 #3
0
 public void TestDataVolumeCalculation()
 {
     Assert.AreEqual(4.6875d, (DataVolume.FromByte(10d) - DataVolume.FromBit(5d)).Word, DoubleDelta);
     Assert.AreEqual(200d, (DataVolume.FromWord(10d) + DataVolume.FromByte(5d)).Bit, DoubleDelta);
 }
예제 #4
0
 public void TestDataVolumeConvert()
 {
     Assert.AreEqual(1.25d, DataVolume.FromBit(10d).Byte, DoubleDelta);
     Assert.AreEqual(5d, DataVolume.FromByte(10d).Word, DoubleDelta);
 }
예제 #5
0
 public void TestDataRateCrossCalculation()
 {
     Assert.AreEqual(5d, (DataRate.FromBitPerSecond(10d) / DataVolume.FromBit(2d)).Second);
     Assert.AreEqual(50d, (DataRate.FromBitPerSecond(10d) * Duration.FromSecond(5d)).Bit);
 }