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

36 lines
703 B
C#

using System;
using NUnit.Framework;
using TINK.Repository;
namespace TestShareeLib.Repository
{
[TestFixture]
public class TestAppContextInfo
{
[Test]
public void TestCtor()
{
var l_oInfo = new AppContextInfo("123", "app.name", new Version(1, 2));
Assert.That(
l_oInfo.UserAgent,
Is.EqualTo("app.name/1.2"));
}
[Test]
public void TestCtorEmtyMerchant()
{
Assert.That(
() => new AppContextInfo("", "app.name", new Version(1, 2)),
Throws.TypeOf<ArgumentNullException>());
}
[Test]
public void TestCtorEmtyAppName()
{
Assert.That(
() => new AppContextInfo("123", "", new Version(1, 2)),
Throws.TypeOf<ArgumentNullException>());
}
}
}