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); }
public void TestDataVolumeCrossCalculation() { Assert.AreEqual(10_000d, (DataVolume.FromBit(10d) / Duration.FromSecond(1d, UnitPrefix.Milli)).BitPerSecond); }
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); }
public void TestDataVolumeConvert() { Assert.AreEqual(1.25d, DataVolume.FromBit(10d).Byte, DoubleDelta); Assert.AreEqual(5d, DataVolume.FromByte(10d).Word, DoubleDelta); }
public void TestDataRateCrossCalculation() { Assert.AreEqual(5d, (DataRate.FromBitPerSecond(10d) / DataVolume.FromBit(2d)).Second); Assert.AreEqual(50d, (DataRate.FromBitPerSecond(10d) * Duration.FromSecond(5d)).Bit); }