예제 #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();
            }
        }
예제 #2
0
 public void WillThrowExpectedExceptionWhenRegisteringNullDBLayer()
 {
     CustomerBusinessLayer.Register(null);
 }
예제 #3
0
 public void Init()
 {
     mockDBLayer = new Mock <IDBLayer>();
     CustomerBusinessLayer.Register(mockDBLayer.Object);
 }