public SessionsControllerTest() { var dbOptions = DbInMemory.getDbInMemoryOptions(dbName); db = new TCSContext(dbOptions); sessionRepo = new SessionRepo(dbOptions); var personRepo = new PersonRepo(dbOptions); var semesterRepo = new SemesterRepo(dbOptions); var sessionClassRepo = new SessionClassRepo(dbOptions); var sessionReasonRepo = new SessionReasonRepo(dbOptions); var mapper = Helpers.Utils.GetProjectMapper(); sessionController = new SessionsController(sessionRepo, semesterRepo, personRepo, sessionReasonRepo, sessionClassRepo, mapper); }
public SessionsControllerTest() { var dbOptions = DbInMemory.getDbInMemoryOptions(dbName); db = new TCSContext(dbOptions); sessionRepo = new SessionRepo(dbOptions); var personRepo = new PersonRepo(dbOptions); var semesterRepo = new SemesterRepo(dbOptions); var sessionClassRepo = new SessionClassRepo(dbOptions); var sessionReasonRepo = new SessionReasonRepo(dbOptions); var reasonRepo = new ReasonRepo(dbOptions); var classRepo = new ClassRepo(dbOptions); csvParser = new CSVSessionUploadParser(); var mapper = Utils.GetProjectMapper(); var unitSession = new UnitOfWorkSession(personRepo, reasonRepo, sessionRepo, classRepo, semesterRepo); sessionController = new SessionsController(sessionRepo, semesterRepo, personRepo, sessionReasonRepo, sessionClassRepo, mapper, csvParser, unitSession); }