14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/measures/Add Output Variable/tests/AddOutputVariable_Test.rb', line 14
def test_AddOutputVariable_GoodInput
measure = AddOutputVariable.new
runner = OpenStudio::Measure::OSRunner.new(OpenStudio::WorkflowJSON.new)
model = OpenStudio::Model::Model.new
arguments = measure.arguments(model)
argument_map = OpenStudio::Measure.convertOSArgumentVectorToMap(arguments)
variable_name = arguments[0].clone
assert(variable_name.setValue('JustATest'))
argument_map['variable_name'] = variable_name
reporting_frequency = arguments[1].clone
assert(reporting_frequency.setValue('hourly'))
argument_map['reporting_frequency'] = reporting_frequency
key_value = arguments[2].clone
assert(key_value.setValue('Test'))
argument_map['key_value'] = key_value
measure.run(model, runner, argument_map)
result = runner.result
show_output(result)
assert(result.value.valueName == 'Success')
assert(result.warnings.empty?)
end
|