sharee.bike-App/SharedBusinessLogic.Tests/Model/Bikes/BikeInfoNS/TestBikeExtension.cs

27 lines
703 B
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using System;
using NUnit.Framework;
2024-04-09 12:53:23 +02:00
using ShareeBike.Model.Bikes.BikeInfoNS.BikeNS;
2022-04-25 22:15:15 +02:00
2024-04-09 12:53:23 +02:00
namespace SharedBusinessLogic.Tests.Model.Bike
2022-04-25 22:15:15 +02:00
{
2022-09-06 16:08:19 +02:00
[TestFixture]
public class TestBikeExtension
{
[Test]
public void TestGetType()
{
Assert.That(LockModel.Sigo.GetLockType(), Is.EqualTo(LockType.Backend));
Assert.That(LockModel.ILockIt.GetLockType(), Is.EqualTo(LockType.Bluethooth));
Assert.That(
() => LockModel.BordComputer.GetLockType(),
Throws.InstanceOf<ArgumentException>());
}
2022-04-25 22:15:15 +02:00
2022-09-06 16:08:19 +02:00
[Test]
public void TestGetTypeCount()
{
Assert.That(Enum.GetValues(typeof(LockModel)).Length, Is.EqualTo(3), $"Impelemtation of {nameof(BikeExtension.GetLockType)} must be updated.");
}
}
2022-04-25 22:15:15 +02:00
}