/* TEST CODE */
LogUtils.write(LogUtils.DEBUG, LogUtils.TAG, "IsCharging_READ Value:"+ Battery.IsCharging);
LogUtils.write(LogUtils.DEBUG, LogUtils.TAG, "IsCharging_READ Value:"+ Battery.Level);
- LogUtils.write(LogUtils.DEBUG, LogUtils.TAG, "IsCharging_READ Value:"+ Battery.Capacity);
+ LogUtils.write(LogUtils.DEBUG, LogUtils.TAG, "IsCharging_READ Value:"+ Battery.Percent);
if(Battery.Level != BatteryLevelStatus.Full)
Assert.IsTrue(Battery.IsCharging, "battery charging should be true in case battery is not full");
else
public static void Level_READ()
{
/* TEST CODE */
- if (Battery.Capacity != 100)
+ if (Battery.Percent != 100)
Assert.IsFalse(Battery.Level == BatteryLevelStatus.Full, "Battery Level status should not be Full if capacity is not 100%");
else
Assert.IsTrue(Battery.Level == BatteryLevelStatus.Full, "Battery Level status should be Full if capacity is 100%");
{
/* TEST CODE */
if (Battery.Level != BatteryLevelStatus.Full)
- Assert.IsFalse(Battery.Capacity == 100, "Battery capacity should not be 100% if Battery Level status is not Full");
+ Assert.IsFalse(Battery.Percent == 100, "Battery capacity should not be 100% if Battery Level status is not Full");
else
- Assert.IsTrue(Battery.Capacity == 100, "Battery capacity should be 100% if Battery Level status is Full");
+ Assert.IsTrue(Battery.Percent == 100, "Battery capacity should be 100% if Battery Level status is Full");
}
}
}
}
catch(Exception e)
{
- Assert.IsTrue(false, "failed to Vibrate");
+ Assert.IsTrue(false, "failed to Vibrate. "+e.Message);
task.SetResult(-1);
}
return await task.Task;
}
catch (Exception e)
{
- Assert.IsTrue(false, "failed to Vibrate/stop");
+ Assert.IsTrue(false, "failed to Vibrate/stop "+ e.Message);
task.SetResult(-1);
}
return await task.Task;
}
catch(Exception e)
{
- Assert.IsTrue(false, "failed to request cpu lock");
+ Assert.IsTrue(false, "failed to request cpu lock. "+e.Message);
}
}
}
catch (Exception e)
{
- Assert.IsTrue(false, "failed to request cpu lock");
+ Assert.IsTrue(false, "failed to request cpu lock. "+e.Message);
}
}