예제 #1
0
        public void CheckBatteryPowerType()
        {
            var batteryProvider = new Canary.Battery.CnrBattery();

            // if we're running on a real device it should be plugged and Apple SDK does not
            // provide AC/USB thing. We can see only as AC.
            Assert.True(batteryProvider.PowerSource == PowerSourceType.AC);
        }
예제 #2
0
        public void CheckBatteryState()
        {
            var batteryProvider = new Canary.Battery.CnrBattery();

            Assert.True(batteryProvider.BatteryState == ChargingState.Charging || batteryProvider.BatteryState == ChargingState.Full);
        }
예제 #3
0
        public void CheckBatteryLevel()
        {
            var batteryProvider = new Canary.Battery.CnrBattery();

            Assert.True(batteryProvider.BatteryLevel >= 0 && batteryProvider.BatteryLevel <= 1);
        }
예제 #4
0
        public void CheckChargingOfBattery()
        {
            var batteryProvider = new Canary.Battery.CnrBattery();

            Assert.True(batteryProvider.IsCharging);
        }