public UserControllerTests() { _connection = new SqliteConnection("Data Source=:memory:"); _connection.Open(); var options = new DbContextOptionsBuilder <MobicloneContext>().UseSqlite(_connection).Options; _context = new MobicloneContext(options); var hash = new Bcrypt(); var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.Test.json").Build(); _accessor = new HttpContextAccessor { HttpContext = new DefaultHttpContext() }; var auth = new Jwt(_context, hash, configuration, _accessor); _controller = new UserController(_context, auth, hash); _context.Database.EnsureCreated(); }
public Jwt(MobicloneContext context, IHash hash, IConfiguration configuration, IHttpContextAccessor accessor) { _context = context; _hash = hash; _configuration = configuration; _accessor = accessor; }
public ExpenseControllerTests() { var builder = new DbContextOptionsBuilder <MobicloneContext>().UseInMemoryDatabase("expense"); _context = new MobicloneContext(builder.Options); var hash = new Bcrypt(); var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.Test.json").Build(); _accessor = new HttpContextAccessor { HttpContext = new DefaultHttpContext() }; var auth = new Jwt(_context, hash, configuration, _accessor); _controller = new ExpenseController(_context, auth); }
public CurrentBalanceController(MobicloneContext context, IAuth auth) { _context = context; _auth = auth; }
public RevenueController(MobicloneContext context, IAuth auth) { _context = context; _auth = auth; }
public AccountController(MobicloneContext context, IAuth auth) { _context = context; _auth = auth; }
public MonthlyBalanceController(MobicloneContext context, IAuth auth) { _context = context; _auth = auth; }
public TransferController(MobicloneContext context, IAuth auth) { _context = context; _auth = auth; }
public ExpenseController(MobicloneContext context, IAuth auth) { _context = context; _auth = auth; }
public UserController(MobicloneContext context, IAuth auth, IHash hash) { _context = context; _auth = auth; _hash = hash; }
public AvatarController(MobicloneContext context, IAuth auth, IStorage storage) { _context = context; _auth = auth; _storage = storage; }