private ITestDriveService GetService(ApplicationDbContext dbContext, string userId) { var mockedUserManager = CommonGetMockMethods.GetUserManager(); CommonSetupMockMethods.SetupMockedUserManagerGetUserId(mockedUserManager, userId); var service = this.GetService(dbContext, mockedUserManager.Object); return(service); }
private async Task CallScheduleTestDriveAsync( ScheduleTestDriveServiceModel model, ApplicationDbContext dbContext, string userId) { SeedStatusesMethods.SeedStatus(dbContext, TestDriveStatus.Upcoming); var mockedUserManager = CommonGetMockMethods.GetUserManager(); CommonSetupMockMethods.SetupMockedUserManagerGetUserId(mockedUserManager, userId); var service = this.GetService(dbContext, mockedUserManager.Object); var user = new Mock <ClaimsPrincipal>().Object; await service.ScheduleTestDriveAsync(model, user); }