sharee.bike-App/TestShareeLib/Repository/TestAppContextInfo.cs

37 lines
703 B
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using System;
using NUnit.Framework;
2022-01-04 18:54:03 +01:00
using TINK.Repository;
namespace TestShareeLib.Repository
{
2022-09-06 16:08:19 +02:00
[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"));
2022-01-04 18:54:03 +01:00
2022-09-06 16:08:19 +02:00
}
2022-01-04 18:54:03 +01:00
2022-09-06 16:08:19 +02:00
[Test]
public void TestCtorEmtyMerchant()
{
Assert.That(
() => new AppContextInfo("", "app.name", new Version(1, 2)),
Throws.TypeOf<ArgumentNullException>());
}
2022-01-04 18:54:03 +01:00
2022-09-06 16:08:19 +02:00
[Test]
public void TestCtorEmtyAppName()
{
Assert.That(
() => new AppContextInfo("123", "", new Version(1, 2)),
Throws.TypeOf<ArgumentNullException>());
}
}
2022-01-04 18:54:03 +01:00
}