sharee.bike-App/TestShareeLib/Model/Bike/TestBike.cs
Anja Müller-Meißner 0468955d49 Version 3.0.338
2022-09-08 09:55:14 +02:00

46 lines
1.3 KiB
C#

using NUnit.Framework;
namespace TestTINKLib.Fixtures.ObjectTests.Bike
{
using TINK.Model.Bikes.BikeInfoNS.BikeNS;
[TestFixture]
public class TestBike
{
[Test]
public void TestConstruct()
{
var l_oBike = new Bike("43", LockModel.ILockIt);
Assert.AreEqual("43", l_oBike.Id);
Assert.AreEqual(null, l_oBike.TypeOfBike);
Assert.AreEqual(null, l_oBike.WheelType);
l_oBike = new Bike("43", LockModel.ILockIt, WheelType.Mono, TypeOfBike.Cargo);
Assert.AreEqual("43", l_oBike.Id);
Assert.AreEqual(TypeOfBike.Cargo, l_oBike.TypeOfBike);
Assert.AreEqual(WheelType.Mono, l_oBike.WheelType);
}
[Test]
public void TestCompare()
{
var l_oBike1 = new Bike("43", LockModel.ILockIt);
Assert.AreEqual("43", l_oBike1.Id);
Assert.AreEqual(null, l_oBike1.TypeOfBike);
Assert.AreEqual(null, l_oBike1.WheelType);
var l_oBike2 = new Bike("42", LockModel.ILockIt, WheelType.Two, TypeOfBike.Allround);
Assert.IsFalse(l_oBike1 == l_oBike2);
l_oBike2 = new Bike("43", LockModel.ILockIt, WheelType.Mono, TypeOfBike.Allround);
Assert.IsFalse(l_oBike1 == l_oBike2);
l_oBike2 = new Bike("43", LockModel.ILockIt, WheelType.Two, TypeOfBike.Cargo);
Assert.IsFalse(l_oBike1 == l_oBike2);
l_oBike2 = new Bike("43", LockModel.ILockIt, null, null);
Assert.IsTrue(l_oBike1 == l_oBike2);
}
}
}