public void BytesToKbsConverter_KBytes() { BytesToKbsConverter target = new BytesToKbsConverter(); Int32 byteSpeed = (int)(1024 * 7.5); string result = (string)target.Convert(byteSpeed, typeof(string), null, null); Assert.AreEqual("7.5 kb/s", result, true); }
public void BytesToKbsConverter_GBytes() { BytesToKbsConverter target = new BytesToKbsConverter(); Int32 byteSpeed = (Int32)((1024 * 1024 * 1024) * 1.07); string result = (string)target.Convert(byteSpeed, typeof(string), null, null); Assert.AreEqual("1.07 gb/s", result, true); }
public void BytesToKbsConverter_Bytes() { BytesToKbsConverter target = new BytesToKbsConverter(); Int32 byteSpeed = 128; string result = (string)target.Convert(byteSpeed, typeof(string), null, null); Assert.AreEqual("128 Bytes/s", result, true); }