sharee.bike-App/TestShareeLib/Model/Connector/TestConnectorFactory.cs

32 lines
1.1 KiB
C#
Raw Normal View History

2021-06-26 20:57:55 +02:00
using MonkeyCache.FileStore;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TINK.Model.Connector;
2022-01-04 18:54:03 +01:00
using TINK.Repository;
2021-06-26 20:57:55 +02:00
namespace TestTINKLib.Fixtures.ObjectTests.Connector
{
[TestFixture]
public class TestConnectorFactory
{
[Test]
public void TestCreate()
{
if (string.IsNullOrEmpty(Barrel.ApplicationId))
{
Barrel.ApplicationId = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
}
2022-01-04 18:54:03 +01:00
var connector = ConnectorFactory.Create(false, new Uri("https://1.2.3.4"), new AppContextInfo("oiF2kahH", "sharee.bike.test", new Version(3, 0, 267)), "123456789", "a@b");
2021-06-26 20:57:55 +02:00
Assert.AreEqual(typeof(ConnectorCache), connector.GetType());
2022-01-04 18:54:03 +01:00
connector = ConnectorFactory.Create(true, new Uri("https://1.2.3.4"), new AppContextInfo("oiF2kahH", "sharee.bike.test", new Version(3, 0, 267)), "123456789", "a@b");
2021-06-26 20:57:55 +02:00
Assert.AreEqual(typeof(TINK.Model.Connector.Connector), connector.GetType());
}
}
}