public static BudgetItem ToBudgetItem(this BudgetItemDetailsViewModel model, IKapitalRepository repository, User user) { return new BudgetItem() { Id = model.Id, Name = model.Name, Amount = model.Amount, Tag = repository.GetTagByUserAndName(user.UserId, model.Tag), Recur = model.Recur, ScheduledDate = model.ScheduledDate, TimePeriod = model.TimePeriod.ToEnum(), TimePeriodCount = model.TimePeriodCount, DayCount = model.DayCount }; }
public void Init() { _repository = MockRepository.GenerateMock<IKapitalRepository>(); _id = Guid.NewGuid(); var account = new Account(); _repository.Stub(x => x.GetAccount(_id)).Throw(new ArgumentException("Account not found")); try { _result = _repository.GetAccount(_id); } catch (Exception e) { _caughtException = e; } _repository.VerifyAllExpectations(); }
public TagsController(IKapitalRepository repository, ITagService tagService) : base(repository) { TagService = tagService; }
public BankController(IKapitalRepository repository) : base(repository) { }
public SecureController(IKapitalRepository repository) : base(repository) { }
public BaseController(IKapitalRepository repository) { _repository = repository; }
public BudgetController(IKapitalRepository repository) : base(repository) { }
public KapitalMvcController(IKapitalRepository repository) { _repository = repository; }
public KapitalMvcController() { _repository = RepositoryFactory.Create(RepositoryTypeName); }
public AccountController(IKapitalRepository repository, ITransactionImporter importer) : base(repository) { TransactionImporter = importer; }
public void Init() { _repository = RepositoryFactory.Create(); _mongoRepository = RepositoryFactory.Create("mongo"); _nonExistantRepository = RepositoryFactory.Create("I Don't Exist"); }
public HomeController(IKapitalRepository repository) : base(repository) { }
public void Init() { _repository = MockRepository.GenerateMock<IKapitalRepository>(); }
public MaintenanceController(IKapitalRepository repository) { Repository = repository; }
public MemberController(IKapitalRepository repository) { Repository = repository; ErrorHandler = HandlerFactory.CreateErrorHandler(); }