Пример #1
0
 public void TestDataRateCrossCalculation()
 {
     Assert.AreEqual(5d, (DataRate.FromBitPerSecond(10d) / DataVolume.FromBit(2d)).Second);
     Assert.AreEqual(50d, (DataRate.FromBitPerSecond(10d) * Duration.FromSecond(5d)).Bit);
 }
Пример #2
0
 public void TestDataRateCalculation()
 {
     Assert.AreEqual(75d, (DataRate.FromBytePerSecond(10d) - DataRate.FromBitPerSecond(5d)).BitPerSecond, DoubleDelta);
 }
Пример #3
0
 public void TestDataRateValue()
 {
     Assert.AreEqual(10d, DataRate.FromBitPerSecond(10d).BitPerSecond, DoubleDelta);
     Assert.AreEqual(10d, DataRate.FromBytePerSecond(10d).BytePerSecond, DoubleDelta);
 }
Пример #4
0
 public void TestDataRateConvert()
 {
     Assert.AreEqual(1.25d, DataRate.FromBitPerSecond(10d).BytePerSecond, DoubleDelta);
 }
Пример #5
0
 public static DataRate operator /(DataVolume dv, Duration d) => DataRate.FromBitPerSecond(dv.Bit / d.Second);