Skip to content

Commit bfb39f4

Browse files
authored
Remove Data from metric assertion class names (open-telemetry#4433)
1 parent 04617c3 commit bfb39f4

12 files changed

Lines changed: 78 additions & 82 deletions

docs/apidiffs/current_vs_latest/opentelemetry-sdk-testing.txt

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
Comparing source compatibility of against
2-
+++ NEW CLASS: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert (not serializable)
2+
+++ NEW CLASS: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert (not serializable)
33
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
4-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasAttribute(io.opentelemetry.api.common.AttributeKey, java.lang.Object)
5-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasAttribute(io.opentelemetry.sdk.testing.assertj.AttributeAssertion)
6-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasAttributes(io.opentelemetry.api.common.Attributes)
7-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasAttributes(java.util.Map$Entry[])
4+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasAttribute(io.opentelemetry.api.common.AttributeKey, java.lang.Object)
5+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasAttribute(io.opentelemetry.sdk.testing.assertj.AttributeAssertion)
6+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasAttributes(io.opentelemetry.api.common.Attributes)
7+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasAttributes(java.util.Map$Entry[])
88
+++ NEW ANNOTATION: java.lang.SafeVarargs
9-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasAttributesSatisfying(io.opentelemetry.sdk.testing.assertj.AttributeAssertion[])
10-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasAttributesSatisfying(java.lang.Iterable)
11-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasEpochNanos(long)
12-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasExemplarsSatisfying(java.util.function.Consumer[])
9+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasAttributesSatisfying(io.opentelemetry.sdk.testing.assertj.AttributeAssertion[])
10+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasAttributesSatisfying(java.lang.Iterable)
11+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasEpochNanos(long)
12+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasExemplarsSatisfying(java.util.function.Consumer[])
1313
+++ NEW ANNOTATION: java.lang.SafeVarargs
14-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasExemplarsSatisfying(java.lang.Iterable)
15-
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert hasStartEpochNanos(long)
14+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasExemplarsSatisfying(java.lang.Iterable)
15+
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.AbstractPointAssert hasStartEpochNanos(long)
1616
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.DoubleGaugeAssert (not serializable)
1717
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
1818
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.DoubleGaugeAssert hasPointsSatisfying(java.util.function.Consumer[])
1919
+++ NEW ANNOTATION: java.lang.SafeVarargs
2020
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.DoubleGaugeAssert hasPointsSatisfying(java.lang.Iterable)
21-
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.DoublePointDataAssert (not serializable)
21+
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.DoublePointAssert (not serializable)
2222
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
23-
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert
24-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.DoublePointDataAssert hasExemplars(io.opentelemetry.sdk.metrics.data.DoubleExemplarData[])
25-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.DoublePointDataAssert hasValue(double)
23+
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointAssert
24+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.DoublePointAssert hasExemplars(io.opentelemetry.sdk.metrics.data.DoubleExemplarData[])
25+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.DoublePointAssert hasValue(double)
2626
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.DoubleSumAssert (not serializable)
2727
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
2828
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.DoubleSumAssert hasPointsSatisfying(java.util.function.Consumer[])
@@ -54,7 +54,7 @@ Comparing source compatibility of against
5454
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.HistogramAssert isDelta()
5555
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.HistogramPointAssert (not serializable)
5656
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
57-
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert
57+
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointAssert
5858
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.HistogramPointAssert hasBucketBoundaries(double[])
5959
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.HistogramPointAssert hasBucketCounts(long[])
6060
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.HistogramPointAssert hasCount(long)
@@ -67,11 +67,11 @@ Comparing source compatibility of against
6767
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.LongGaugeAssert hasPointsSatisfying(java.util.function.Consumer[])
6868
+++ NEW ANNOTATION: java.lang.SafeVarargs
6969
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongGaugeAssert hasPointsSatisfying(java.lang.Iterable)
70-
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.LongPointDataAssert (not serializable)
70+
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.LongPointAssert (not serializable)
7171
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
72-
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert
73-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongPointDataAssert hasExemplars(io.opentelemetry.sdk.metrics.data.LongExemplarData[])
74-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongPointDataAssert hasValue(long)
72+
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointAssert
73+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongPointAssert hasExemplars(io.opentelemetry.sdk.metrics.data.LongExemplarData[])
74+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongPointAssert hasValue(long)
7575
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.LongSumAssert (not serializable)
7676
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
7777
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.LongSumAssert hasPointsSatisfying(java.util.function.Consumer[])
@@ -81,22 +81,22 @@ Comparing source compatibility of against
8181
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongSumAssert isDelta()
8282
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongSumAssert isMonotonic()
8383
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.LongSumAssert isNotMonotonic()
84-
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert (not serializable)
84+
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.MetricAssert (not serializable)
8585
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
86-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasDescription(java.lang.String)
87-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasDoubleGaugeSatisfying(java.util.function.Consumer)
88-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasDoubleSumSatisfying(java.util.function.Consumer)
89-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasHistogramSatisfying(java.util.function.Consumer)
90-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo)
91-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasLongGaugeSatisfying(java.util.function.Consumer)
92-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasLongSumSatisfying(java.util.function.Consumer)
93-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasName(java.lang.String)
94-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasResource(io.opentelemetry.sdk.resources.Resource)
95-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasSummarySatisfying(java.util.function.Consumer)
96-
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert hasUnit(java.lang.String)
86+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasDescription(java.lang.String)
87+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasDoubleGaugeSatisfying(java.util.function.Consumer)
88+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasDoubleSumSatisfying(java.util.function.Consumer)
89+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasHistogramSatisfying(java.util.function.Consumer)
90+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo)
91+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasLongGaugeSatisfying(java.util.function.Consumer)
92+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasLongSumSatisfying(java.util.function.Consumer)
93+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasName(java.lang.String)
94+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasResource(io.opentelemetry.sdk.resources.Resource)
95+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasSummarySatisfying(java.util.function.Consumer)
96+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert hasUnit(java.lang.String)
9797
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions (not serializable)
9898
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
99-
+++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.sdk.testing.assertj.MetricDataAssert assertThat(io.opentelemetry.sdk.metrics.data.MetricData)
99+
+++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.sdk.testing.assertj.MetricAssert assertThat(io.opentelemetry.sdk.metrics.data.MetricData)
100100
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.SummaryAssert (not serializable)
101101
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
102102
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.SummaryAssert hasPointsSatisfying(java.util.function.Consumer[])
@@ -105,7 +105,7 @@ Comparing source compatibility of against
105105
+++ NEW METHOD: PUBLIC(+) org.assertj.core.api.AbstractIterableAssert points()
106106
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.SummaryPointAssert (not serializable)
107107
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
108-
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointDataAssert
108+
+++ NEW SUPERCLASS: io.opentelemetry.sdk.testing.assertj.AbstractPointAssert
109109
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.SummaryPointAssert hasCount(long)
110110
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.testing.assertj.SummaryPointAssert hasSum(double)
111111
+++ NEW METHOD: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.testing.assertj.SummaryPointAssert hasValuesSatisfying(java.util.function.Consumer[])

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/AbstractPointDataAssert.java renamed to sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/AbstractPointAssert.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@
2020
import org.assertj.core.api.Assertions;
2121

2222
/** Assertions for an exported {@link PointData}. */
23-
public abstract class AbstractPointDataAssert<
24-
PointAssertT extends AbstractPointDataAssert<PointAssertT, PointT>,
25-
PointT extends PointData>
23+
public abstract class AbstractPointAssert<
24+
PointAssertT extends AbstractPointAssert<PointAssertT, PointT>, PointT extends PointData>
2625
extends AbstractAssert<PointAssertT, PointT> {
2726

28-
AbstractPointDataAssert(@Nullable PointT actual, Class<PointAssertT> assertClass) {
27+
AbstractPointAssert(@Nullable PointT actual, Class<PointAssertT> assertClass) {
2928
super(actual, assertClass);
3029
}
3130

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleGaugeAssert.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,18 @@ public final class DoubleGaugeAssert
2727
*/
2828
@SafeVarargs
2929
@SuppressWarnings("varargs")
30-
public final DoubleGaugeAssert hasPointsSatisfying(
31-
Consumer<DoublePointDataAssert>... assertions) {
30+
public final DoubleGaugeAssert hasPointsSatisfying(Consumer<DoublePointAssert>... assertions) {
3231
return hasPointsSatisfying(Arrays.asList(assertions));
3332
}
3433

3534
/**
3635
* Asserts the gauge has points matching all of the given assertions and no more, in any order.
3736
*/
3837
public DoubleGaugeAssert hasPointsSatisfying(
39-
Iterable<? extends Consumer<DoublePointDataAssert>> assertions) {
38+
Iterable<? extends Consumer<DoublePointAssert>> assertions) {
4039
isNotNull();
4140
assertThat(actual.getPoints())
42-
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, DoublePointDataAssert::new));
41+
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, DoublePointAssert::new));
4342
return this;
4443
}
4544
}

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoublePointDataAssert.java renamed to sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoublePointAssert.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
import org.assertj.core.api.Assertions;
1212

1313
/** Test assertions for {@link DoublePointData}. */
14-
public final class DoublePointDataAssert
15-
extends AbstractPointDataAssert<DoublePointDataAssert, DoublePointData> {
14+
public final class DoublePointAssert
15+
extends AbstractPointAssert<DoublePointAssert, DoublePointData> {
1616

17-
DoublePointDataAssert(@Nullable DoublePointData actual) {
18-
super(actual, DoublePointDataAssert.class);
17+
DoublePointAssert(@Nullable DoublePointData actual) {
18+
super(actual, DoublePointAssert.class);
1919
}
2020

2121
/** Asserts the point has the given value. */
22-
public DoublePointDataAssert hasValue(double expected) {
22+
public DoublePointAssert hasValue(double expected) {
2323
isNotNull();
2424
Assertions.assertThat(actual.getValue()).as("value").isEqualTo(expected);
2525
return this;
2626
}
2727

2828
/** Asserts the point has the specified exemplars, in any order. */
29-
public DoublePointDataAssert hasExemplars(DoubleExemplarData... exemplars) {
29+
public DoublePointAssert hasExemplars(DoubleExemplarData... exemplars) {
3030
isNotNull();
3131
Assertions.assertThat(actual.getExemplars())
3232
.as("exemplars")

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/DoubleSumAssert.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ public DoubleSumAssert isDelta() {
7373
/** Asserts the sum has points matching all of the given assertions and no more, in any order. */
7474
@SafeVarargs
7575
@SuppressWarnings("varargs")
76-
public final DoubleSumAssert hasPointsSatisfying(Consumer<DoublePointDataAssert>... assertions) {
76+
public final DoubleSumAssert hasPointsSatisfying(Consumer<DoublePointAssert>... assertions) {
7777
return hasPointsSatisfying(Arrays.asList(assertions));
7878
}
7979

8080
/** Asserts the sum has points matching all of the given assertions and no more, in any order. */
8181
public DoubleSumAssert hasPointsSatisfying(
82-
Iterable<? extends Consumer<DoublePointDataAssert>> assertions) {
82+
Iterable<? extends Consumer<DoublePointAssert>> assertions) {
8383
assertThat(actual.getPoints())
84-
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, DoublePointDataAssert::new));
84+
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, DoublePointAssert::new));
8585
return this;
8686
}
8787
}

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/HistogramPointAssert.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
/** Test assertions for {@link HistogramPointData}. */
1313
public final class HistogramPointAssert
14-
extends AbstractPointDataAssert<HistogramPointAssert, HistogramPointData> {
14+
extends AbstractPointAssert<HistogramPointAssert, HistogramPointData> {
1515

1616
HistogramPointAssert(HistogramPointData actual) {
1717
super(actual, HistogramPointAssert.class);

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongGaugeAssert.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ public final class LongGaugeAssert
2727
*/
2828
@SafeVarargs
2929
@SuppressWarnings("varargs")
30-
public final LongGaugeAssert hasPointsSatisfying(Consumer<LongPointDataAssert>... assertions) {
30+
public final LongGaugeAssert hasPointsSatisfying(Consumer<LongPointAssert>... assertions) {
3131
return hasPointsSatisfying(Arrays.asList(assertions));
3232
}
3333

3434
/**
3535
* Asserts the gauge has points matching all of the given assertions and no more, in any order.
3636
*/
3737
public LongGaugeAssert hasPointsSatisfying(
38-
Iterable<? extends Consumer<LongPointDataAssert>> assertions) {
38+
Iterable<? extends Consumer<LongPointAssert>> assertions) {
3939
assertThat(actual.getPoints())
40-
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, LongPointDataAssert::new));
40+
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, LongPointAssert::new));
4141
return this;
4242
}
4343
}

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongPointDataAssert.java renamed to sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongPointAssert.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,21 @@
1111
import org.assertj.core.api.Assertions;
1212

1313
/** Assertions for an exported {@link LongPointData}. */
14-
public final class LongPointDataAssert
15-
extends AbstractPointDataAssert<LongPointDataAssert, LongPointData> {
14+
public final class LongPointAssert extends AbstractPointAssert<LongPointAssert, LongPointData> {
1615

17-
LongPointDataAssert(@Nullable LongPointData actual) {
18-
super(actual, LongPointDataAssert.class);
16+
LongPointAssert(@Nullable LongPointData actual) {
17+
super(actual, LongPointAssert.class);
1918
}
2019

2120
/** Asserts the point has the given value. */
22-
public LongPointDataAssert hasValue(long expected) {
21+
public LongPointAssert hasValue(long expected) {
2322
isNotNull();
2423
Assertions.assertThat(actual.getValue()).as("value").isEqualTo(expected);
2524
return this;
2625
}
2726

2827
/** Asserts the point has the specified exemplars, in any order. */
29-
public LongPointDataAssert hasExemplars(LongExemplarData... exemplars) {
28+
public LongPointAssert hasExemplars(LongExemplarData... exemplars) {
3029
isNotNull();
3130
Assertions.assertThat(actual.getExemplars())
3231
.as("exemplars")

sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/LongSumAssert.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ public LongSumAssert isDelta() {
7272
/** Asserts the sum has points matching all of the given assertions and no more, in any order. */
7373
@SafeVarargs
7474
@SuppressWarnings("varargs")
75-
public final LongSumAssert hasPointsSatisfying(Consumer<LongPointDataAssert>... assertions) {
75+
public final LongSumAssert hasPointsSatisfying(Consumer<LongPointAssert>... assertions) {
7676
return hasPointsSatisfying(Arrays.asList(assertions));
7777
}
7878

7979
/** Asserts the sum has points matching all of the given assertions and no more, in any order. */
8080
public LongSumAssert hasPointsSatisfying(
81-
Iterable<? extends Consumer<LongPointDataAssert>> assertions) {
81+
Iterable<? extends Consumer<LongPointAssert>> assertions) {
8282
assertThat(actual.getPoints())
83-
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, LongPointDataAssert::new));
83+
.satisfiesExactlyInAnyOrder(AssertUtil.toConsumers(assertions, LongPointAssert::new));
8484
return this;
8585
}
8686
}

0 commit comments

Comments
 (0)