Reworking technology API a little: providing a way to register a new technology object, clarification of doc

This commit is contained in:
Matthias Koefferlein
2023-11-25 16:56:56 +01:00
parent 9565a55a3b
commit 0ea2610bf4
7 changed files with 96 additions and 50 deletions
@@ -73,6 +73,16 @@ END
RBA::Technology::remove_technology("MINE2")
assert_equal(RBA::Technology::technology_names.inspect, '[""]')
# registration
tech = RBA::Technology::new
tech.name = "NEW"
tech.dbu = 0.5
tech_new = RBA::Technology::register_technology(tech)
tech._destroy
assert_equal(RBA::Technology::technology_names.inspect, '["", "NEW"]')
assert_equal(tech_new.dbu, 0.5)
assert_equal(tech_new.name, "NEW")
end
def test_2