sharee.bike-App/TestShareeLib/Repository/Request/TestQueryBuilderHelper.cs
Anja Müller-Meißner 573fe77e12 Version 3.0.337
2022-08-30 15:42:25 +02:00

45 lines
1.4 KiB
C#

using NUnit.Framework;
using TINK.Repository.Request;
namespace TestShareeLib.Repository.Request
{
[TestFixture]
public class TestQueryBuilderHelper
{
[Test]
public void TestGetSessionIdQueryElement()
=> Assert.That(
QueryBuilderHelper.GetSessionIdQueryElement("?", "123", "456"),
Is.EqualTo("?sessionid=456123"));
[Test]
public void TestGetSessionIdQueryElementMerchantNull()
=> Assert.That(
QueryBuilderHelper.GetSessionIdQueryElement("?", null, "456"),
Is.EqualTo("?sessionid=456"));
[Test]
public void TestGetSessionIdQueryElementSessionCookieNull()
=> Assert.That(
QueryBuilderHelper.GetSessionIdQueryElement("?", "123", null),
Is.EqualTo("?sessionid=123"));
[Test]
public void TestGetSessionIdQueryElementNull()
=> Assert.That(
QueryBuilderHelper.GetSessionIdQueryElement("?", null),
Is.EqualTo(""));
[Test]
public void TestGetLanguageQueryElement()
=> Assert.That(
QueryBuilderHelper.GetLanguageQueryElement("&", "de"),
Is.EqualTo("&lang=de"));
[Test]
public void TestGetLanguageQueryElementNull()
=> Assert.That(
QueryBuilderHelper.GetLanguageQueryElement("&", ""),
Is.EqualTo(""));
}
}