public void Configuration_Basic_Test()
        {
            var configFilePath = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;

            Assert.IsTrue(configFilePath.ToUpper().EndsWith(".DLL.CONFIG"));

            Assert.IsNotNull(SiteConfiguration.Current);

            Assert.IsNotNull(SiteConfiguration.Current.DataAccess.ParameterPrefix);

            Assert.IsNotNull(SiteConfiguration.Current.DataAccess.ConnectionString);

            Assert.IsTrue(!String.IsNullOrEmpty(SiteConfiguration.Current.DataAccess.ConnectionString.ProviderName));

            //Open connection to db
            var da = new UsersDataAccess();
            var conn = da.GetConnection();
            conn.Open();
            conn.Close();
        }
示例#2
0
 public void Delete(int id)
 {
     UsersDataAccess da = new UsersDataAccess();
     _dataAccess.Delete(id);
 }