Exemple #1
0
        public void GetListProvidersTest()
        {
            DbConnectionHelper   helper    = new DbConnectionHelper();
            IEnumerable <string> providers = helper.GetListProviders();

            Assert.IsNotNull(providers);
            Assert.AreEqual("Odbc Data Provider", providers.ElementAt(0));
        }
 public ConfigurationWindowViewModel(SourceTypeEnum type)
 {
     base.DisplayName     = Resources.ConfigurationWindowViewModel_DisplayName;
     _source              = new Source(type);
     _configuration       = new DbConnectionHelper();
     ListProviders        = _configuration.GetListProviders();
     _connectionMessenger = new NotificationConnectionMessenger();
     CreateCommand        = new ActionCommand(Create);
 }
 public ConfigurationWindowViewModel(Source source)
 {
     base.DisplayName    = Resources.ConfigurationWindowViewModel_DisplayName;
     _previousSourceData = source;
     _source             = new Source(source.TypeEnum)
     {
         Description = source.Description, Name = source.Name, Parameters = source.Parameters
     };
     _configuration       = new DbConnectionHelper();
     ListProviders        = _configuration.GetListProviders();
     _connectionMessenger = new NotificationConnectionMessenger();
     CreateCommand        = new ActionCommand(Update);
 }