aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/testing/Requirement.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-11-22 23:11:42 +0100
committer GitHub <noreply@github.com>2023-11-22 23:11:42 +0100
commita54898b7770e0d66b729216173960686c67e58bb (patch)
treeaf8ed836a4789ef94c5bfed27abb713922f45af3 /src/openvic-simulation/testing/Requirement.hpp
parente76336cd92639f4ec71088fc4c80aea4c25528cd (diff)
parent738a203e0d8b4df87c42888043b99c13d5d97511 (diff)
Merge pull request #78 from OpenVicProject/property-macro
Refactoring (*mostly* related to the property macro)
Diffstat (limited to 'src/openvic-simulation/testing/Requirement.hpp')
-rw-r--r--src/openvic-simulation/testing/Requirement.hpp33
1 files changed, 10 insertions, 23 deletions
diff --git a/src/openvic-simulation/testing/Requirement.hpp b/src/openvic-simulation/testing/Requirement.hpp
index 20dad3d..e91fa79 100644
--- a/src/openvic-simulation/testing/Requirement.hpp
+++ b/src/openvic-simulation/testing/Requirement.hpp
@@ -1,44 +1,31 @@
#pragma once
#include <string>
+#include "openvic-simulation/utility/Getters.hpp"
namespace OpenVic {
class Requirement {
// Loaded during construction
- std::string id;
- std::string text;
- std::string acceptance_criteria;
- bool pass = false; // Explicitly false to begin
- bool tested = false;
+ std::string PROPERTY_RW(id);
+ std::string PROPERTY_RW(text);
+ std::string PROPERTY_RW(acceptance_criteria);
+ bool PROPERTY(pass);
+ bool PROPERTY_RW(tested);
// Initialised and used during script execution
- std::string target_value;
- std::string actual_value;
+ std::string PROPERTY_RW(target_value);
+ std::string PROPERTY_RW(actual_value);
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;
+ pass = false; // Explicitly false to begin
+ tested = false;
}
- // Getters
- std::string get_id();
- std::string get_text();
- std::string get_acceptance_criteria();
- bool get_pass();
- bool get_tested();
- std::string get_target_value();
- std::string get_actual_value();
-
- // 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);
- void set_tested(bool in_tested);
- void set_target_value(std::string in_target_value);
- void set_actual_value(std::string in_actual_value);
};
}