mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-21 12:36:28 +02:00
Initial version
This commit is contained in:
parent
41b618cb27
commit
e4fb48f6ab
24 changed files with 4387 additions and 0 deletions
46
TestShareeLib/Model/Bike/TestBike.cs
Normal file
46
TestShareeLib/Model/Bike/TestBike.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using NUnit.Framework;
|
||||
|
||||
namespace TestTINKLib.Fixtures.ObjectTests.Bike
|
||||
{
|
||||
using TINK.Model.Bike;
|
||||
|
||||
[TestFixture]
|
||||
public class TestBike
|
||||
{
|
||||
[Test]
|
||||
public void TestConstruct()
|
||||
{
|
||||
var l_oBike = new Bike(43);
|
||||
Assert.AreEqual(43, l_oBike.Id);
|
||||
Assert.AreEqual(null, l_oBike.TypeOfBike);
|
||||
Assert.AreEqual(null, l_oBike.WheelType);
|
||||
|
||||
l_oBike = new Bike(43, 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);
|
||||
Assert.AreEqual(43, l_oBike1.Id);
|
||||
Assert.AreEqual(null, l_oBike1.TypeOfBike);
|
||||
Assert.AreEqual(null, l_oBike1.WheelType);
|
||||
|
||||
var l_oBike2 = new Bike(42, WheelType.Two, TypeOfBike.Allround);
|
||||
Assert.IsFalse(l_oBike1 == l_oBike2);
|
||||
|
||||
l_oBike2 = new Bike(43, WheelType.Mono, TypeOfBike.Allround);
|
||||
Assert.IsFalse(l_oBike1 == l_oBike2);
|
||||
|
||||
l_oBike2 = new Bike(43, WheelType.Two, TypeOfBike.Cargo);
|
||||
Assert.IsFalse(l_oBike1 == l_oBike2);
|
||||
|
||||
l_oBike2 = new Bike(43, null, null);
|
||||
Assert.IsTrue(l_oBike1 == l_oBike2);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue