File tree Expand file tree Collapse file tree 8 files changed +30
-117
lines changed
main/java/com/arpnetworking
test/java/com/arpnetworking Expand file tree Collapse file tree 8 files changed +30
-117
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public Statistic getStatistic() {
40
40
return _statistic ;
41
41
}
42
42
43
- public boolean isSpecified () {
43
+ public boolean getIsSpecified () {
44
44
return _isSpecified ;
45
45
}
46
46
@@ -80,7 +80,7 @@ public int hashCode() {
80
80
getStatistic (),
81
81
getValue (),
82
82
getPopulationSize (),
83
- isSpecified (),
83
+ getIsSpecified (),
84
84
getSupportingData ());
85
85
}
86
86
@@ -105,7 +105,7 @@ public Object toLogValue() {
105
105
.put ("statistic" , _statistic )
106
106
.put ("value" , _value )
107
107
.put ("populationSize" , _populationSize )
108
- .put ("isSpecified " , _isSpecified )
108
+ .put ("getIsSpecified " , _isSpecified )
109
109
.build ();
110
110
}
111
111
@@ -206,7 +206,7 @@ public AggregatedData build() {
206
206
throw new IllegalStateException ("populationSize must not be null" );
207
207
}
208
208
if (_isSpecified == null ) {
209
- throw new IllegalStateException ("isSpecified must not be null" );
209
+ throw new IllegalStateException ("getIsSpecified must not be null" );
210
210
}
211
211
return new AggregatedData (this );
212
212
}
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public Messages.StatisticSetRecord convert(
93
93
.setStatistic (datum .getStatistic ().getName ())
94
94
.setValue (datum .getValue ().getValue ())
95
95
.setUnit (unit )
96
- .setUserSpecified (datum .isSpecified ());
96
+ .setUserSpecified (datum .getIsSpecified ());
97
97
98
98
final ByteString supportingData = serializeSupportingData (datum );
99
99
if (supportingData != null ) {
Original file line number Diff line number Diff line change 16
16
package com .arpnetworking .metrics .mad .model ;
17
17
18
18
import com .arpnetworking .commons .test .BuildableTestHelper ;
19
+ import com .arpnetworking .commons .test .EqualityTestHelper ;
19
20
import com .arpnetworking .commons .test .ThreadLocalBuildableTestHelper ;
20
21
import com .arpnetworking .metrics .mad .model .statistics .Statistic ;
21
22
import com .arpnetworking .metrics .mad .model .statistics .StatisticFactory ;
22
23
import com .arpnetworking .test .TestBeanFactory ;
23
- import com .arpnetworking .utility .test .BuildableEqualsAndHashCodeTester ;
24
24
import org .junit .Assert ;
25
25
import org .junit .Test ;
26
26
@@ -58,15 +58,16 @@ public void testReset() throws Exception {
58
58
}
59
59
60
60
@ Test
61
- public void testEqualsAndHashCode () {
62
- BuildableEqualsAndHashCodeTester . assertEqualsAndHashCode (
61
+ public void testEqualsAndHashCode () throws Exception {
62
+ EqualityTestHelper . testEquality (
63
63
_aggregatedDataBuilder .get (),
64
64
new AggregatedData .Builder ()
65
65
.setStatistic (MEDIAN_STATISTIC )
66
66
.setValue (TestBeanFactory .createSample ())
67
67
.setIsSpecified (false )
68
68
.setPopulationSize (2L )
69
- .setSupportingData (new Object ()));
69
+ .setSupportingData (new Object ()),
70
+ AggregatedData .class );
70
71
}
71
72
72
73
@ Test
Original file line number Diff line number Diff line change 16
16
package com .arpnetworking .metrics .mad .model ;
17
17
18
18
import com .arpnetworking .commons .test .BuildableTestHelper ;
19
+ import com .arpnetworking .commons .test .EqualityTestHelper ;
19
20
import com .arpnetworking .commons .test .ThreadLocalBuildableTestHelper ;
20
21
import com .arpnetworking .metrics .mad .model .statistics .Statistic ;
21
22
import com .arpnetworking .metrics .mad .model .statistics .StatisticFactory ;
22
23
import com .arpnetworking .test .TestBeanFactory ;
23
- import com .arpnetworking .utility .test .BuildableEqualsAndHashCodeTester ;
24
24
import com .google .common .collect .ImmutableList ;
25
25
import com .google .common .collect .ImmutableMap ;
26
26
import org .junit .Assert ;
@@ -60,15 +60,16 @@ public void testReset() throws Exception {
60
60
}
61
61
62
62
@ Test
63
- public void testEqualsAndHashCode () {
64
- BuildableEqualsAndHashCodeTester . assertEqualsAndHashCode (
63
+ public void testEqualsAndHashCode () throws Exception {
64
+ EqualityTestHelper . testEquality (
65
65
_defaultMetricBuilder .get (),
66
66
new DefaultMetric .Builder ()
67
67
.setType (MetricType .TIMER )
68
68
.setValues (ImmutableList .of (TestBeanFactory .createSample ()))
69
69
.setStatistics (ImmutableMap .of (
70
70
MEDIAN_STATISTIC ,
71
- ImmutableList .of ())));
71
+ ImmutableList .of ())),
72
+ Metric .class );
72
73
}
73
74
74
75
@ Test
Original file line number Diff line number Diff line change 16
16
package com .arpnetworking .metrics .mad .model .json ;
17
17
18
18
import com .arpnetworking .commons .test .BuildableTestHelper ;
19
+ import com .arpnetworking .commons .test .EqualityTestHelper ;
19
20
import com .arpnetworking .commons .test .ThreadLocalBuildableTestHelper ;
20
- import com .arpnetworking .utility .test .BuildableEqualsAndHashCodeTester ;
21
21
import com .google .common .collect .ImmutableMap ;
22
22
import org .junit .Assert ;
23
23
import org .junit .Test ;
@@ -51,14 +51,15 @@ public void testReset() throws Exception {
51
51
}
52
52
53
53
@ Test
54
- public void testEqualsAndHashCode () {
55
- BuildableEqualsAndHashCodeTester . assertEqualsAndHashCode (
54
+ public void testEqualsAndHashCode () throws Exception {
55
+ EqualityTestHelper . testEquality (
56
56
_telegrafBuilder .get (),
57
57
new Telegraf .Builder ()
58
58
.setTimestamp (System .currentTimeMillis () + 1000 )
59
59
.setName ("test2" )
60
60
.setFields (ImmutableMap .of ("metric2" , "60" ))
61
- .setTags (ImmutableMap .of ("host" , "localhost2" )));
61
+ .setTags (ImmutableMap .of ("host" , "localhost2" )),
62
+ Telegraf .class );
62
63
}
63
64
64
65
@ Test
Original file line number Diff line number Diff line change 16
16
package com .arpnetworking .tsdcore .model ;
17
17
18
18
import com .arpnetworking .commons .test .BuildableTestHelper ;
19
+ import com .arpnetworking .commons .test .EqualityTestHelper ;
19
20
import com .arpnetworking .commons .test .ThreadLocalBuildableTestHelper ;
20
21
import com .arpnetworking .test .TestBeanFactory ;
21
- import com .arpnetworking .utility .test .BuildableEqualsAndHashCodeTester ;
22
22
import org .junit .Assert ;
23
23
import org .junit .Test ;
24
24
@@ -49,12 +49,13 @@ public void testReset() throws Exception {
49
49
}
50
50
51
51
@ Test
52
- public void testEqualsAndHashCode () {
53
- BuildableEqualsAndHashCodeTester . assertEqualsAndHashCode (
52
+ public void testEqualsAndHashCode () throws Exception {
53
+ EqualityTestHelper . testEquality (
54
54
_calculatedValueBuilder .get (),
55
55
new CalculatedValue .Builder <>()
56
56
.setValue (TestBeanFactory .createSample ())
57
- .setData (new Object ()));
57
+ .setData (new Object ()),
58
+ CalculatedValue .class );
58
59
}
59
60
60
61
@ Test
Original file line number Diff line number Diff line change 16
16
package com .arpnetworking .tsdcore .model ;
17
17
18
18
import com .arpnetworking .commons .test .BuildableTestHelper ;
19
+ import com .arpnetworking .commons .test .EqualityTestHelper ;
19
20
import com .arpnetworking .commons .test .ThreadLocalBuildableTestHelper ;
20
21
import com .arpnetworking .metrics .mad .model .AggregatedData ;
21
22
import com .arpnetworking .metrics .mad .model .statistics .Statistic ;
22
23
import com .arpnetworking .metrics .mad .model .statistics .StatisticFactory ;
23
24
import com .arpnetworking .test .TestBeanFactory ;
24
- import com .arpnetworking .utility .test .BuildableEqualsAndHashCodeTester ;
25
25
import com .google .common .collect .ImmutableMap ;
26
26
import com .google .common .collect .ImmutableMultimap ;
27
27
import org .junit .Assert ;
@@ -70,8 +70,8 @@ public void testReset() throws Exception {
70
70
}
71
71
72
72
@ Test
73
- public void testEqualsAndHashCode () {
74
- BuildableEqualsAndHashCodeTester . assertEqualsAndHashCode (
73
+ public void testEqualsAndHashCode () throws Exception {
74
+ EqualityTestHelper . testEquality (
75
75
_periodicDataBuilder .get (),
76
76
new PeriodicData .Builder ()
77
77
.setPeriod (Duration .ofMinutes (2 ))
@@ -85,7 +85,8 @@ public void testEqualsAndHashCode() {
85
85
.setIsSpecified (false )
86
86
.setValue (TestBeanFactory .createSample ())
87
87
.setPopulationSize (2L )
88
- .build ())));
88
+ .build ())),
89
+ PeriodicData .class );
89
90
}
90
91
91
92
@ Test
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments