/// <summary>
 /// Initializes a new instance of the <see cref="LoginControllerTests"/> class.
 /// </summary>
 public LoginControllerTests()
 {
     Business.Dependencies.Register();
     this.authenticationManager = new Mock<IAuthenticateManager>();
     this.masterDataManager = new Mock<IMasterDataManager>();
     this.localDateTimeManager = new Mock<ILocalDateTimeManager>();
     this.authorizationManager = new Mock<IAuthorizationManager>();
     this.loginController = new LoginController(this.authenticationManager.Object, this.masterDataManager.Object, this.localDateTimeManager.Object, this.authorizationManager.Object);
     CommonHelper.MockHttpRequestContext();
     SessionData.Instance.MasterData = CommonHelper.SetupMasterDataForUIControllers();
     DIContainer.Instance.Resolve<IComponentSettingsEntities>().MaxPageSize = 2;
     DIContainer.Instance.Resolve<IComponentSettingsEntities>().GangwayApplicationId = "1";
 }
Esempio n. 2
0
 static void Main(string[] args)
 {
     var connectionString = "Data Source=(local);Initial Catalog=UserDatabase;User ID=user;Password=password";
     var loginService = new LoginService(connectionString);
     var controller = new LoginController(loginService);
 }