Beispiel #1
0
        protected void Application_Start()
        {
            var initDB = false;

            GlobalConfiguration.Configure(WebApiConfig.Register);

            CustomerBusinessLayer.Register(new DBLayer());
            AgentBusinessLayer.Register(new DBLayer());

            bool.TryParse(ConfigurationManager.AppSettings["InitDB"], out initDB);

            if (initDB)
            {
                InitDB();
            }
        }
Beispiel #2
0
 public void WillThrowExpectedExceptionWhenRegisteringNullDBLayer()
 {
     CustomerBusinessLayer.Register(null);
 }
Beispiel #3
0
 public void Init()
 {
     mockDBLayer = new Mock <IDBLayer>();
     CustomerBusinessLayer.Register(mockDBLayer.Object);
 }