From 960e4dab40e6630167fbefa6af2cf75970bf289c Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sun, 12 Mar 2023 06:12:03 +0900 Subject: [PATCH] Polish Javadoc for TestObservationRegistryAssert (#3696) --- .../tck/TestObservationRegistryAssert.java | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java b/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java index 69cbc29c49..efbf4b06b4 100644 --- a/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java +++ b/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java @@ -166,11 +166,12 @@ public TestObservationRegistryAssert hasHandledContextsThatSatisfy( /** * Provides verification for all Observations having the given name. *

- * Examples:

 // assertions succeed
-     * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", ObservationContextAssert -> ObservationContextAssert.hasError());
+     * Examples: 

+     * // assertions succeed
+     * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", observationContextAssert -> observationContextAssert.hasError());
      *
      * // assertions fail - assuming that there was a foo observation but none had errors
-     * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", ObservationContextAssert -> ObservationContextAssert.hasError());
+ * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", observationContextAssert -> observationContextAssert.hasError());
* @param name searched Observation name * @param observationConsumer assertion to be executed for each Observation * @return {@code this} assertion object. @@ -194,11 +195,12 @@ public TestObservationRegistryAssert forAllObservationsWithNameEqualTo(String na /** * Provides verification for all Observations having the given name (ignoring case). *

- * Examples:

 // assertions succeed
-     * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", ObservationContextAssert -> ObservationContextAssert.hasError());
+     * Examples: 

+     * // assertions succeed
+     * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", observationContextAssert -> observationContextAssert.hasError());
      *
      * // assertions fail - assuming that there was a foo observation but none had errors
-     * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", ObservationContextAssert -> ObservationContextAssert.hasError());
+ * assertThat(testObservationRegistry).forAllObservationsWithNameEqualTo("foo", observationContextAssert -> observationContextAssert.hasError());
* @param name searched Observation name (ignoring case) * @param observationConsumer assertion to be executed for each Observation * @return {@code this} assertion object. @@ -223,7 +225,8 @@ public TestObservationRegistryAssert forAllObservationsWithNameEqualToIgnoreCase /** * Verifies that there is a proper number of Observations. *

- * Examples:

 // assertions succeed
+     * Examples: 

+     * // assertions succeed
      * assertThat(testObservationRegistry).hasNumberOfObservationsEqualTo(1);
      *
      * // assertions fail - assuming that there was only 1 observation
@@ -247,7 +250,8 @@ public TestObservationRegistryAssert hasNumberOfObservationsEqualTo(int expected
     /**
      * Verifies that there is a proper number of Observations with the given name.
      * 

- * Examples:

 // assertions succeed
+     * Examples: 

+     * // assertions succeed
      * assertThat(testObservationRegistry).hasNumberOfObservationsWithNameEqualTo("foo", 1);
      *
      * // assertions fail - assuming that there is only 1 observation with that name
@@ -280,7 +284,8 @@ public TestObservationRegistryAssert hasNumberOfObservationsWithNameEqualTo(Stri
      * Verifies that there is a proper number of Observations with the given name
      * (ignoring case).
      * 

- * Examples:

 // assertions succeed
+     * Examples: 

+     * // assertions succeed
      * assertThat(testObservationRegistry).hasNumberOfObservationsWithNameEqualToIgnoreCase("foo", 1);
      *
      * // assertions fail - assuming that there's only 1 such observation
@@ -312,7 +317,8 @@ public TestObservationRegistryAssert hasNumberOfObservationsWithNameEqualToIgnor
     /**
      * Verifies that there is an Observation with a key value.
      * 

- * Examples:

 // assertions succeed
+     * Examples: 

+     * // assertions succeed
      * assertThat(testObservationRegistry).hasAnObservationWithAKeyValue("foo", "bar");
      *
      * // assertions fail - assuming that there is no such a key value in any observation
@@ -342,7 +348,8 @@ public TestObservationRegistryAssert hasAnObservationWithAKeyValue(String key, S
     /**
      * Verifies that there is an Observation with a key name.
      * 

- * Examples:

 // assertions succeed
+     * Examples: 

+     * // assertions succeed
      * assertThat(testObservationRegistry).hasAnObservationWithAKeyName("foo");
      *
      * // assertions fail - assuming that there are no observations with such a key name
@@ -371,7 +378,8 @@ public TestObservationRegistryAssert hasAnObservationWithAKeyName(String key) {
     /**
      * Verifies that there is an Observation with a key value.
      * 

- * Examples:

 // assertions succeed
+     * Examples: 

+     * // assertions succeed
      * assertThat(testObservationRegistry).hasAnObservationWithAKeyValue(SomeKeyName.FOO, "bar");
      *
      * // assertions fail - assuming that there are no observations with such a key value
@@ -389,7 +397,8 @@ public TestObservationRegistryAssert hasAnObservationWithAKeyValue(KeyName key,
     /**
      * Verifies that there is an Observation with a key name.
      * 

- * Examples:

 // assertions succeed
+     * Examples: 

+     * // assertions succeed
      * assertThat(testObservationRegistry).hasAnObservationWithAKeyName(SomeKeyName.FOO);
      *
      * // assertions fail - assuming that there are no observation with such a key name