[PR] Implement tests for GradeCalculator and FinalGradeDeterminator, add documentation for aformentioned nodes #4

Merged
vincent merged 8 commits from 1-grade-generator/cijfer-determinator-calculator into 1-grade-generator/master 2025-10-07 10:07:12 +02:00
Member
No description provided.
vincent added 7 commits 2025-10-04 10:26:34 +02:00
vincent requested review from inholland 2025-10-04 10:26:36 +02:00
vincent requested review from wessel 2025-10-04 10:26:37 +02:00
wessel added the Assignment 1Kind/DocumentationKind/Testing
Priority
Medium
3
labels 2025-10-05 14:22:08 +02:00
wessel requested changes 2025-10-05 18:03:21 +02:00
@@ -0,0 +14,4 @@
namespace assignments::one {
class FakeDatabaseManager : public DatabaseManager {
Owner

These classes are called "Mock" classes, and thus I'd prefix them as "MockDatabaseManager" or something like that.

These classes are called "Mock" classes, and thus I'd prefix them as "MockDatabaseManager" or something like that.
Owner

Also interesting for your own information, GTest has a whole interface and setup around this; https://google.github.io/googletest/gmock_for_dummies.html

Also interesting for your own information, GTest has a whole interface and setup around this; https://google.github.io/googletest/gmock_for_dummies.html
vincent marked this conversation as resolved
@@ -0,0 +32,4 @@
// No-op for fake
}
struct StoredResult {
Owner

I'd recommend keeping structs outside the class, but inside the namespace

I'd recommend keeping structs outside the class, but inside the namespace
vincent marked this conversation as resolved
@@ -0,0 +103,4 @@
std::this_thread::sleep_for(10ms);
}
}
std::unique_ptr<assignments::one::FakeDatabaseManager> fake_db_;
Owner

I personally prefer to split off with newlines in between the variables that are used together (or somewhat)

I personally prefer to split off with newlines in between the variables that are used together (or somewhat)
vincent marked this conversation as resolved
@@ -0,0 +8,4 @@
using assignments::one::grade_calculator::GradeCalculator;
class GradeCalculatorTest : public ::testing::Test
{
Owner

Formatting (check whole document)

Formatting (check whole document)
vincent marked this conversation as resolved
vincent added 1 commit 2025-10-05 18:19:36 +02:00
vincent added 2 commits 2025-10-05 19:12:55 +02:00
vincent added 2 commits 2025-10-07 10:06:27 +02:00
vincent merged commit e955280865 into 1-grade-generator/master 2025-10-07 10:07:12 +02:00
Sign in to join this conversation.