metric_configuration_fixtures.rb
1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
require File.dirname(__FILE__) + '/metric_fixtures'
class MetricConfigurationFixtures
def self.amloc_metric_configuration
amloc = Kalibro::MetricConfiguration.new amloc_metric_configuration_hash
amloc.configuration_id = "13"
amloc
end
def self.sc_metric_configuration
sc = Kalibro::MetricConfiguration.new sc_metric_configuration_hash
sc.configuration_id = "13"
sc
end
def self.created_metric_configuration
Kalibro::MetricConfiguration.new({
:code => 'amloc',
:metric => MetricFixtures.amloc_hash,
:base_tool_name => "Analizo",
:weight => "1.0",
:aggregation_form => 'AVERAGE',
:reading_group_id => "31",
:configuration_id => "13"
})
end
def self.amloc_metric_configuration_hash
{
:id => "42",
:code => 'amloc',
:metric => MetricFixtures.amloc_hash,
:base_tool_name => "Analizo",
:weight => "1.0",
:aggregation_form => 'AVERAGE',
:reading_group_id => "31",
:attributes! => {:metric => {
'xmlns:xsi'=> 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:type' => 'kalibro:metricXml' }}
}
end
def self.sc_metric_configuration_hash
{
:id => "42",
:code => 'sc',
:metric => MetricFixtures.compound_metric_hash,
:weight => "1.0",
:aggregation_form => 'AVERAGE',
:reading_group_id => "31",
:attributes! => {:metric => {
'xmlns:xsi'=> 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:type' => 'kalibro:metricXml' }}
}
end
end