public void Create()
        {
            var(appLogger, connectionSetting) = GetMocks();
            var connectionFactoryMsSql = new ConnectionFactoryMsSql(appLogger.Object, "Server=myServerName,myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword");

            Assert.Throws <SqlException>(() => connectionFactoryMsSql.Create());
        }
Exemplo n.º 2
0
 public async Task CreateAsync()
 {
     var connectionSetting      = GetMocks();
     var connectionFactoryMsSql = new ConnectionFactoryMsSql("Server=myServerName,myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword");
     await Assert.ThrowsAsync <SqlException>(() => connectionFactoryMsSql.CreateAsync());
 }