public void Should_connect_to_visma() { // Arrange // Act var vismaConnection = new VismaConnection("Luthman AB", string.Empty, string.Empty, "59618988851856124").Open(); // Assert Assert.That(vismaConnection, Is.Not.Null); }
private static void PrepareIocContainer(IContainer container, AppSettings settings) { var vismaConnection = new VismaConnection(settings.VismaClientName, settings.VismaUserName, settings.VismaPassword, settings.VismaBapiKey); container.Configure(cnfg => { // Using a specific instance makes the VismaConnection a singleton in practise cnfg.For<IVismaConnection>().Use(vismaConnection); cnfg.For<ITaskSettings>().Use(settings); cnfg.For<IVismaSettings>().Use(settings); cnfg.Scan(scan => { scan.TheCallingAssembly(); // Exclude IVismaConnection in case it gains a ctor without params in the future. scan.ExcludeType<IVismaConnection>(); scan.WithDefaultConventions(); }); }); }
public void SetUp() { _vismaConnection = new VismaConnection("Luthman AB", string.Empty, string.Empty, "59618988851856124"); }