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