Closing lock and returning bike speeded up.

This commit is contained in:
Oliver Hauff 2021-08-28 10:04:10 +02:00
parent e4adeb908c
commit db9c288584
70 changed files with 933 additions and 902 deletions

View file

@ -1,5 +1,6 @@
using NSubstitute;
using NUnit.Framework;
using System;
using TINK.Model.Bikes.Bike.BC;
using TINK.ViewModel;
@ -91,5 +92,37 @@ namespace TestShareeLib.ViewModel
bike.GetDisplayId(),
Is.EqualTo(""));
}
[Test]
public void TestGetErrorMessage_Null()
{
Assert.That(
ViewModelHelper.GetErrorMessage(null),
Is.Empty);
}
[Test]
public void TestGetErrorMessage_Ex()
{
Assert.That(
new Exception("Ja toll").GetErrorMessage(),
Is.EqualTo("Ja toll"));
}
[Test]
public void TestGetErrorMessage_Aggregate_One()
{
Assert.That(
new AggregateException(new Exception("Oh yes")).GetErrorMessage(),
Is.EqualTo("Oh yes"));
}
[Test]
public void TestGetErrorMessage_Aggregate_Two()
{
Assert.That(
new AggregateException(new Exception("Oh yes"), new Exception("Oh no")).GetErrorMessage(),
Is.EqualTo("One or more errors occurred.\r\nOh yes\r\nOh no"));
}
}
}