generated from wessel/boilerplate
fix(DatabaseManager): Make functions virtual for testing
This commit is contained in:
@@ -24,10 +24,10 @@ public:
|
||||
~DatabaseManager() = default;
|
||||
|
||||
bool connect(const std::string& connection_string);
|
||||
bool is_connected() const;
|
||||
virtual bool is_connected() const;
|
||||
|
||||
// Table operations
|
||||
void init_database();
|
||||
virtual void init_database();
|
||||
void create_tables();
|
||||
void insert_sample_data();
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
std::vector<StudentCourse> queue_pending_combinations();
|
||||
bool store_exam_result(const std::string& student_name, const std::string& course_name, int grade);
|
||||
bool enroll_student_into_course(const StudentCourse& sc);
|
||||
bool store_final_course_result(const StudentCourse& sc, int exam_count, int final_grade);
|
||||
virtual bool store_final_course_result(const StudentCourse& sc, int exam_count, int final_grade);
|
||||
|
||||
int get_final_course_grade(const StudentCourse& sc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user