public CouponRepository(CouponManagementContext couponManagementContext)
        {
            _couponManagementContext = couponManagementContext;
            var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());

            XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config"));
        }
Exemple #2
0
 public void SetUp()
 {
     mockCouponManagementContext = new Sqlite().CreateSqliteConnection();
     couponRepository            = new CouponRepository(mockCouponManagementContext);
     mockCouponData = new CouponData();
     mockUserDatas  = new UserDatas();
 }
Exemple #3
0
        public CouponManagementContext CreateSqliteConnection()
        {
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();
            var option  = new DbContextOptionsBuilder <CouponManagementContext>().UseSqlite(connection).Options;
            var context = new CouponManagementContext(option);

            if (context != null)
            {
                context.Database.EnsureDeleted();
                context.Database.EnsureCreated();
            }
            return(context);
        }
Exemple #4
0
 public CouponRepository(CouponManagementContext couponManagementContext)
 {
     _couponManagementContext = couponManagementContext;
 }
Exemple #5
0
 public UserRepository(CouponManagementContext couponManagementContext)
 {
     this.couponManagementContext = couponManagementContext;
 }
Exemple #6
0
 public CustomAuthenticationManager(CouponManagementContext couponManagementContext)
 {
     _couponManagementContext = couponManagementContext;
 }