public void TestGetTagName() { var monitor = new SizeMonitorHandler("test", new[] { "tag" }, () => { return(512); }); Assert.AreEqual("test", monitor.Name); Assert.AreEqual("tag", monitor.Tags[0]); }
public void TestSizeBoundSmall() { var monitor = new SizeMonitorHandler("test", new[] { "test" }, () => { return(512); }); Assert.AreEqual("512.00", monitor.Value); Assert.AreEqual("unit.size.b", monitor.Unit); }
public void TestSizeBoundLarge() { var monitor = new SizeMonitorHandler("test", new[] { "test" }, () => { return(long.MaxValue); }); Assert.AreEqual("1024.00", monitor.Value); Assert.AreEqual("unit.size.pb", monitor.Unit); }
public void TestSizeBound() { var monitor = new SizeMonitorHandler("test", new[] { "test" }, () => { return((long)1024); }); Assert.AreEqual("1.00", monitor.Value); Assert.AreEqual("unit.size.kb", monitor.Unit); }