public void Build_Azure_Connection_String_CustomServer(string server, string databaseName, string userName, string password) { var settings = new DatabaseModel { Server = server, DatabaseName = databaseName, Login = userName, Password = password }; var sut = new SqlAzureDatabaseProviderMetadata(); var connectionString = sut.GenerateConnectionString(settings); Assert.AreEqual(connectionString, "Server=tcp:kzeej5z8ty.ssmsawacluster4.windowsazure.mscds.com,1433;Database=MyDatabase;User ID=MyUser@kzeej5z8ty;Password=MyPassword"); }
public void Build_Azure_Connection_String_Regular(string server, string databaseName, string userName, string password) { var settings = new DatabaseModel { Server = server, DatabaseName = databaseName, Login = userName, Password = password }; var sut = new SqlAzureDatabaseProviderMetadata(); var connectionString = sut.GenerateConnectionString(settings); Assert.AreEqual(connectionString, "Server=tcp:MyServer.database.windows.net,1433;Database=MyDatabase;User ID=MyUser@MyServer;Password=MyPassword"); }