Example #1
0
 private void CheckForNullEarningQueriesService(IEarningQueriesService service)
 {
     if (service == null)
     {
         throw new ArgumentException("El servicio no puede ser nulo");
     }
 }
Example #2
0
        public EarningQueriesController()
        {
            TodoPagosContext context    = new TodoPagosContext();
            IUnitOfWork      unitOfWork = new UnitOfWork(context);

            earningQueriesService = new EarningQueriesService(unitOfWork);
            signedInUsername      = HttpContext.Current.User.Identity.Name;
        }
Example #3
0
        public EarningQueriesController(string oneUsername)
        {
            FailIfUsernameArgumentIsNull(oneUsername);
            TodoPagosContext context    = new TodoPagosContext();
            IUnitOfWork      unitOfWork = new UnitOfWork(context);

            earningQueriesService = new EarningQueriesService(unitOfWork);
            signedInUsername      = oneUsername;
        }
Example #4
0
        public void FailCreationIfServiceIsNull()
        {
            IEarningQueriesService service = null;

            EarningQueriesController controller = new EarningQueriesController(service);
        }
Example #5
0
 public EarningQueriesController(IEarningQueriesService service)
 {
     CheckForNullEarningQueriesService(service);
     earningQueriesService = service;
     signedInUsername      = "******";
 }