Assert.IsTrue(powerUsage is double, "GetPowerUsage() should return power usage value in double by a resource for certain time interval");
Assert.IsTrue((double)powerUsage >= 0, "GetPowerUsage() should return usage value by a resource for certain time interval");
}
+ catch (ArgumentException)
+ {
+ Assert.Pass("No data record corresponding to given resource type");
+ }
catch (Exception e)
{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, e.ToString());
{
object powerUsage = PowerUsage.GetPowerUsage(PowerUsageResourceType.Cpu, startTime, endTime);
}
+ catch (ArgumentException)
+ {
+ Assert.Pass("No data record corresponding to given resource type");
+ }
catch (Exception ex)
{
Assert.IsTrue(ex.GetType() == typeof(InvalidOperationException), "This operation will raise InvalidOperationException incase of any system error");