sharee.bike-App/SharedBusinessLogic.Tests/Model/Connector/TestConnectorFactory.cs

28 lines
1,019 B
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using System;
using MonkeyCache.FileStore;
2021-06-26 20:57:55 +02:00
using NUnit.Framework;
2024-04-09 12:53:23 +02:00
using ShareeBike.Model.Connector;
using ShareeBike.Repository;
2021-06-26 20:57:55 +02:00
2024-04-09 12:53:23 +02:00
namespace SharedBusinessLogic.Tests.Fixtures.ObjectTests.Connector
2021-06-26 20:57:55 +02:00
{
2022-09-06 16:08:19 +02:00
[TestFixture]
public class TestConnectorFactory
{
[Test]
public void TestCreate()
{
if (string.IsNullOrEmpty(Barrel.ApplicationId))
{
Barrel.ApplicationId = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
}
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
var connector = ConnectorFactory.Create(false, new Uri("https://1.2.3.4"), new AppContextInfo("oiF2kahH", "sharee.bike.test", new Version(3, 0, 267)), null /*UI language */, "123456789", "a@b");
2024-04-09 12:53:23 +02:00
Assert.That(connector.GetType(), Is.EqualTo(typeof(ConnectorCache)));
2021-06-26 20:57:55 +02:00
2022-09-06 16:08:19 +02:00
connector = ConnectorFactory.Create(true, new Uri("https://1.2.3.4"), new AppContextInfo("oiF2kahH", "sharee.bike.test", new Version(3, 0, 267)), null /*UI language */, "123456789", "a@b");
2024-04-09 12:53:23 +02:00
Assert.That(connector.GetType(), Is.EqualTo(typeof(ShareeBike.Model.Connector.Connector)));
2022-09-06 16:08:19 +02:00
}
}
2021-06-26 20:57:55 +02:00
}