private void CheckForNullEarningQueriesService(IEarningQueriesService service) { if (service == null) { throw new ArgumentException("El servicio no puede ser nulo"); } }
public EarningQueriesController() { TodoPagosContext context = new TodoPagosContext(); IUnitOfWork unitOfWork = new UnitOfWork(context); earningQueriesService = new EarningQueriesService(unitOfWork); signedInUsername = HttpContext.Current.User.Identity.Name; }
public EarningQueriesController(string oneUsername) { FailIfUsernameArgumentIsNull(oneUsername); TodoPagosContext context = new TodoPagosContext(); IUnitOfWork unitOfWork = new UnitOfWork(context); earningQueriesService = new EarningQueriesService(unitOfWork); signedInUsername = oneUsername; }
public void FailCreationIfServiceIsNull() { IEarningQueriesService service = null; EarningQueriesController controller = new EarningQueriesController(service); }
public EarningQueriesController(IEarningQueriesService service) { CheckForNullEarningQueriesService(service); earningQueriesService = service; signedInUsername = "******"; }