コード例 #1
0
        public SubscriptionControllerTest()
        {
            this.CreateAppContext();

            // Automapper initializers
            Mapper.Initialize(cfg =>
            {
                cfg.AddProfile <SubscriptionProfileMapping>();
            });

            // setting up the context and repositories
            this.SubscriptionDbContext = this.CreateDbContext <SubscriptionDbContext>();
            SubscriptionRepository subscriptionRepository = new SubscriptionRepository(this.SubscriptionDbContext);
            SubscriptionDomain     subscriptionDomain     = new SubscriptionDomain(subscriptionRepository);

            this.Controller = new SubscriptionController(subscriptionDomain);
        }
コード例 #2
0
 public SubscriptionController(SubscriptionDomain domain)
 {
     this._domain = domain;
 }