static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //SchemaGenerator.GenerateDatabaseSchema(); SetupServiceLocator(); IPersonListPresenter listPresenter = ClientServiceLocator.PersonListPresenter; Application.Run(); }
public void ClientServiceLocator_GetPersonListPresenterWithNoPresenter_RaisesApplicationException() { //Arrange ApplicationException nre = null; ClientServiceLocator.PersonListPresenter = null; //Act try { IPersonListPresenter presenter = ClientServiceLocator.PersonListPresenter; } catch (ApplicationException ex) { nre = ex; } //Assert Assert.IsNotNull(nre, "Exception not raised"); }