generated from wessel/boilerplate
[PR] Implement tests for GradeCalculator and FinalGradeDeterminator, add documentation for aformentioned nodes #4
Reference in New Issue
Block a user
Delete Branch "1-grade-generator/cijfer-determinator-calculator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@@ -0,0 +14,4 @@namespace assignments::one {class FakeDatabaseManager : public DatabaseManager {These classes are called "Mock" classes, and thus I'd prefix them as "MockDatabaseManager" or something like that.
Also interesting for your own information, GTest has a whole interface and setup around this; https://google.github.io/googletest/gmock_for_dummies.html
@@ -0,0 +32,4 @@// No-op for fake}struct StoredResult {I'd recommend keeping structs outside the class, but inside the namespace
@@ -0,0 +103,4 @@std::this_thread::sleep_for(10ms);}}std::unique_ptr<assignments::one::FakeDatabaseManager> fake_db_;I personally prefer to split off with newlines in between the variables that are used together (or somewhat)
@@ -0,0 +8,4 @@using assignments::one::grade_calculator::GradeCalculator;class GradeCalculatorTest : public ::testing::Test{Formatting (check whole document)