public void SetUp() { MongoConnection connection = MongoConnection.GetConnection("test"); UrlLogin login = UrlLogin.GetUrlLogin(connection, "test"); _connection = DynamicsCrmConnection.GetConnection(login.Url, login.Username, login.Password); }
public void SetUp() { Connection.CleanDatabase(); if (Config.Exists(Connection) == false) { Config config = new Config() { EmailPassword = "******", Email = "testEmail", EmailSmtpPort = 0, EmailSmtpHost = "testHost", }; config.Insert(Connection); } UrlLogin urlLogin = UrlLogin.GetUrlLogin(Connection, "test"); DynamicsCrmConnection = DynamicsCrmConnection.GetConnection(urlLogin.Url, urlLogin.Username, urlLogin.Password); _mailrelayConnectionTester = new MailrelayConnectionTester(); _dynamicsCrmConnectionTester = new DynamicsCrmConnectionTester(); _random = new Random(); }
private UrlLogin InsertUrlLogin() { string name = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string url = "www.test.com"; UrlLogin urlLogin; if (UrlLogin.Exists(_connection, name) == false) { urlLogin = new UrlLogin() { UrlName = name, Url = url, Password = "******", Username = "******", }; urlLogin.Insert(_connection); _createdUrlLogins.Add(urlLogin); } else { urlLogin = UrlLogin.GetUrlLogin(_connection, name); } return(urlLogin); }
public void ExistsReturnTrueIfUrlLoginExists() { UrlLogin urlLogin = InsertUrlLogin(); bool exists = UrlLogin.Exists(_connection, urlLogin.UrlName); Assert.True(exists); }
public void GetUrlLoginRetreivesUrlLogin() { UrlLogin urlLoginOrigin = InsertUrlLogin(); UrlLogin urlLoginRestored = UrlLogin.GetUrlLogin(_connection, urlLoginOrigin.UrlName); Assert.AreEqual(urlLoginOrigin.Password, urlLoginRestored.Password); }
public void TestFixtureSetUp() { _mongoConnection = MongoConnection.GetConnection("test"); _urlLogin = UrlLogin.GetUrlLogin(_mongoConnection, "test"); _dynamicsCrmConnection = DynamicsCrmConnection.GetConnection(_urlLogin.Url, _urlLogin.Username, _urlLogin.Password); _config = Config.GetConfig(_mongoConnection); _mailrelayConnection = new MailrelayConnection(_config.MailrelayUrl, _config.MailrelayApiKey); }
public void ExistsReturnFalseIfNoUrlLoginExists() { _connection.CleanDatabase(); string name = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); bool exists = UrlLogin.Exists(_connection, name); Assert.False(exists); }
public void GetFirstTest() { _connection.CleanDatabase(); UrlLogin urlLoginInserted = InsertUrlLogin(); UrlLogin urlLoginReturned = UrlLogin.GetFirst(_connection); bool returnedIsInserted = urlLoginInserted.Url == urlLoginReturned.Url; Assert.True(returnedIsInserted); }
public void Test() { UrlLogin urlLogin = UrlLogin.GetUrlLogin(_mongoConnection, "KKAdmin"); InterfaceHelper initializer = InterfaceHelper.GetInstance(); initializer.AllowThumbprint(urlLogin.CertificateThumbprint); SystemInterface.KKAdminService.KKAdminServiceClient proxy = new SystemInterface.KKAdminService.KKAdminServiceClient(); string version = proxy.GetVersion(); Assert.AreEqual("1.00", version); }