Exemple #1
0
        public virtual Task <IAppTestDrive> Create()
        {
            var crmService = StartupHelper.CreateCrmService();
            ITestDriveRepository repository = new TestDriveRepository();
            ITestDriveService    service    = new TestDriveService(crmService, repository);
            IAppTestDrive        app        = new AppTestDrive(service);

            return(Task.FromResult(app));
        }
        protected ITestDriveService GetService(ApplicationDbContext dbContext, UserManager <User> userManager)
        {
            var testDriveRepository = new TestDriveRepository(dbContext);
            var statusRepository    = new StatusRepository(dbContext);
            var carRepository       = new CarRepository(dbContext);
            var servie = new TestDriveService(testDriveRepository, statusRepository, carRepository, userManager);

            return(servie);
        }