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