From 005a8026bb424779a146e00cc48621ff1d72b807 Mon Sep 17 00:00:00 2001 From: CptAlanSmith <123112708+CptAlanSmith@users.noreply.github.com> Date: Sat, 23 Sep 2023 19:25:15 +0100 Subject: Testing (#23) * Fixes for building scons * Initial proof of concept auto-testing Shows how we can pull loaded data and display it back * Re-did headless Because hubert insisted it be done like this ;) * Auto-Testing Framework Basics * Requirements Calculations * Fix for messy merge (teach me to use merge tools) * Fixing up misc merge issues to fully reconcile with master changes * Re-added missing getters * Move of testing files due to folder reorgs * Use new accessors + int reading fix --------- Co-authored-by: Hop311 --- src/openvic-simulation/testing/Requirement.hpp | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/openvic-simulation/testing/Requirement.hpp (limited to 'src/openvic-simulation/testing/Requirement.hpp') diff --git a/src/openvic-simulation/testing/Requirement.hpp b/src/openvic-simulation/testing/Requirement.hpp new file mode 100644 index 0000000..aeb36e7 --- /dev/null +++ b/src/openvic-simulation/testing/Requirement.hpp @@ -0,0 +1,33 @@ +#pragma once +#include + +namespace OpenVic { + + class Requirement { + + std::string id; + std::string text; + std::string acceptance_criteria; + bool pass = false; // Explicitly false to begin + + public: + + Requirement(std::string in_id, std::string in_text, std::string in_acceptance_criteria) { + id = in_id; + text = in_text; + acceptance_criteria = in_acceptance_criteria; + } + + // Getters + std::string get_id(); + std::string get_text(); + std::string get_acceptance_criteria(); + bool get_pass(); + + // Setters + void set_id(std::string in_id); + void set_text(std::string in_text); + void set_acceptance_criteria(std::string in_acceptance_criteria); + void set_pass(bool in_pass); + }; +} -- cgit v1.2.3-56-ga3b1