mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-13 22:06:29 +01:00
75 lines
2.2 KiB
C#
75 lines
2.2 KiB
C#
using ShareeSharedGuiLib.ViewModel;
|
|
|
|
namespace TestShareeSharedGuiLib.ViewModel
|
|
{
|
|
[TestFixture]
|
|
public class TestBarLevelViewModel
|
|
{
|
|
[Test]
|
|
public void TestIsBatteryChargeLevelImageVisibleNull()
|
|
=> Assert.That(
|
|
new BarLevelViewModel().IsBatteryChargeLevelImageVisible,
|
|
Is.False);
|
|
|
|
[Test]
|
|
public void TestIsBatteryChargeLevelImageVisibleNot5()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 6 }.IsBatteryChargeLevelImageVisible,
|
|
Is.False);
|
|
|
|
[Test]
|
|
public void TestIsBatteryChargeLevelImageVisible5()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 5 }.IsBatteryChargeLevelImageVisible,
|
|
Is.True);
|
|
|
|
[Test]
|
|
public void TestBatteryChargeLevelImageSourceStringNull()
|
|
=> Assert.That(
|
|
new BarLevelViewModel().BatteryChargeLevelImageSourceString,
|
|
Is.EqualTo("battery_undefined.png"));
|
|
|
|
[Test]
|
|
public void TestBatteryChargeLevelImageSourceStringNot5CurrentNull()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 6 }.BatteryChargeLevelImageSourceString,
|
|
Is.EqualTo("battery_undefined.png"));
|
|
|
|
[Test]
|
|
public void TestBatteryChargeLevelImageSourceStringNot5()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 6, Current = 3 }.BatteryChargeLevelImageSourceString,
|
|
Is.EqualTo("battery_undefined.png"));
|
|
|
|
[Test]
|
|
public void TestBatteryChargeLevelImageSourceStringMax5CurrentNull()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 5 }.BatteryChargeLevelImageSourceString,
|
|
Is.EqualTo("battery_undefined.png"));
|
|
|
|
[Test]
|
|
public void TestBatteryChargeLevelImageSourceStringMax5Current3()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 5, Current = 3 }.BatteryChargeLevelImageSourceString,
|
|
Is.EqualTo("battery_3_5.png"));
|
|
|
|
[Test]
|
|
public void TestIsBatteryChargeLevelLabelVisibleNull()
|
|
=> Assert.That(
|
|
new BarLevelViewModel().IsBatteryChargeLevelLabelVisible,
|
|
Is.False);
|
|
|
|
[Test]
|
|
public void TestIsBatteryChargeLevelLabelVisibleNot5()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 5 }.IsBatteryChargeLevelLabelVisible,
|
|
Is.False);
|
|
|
|
[Test]
|
|
public void TestIsBatteryChargeLevelLabelVisible5()
|
|
=> Assert.That(
|
|
new BarLevelViewModel { Maximum = 6 }.IsBatteryChargeLevelLabelVisible,
|
|
Is.True);
|
|
|
|
}
|
|
}
|