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

45 lines
1.2 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(""));
}
}