mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-09-27 17:36:29 +02:00
27 lines
1,019 B
C#
27 lines
1,019 B
C#
using System;
|
|
using MonkeyCache.FileStore;
|
|
using NUnit.Framework;
|
|
using ShareeBike.Model.Connector;
|
|
using ShareeBike.Repository;
|
|
|
|
namespace SharedBusinessLogic.Tests.Fixtures.ObjectTests.Connector
|
|
{
|
|
[TestFixture]
|
|
public class TestConnectorFactory
|
|
{
|
|
[Test]
|
|
public void TestCreate()
|
|
{
|
|
if (string.IsNullOrEmpty(Barrel.ApplicationId))
|
|
{
|
|
Barrel.ApplicationId = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
|
}
|
|
|
|
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");
|
|
Assert.That(connector.GetType(), Is.EqualTo(typeof(ConnectorCache)));
|
|
|
|
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");
|
|
Assert.That(connector.GetType(), Is.EqualTo(typeof(ShareeBike.Model.Connector.Connector)));
|
|
}
|
|
}
|
|
}
|