mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-21 04:26:29 +02:00
Version 3.0.260
This commit is contained in:
parent
5a26bf273b
commit
4df8aa98aa
134 changed files with 8098 additions and 567 deletions
|
@ -0,0 +1,75 @@
|
|||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TINK.Model.Connector.Filter;
|
||||
|
||||
namespace TestShareeLib.Model.Connector.Filter
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestIntersectGroupFilterHelper
|
||||
{
|
||||
[Test]
|
||||
public void TestGetBikeCategory()
|
||||
{
|
||||
CollectionAssert.AreEqual(
|
||||
"300102",
|
||||
"Fr_300102".GetBikeCategory());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetBikeCategoryEmpty()
|
||||
{
|
||||
CollectionAssert.AreEqual(
|
||||
"",
|
||||
"CAD_".GetBikeCategory());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestToBikeCategory()
|
||||
{
|
||||
CollectionAssert.AreEqual(
|
||||
new List<string> { "300102", "777" },
|
||||
IntersectGroupFilterHelper.ToBikeCategory(new List<string> { "KN_300102", "Bla_XXX", "FR_777" }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestToBikeCategoryEmpty()
|
||||
{
|
||||
Assert.That(
|
||||
IntersectGroupFilterHelper.ToBikeCategory(new List<string> { "KN_" }).Count(),
|
||||
Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestIntersectByGoupId()
|
||||
{
|
||||
CollectionAssert.AreEqual(
|
||||
new List<string> { "FR_300101" },
|
||||
new List<string> { "FR_300101", "XY_777" }.IntersectByGoupId(new List<string> { "XY_776", "KN_300101" }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestIntersectByGoupId_Empty()
|
||||
{
|
||||
CollectionAssert.AreEqual(
|
||||
new List<string> (),
|
||||
new List<string> { "FR_300102" }.IntersectByGoupId(new List<string> { "FR_300101" }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestContainsGroupId_True()
|
||||
{
|
||||
Assert.That(
|
||||
new List<string> { "FR_300101", "XY_777" }.ContainsGroupId("KN_300101"),
|
||||
Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestContainsGroupId_False()
|
||||
{
|
||||
Assert.That(
|
||||
new List<string> { "FR_300101", "XY_777" }.ContainsGroupId("XY_776"),
|
||||
Is.False);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue