-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(battery): update get information battery
Signed-off-by: Ivan Del Pino <idelpino@teclib.com>
- Loading branch information
Showing
2 changed files
with
178 additions
and
120 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
inventory/src/androidTest/java/org/flyve/inventory/BatteryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* LICENSE | ||
* | ||
* This file is part of Flyve MDM Inventory Library for Android. | ||
* | ||
* Inventory Library for Android is a subproject of Flyve MDM. | ||
* Flyve MDM is a mobile device management software. | ||
* | ||
* Flyve MDM is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 3 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* Flyve MDM is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* --------------------------------------------------------------------- | ||
* @author Rafael Hernandez - <rhernandez@teclib.com> | ||
* @author Ivan del Pino - <idelpino@teclib.com> | ||
* @copyright Copyright Teclib. All rights reserved. | ||
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html | ||
* @link https://github.com/flyve-mdm/android-inventory-library | ||
* @link http://flyve.org/android-inventory-library/ | ||
* @link https://flyve-mdm.com | ||
* --------------------------------------------------------------------- | ||
*/ | ||
|
||
package org.flyve.inventory; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.flyve.inventory.categories.Battery; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.assertNotEquals; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class BatteryTest { | ||
|
||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
@Test | ||
public void getTechnology() { | ||
assertNotEquals("", new Battery(appContext).getTechnology()); | ||
} | ||
|
||
@Test | ||
public void getTemperature() { | ||
assertNotEquals("", new Battery(appContext).getTemperature()); | ||
} | ||
|
||
@Test | ||
public void getVoltage() { | ||
assertNotEquals("", new Battery(appContext).getVoltage()); | ||
} | ||
|
||
@Test | ||
public void getLevel() { | ||
assertNotEquals("", new Battery(appContext).getLevel()); | ||
} | ||
|
||
@Test | ||
public void getBatteryHealth() { | ||
assertNotEquals("", new Battery(appContext).getBatteryHealth()); | ||
} | ||
|
||
@Test | ||
public void getBatteryStatus() { | ||
assertNotEquals("", new Battery(appContext).getBatteryStatus()); | ||
} | ||
|
||
@Test | ||
public void getCapacity() { | ||
assertNotEquals("", new Battery(appContext).getCapacity(appContext)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters