mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 18:46:30 +01:00
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using NUnit.Framework;
|
|
|
|
namespace SharedBusinessLogic.Tests.Fixtures.ObjectTests.Bike
|
|
{
|
|
using ShareeBike.Model.Bikes.BikeInfoNS.BikeNS;
|
|
|
|
[TestFixture]
|
|
public class TestBike
|
|
{
|
|
[Test]
|
|
public void TestConstruct()
|
|
{
|
|
var l_oBike = new Bike("43", LockModel.ILockIt);
|
|
Assert.That(l_oBike.Id, Is.EqualTo("43"));
|
|
Assert.That(l_oBike.TypeOfBike, Is.EqualTo(null));
|
|
Assert.That(l_oBike.WheelType, Is.EqualTo(null));
|
|
|
|
l_oBike = new Bike("43", LockModel.ILockIt, WheelType.Mono, TypeOfBike.Cargo);
|
|
|
|
Assert.That(l_oBike.Id, Is.EqualTo("43"));
|
|
Assert.That(l_oBike.TypeOfBike, Is.EqualTo(TypeOfBike.Cargo));
|
|
Assert.That(l_oBike.WheelType, Is.EqualTo(WheelType.Mono));
|
|
}
|
|
|
|
[Test]
|
|
public void TestCompare()
|
|
{
|
|
var l_oBike1 = new Bike("43", LockModel.ILockIt);
|
|
Assert.That(l_oBike1.Id, Is.EqualTo("43"));
|
|
Assert.That(l_oBike1.TypeOfBike, Is.EqualTo(null));
|
|
Assert.That(l_oBike1.WheelType, Is.EqualTo(null));
|
|
|
|
var l_oBike2 = new Bike("42", LockModel.ILockIt, WheelType.Two, TypeOfBike.Allround);
|
|
Assert.That(l_oBike1 == l_oBike2, Is.False);
|
|
|
|
l_oBike2 = new Bike("43", LockModel.ILockIt, WheelType.Mono, TypeOfBike.Allround);
|
|
Assert.That(l_oBike1 == l_oBike2, Is.False);
|
|
|
|
l_oBike2 = new Bike("43", LockModel.ILockIt, WheelType.Two, TypeOfBike.Cargo);
|
|
Assert.That(l_oBike1 == l_oBike2, Is.False);
|
|
|
|
l_oBike2 = new Bike("43", LockModel.ILockIt, null, null);
|
|
Assert.That(l_oBike1 == l_oBike2, Is.True);
|
|
}
|
|
}
|
|
}
|