Skip to content

Commit 757e52c

Browse files
committed
Add code standard
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
1 parent 358f9a2 commit 757e52c

File tree

6 files changed

+26
-3
lines changed

6 files changed

+26
-3
lines changed

dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/client/DaprClientAutoConfigurationTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import io.dapr.client.DaprClient;
1717
import io.dapr.client.DaprClientBuilder;
1818
import org.assertj.core.api.SoftAssertions;
19+
import org.junit.jupiter.api.DisplayName;
1920
import org.junit.jupiter.api.Test;
2021
import org.springframework.boot.autoconfigure.AutoConfigurations;
2122
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
@@ -44,6 +45,7 @@ void daprClient() {
4445
}
4546

4647
@Test
48+
@DisplayName("Should override properties when generating DaprClientBuilder")
4749
void shouldOverridePropertiesWhenGeneratingDaprClientBuilder() {
4850
PropertiesDaprConnectionDetails details = new PropertiesDaprConnectionDetails(
4951
new DaprClientProperties(

dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/client/DaprClientPropertiesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 The Dapr Authors
2+
* Copyright 2025 The Dapr Authors
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at

dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/pubsub/DaprPubSubPropertiesTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 The Dapr Authors
2+
* Copyright 2025 The Dapr Authors
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -14,6 +14,7 @@
1414
package io.dapr.spring.boot.autoconfigure.pubsub;
1515

1616
import org.assertj.core.api.SoftAssertions;
17+
import org.junit.jupiter.api.DisplayName;
1718
import org.junit.jupiter.api.Test;
1819
import org.springframework.boot.context.properties.EnableConfigurationProperties;
1920
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
@@ -25,6 +26,7 @@ public class DaprPubSubPropertiesTest {
2526

2627

2728
@Test
29+
@DisplayName("Should configure properties with setters")
2830
void shouldSetProperties() {
2931
DaprPubSubProperties properties = new DaprPubSubProperties();
3032
properties.setName("pubsub");
@@ -37,6 +39,7 @@ void shouldSetProperties() {
3739
}
3840

3941
@Test
42+
@DisplayName("Should map DaprPubSubProperties correctly")
4043
void shouldMapDaprPubSubPropertiesCorrectly() {
4144
runner.withPropertyValues(
4245
"dapr.pubsub.name=pubsub",

sdk/src/test/java/io/dapr/client/domain/SaveStateRequestTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 The Dapr Authors
2+
* Copyright 2025 The Dapr Authors
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at

sdk/src/test/java/io/dapr/client/domain/StateTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.dapr.client.domain;
22

3+
import org.junit.jupiter.api.DisplayName;
34
import org.junit.jupiter.api.Test;
45

56
import java.util.HashMap;
@@ -108,6 +109,7 @@ public void testEqualsAndHashcode() {
108109
}
109110

110111
@Test
112+
@DisplayName("Should hashCode and equals method work with null metadata")
111113
public void testEqualsAndHashcodeWithNullValues() {
112114
State<String> state1 = new State<>(KEY, "value", ETAG, null, OPTIONS);
113115
State<String> state2 = new State<>(KEY, "value", ETAG, null, OPTIONS);

sdk/src/test/java/io/dapr/client/domain/TransactionalStateRequestTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
/*
2+
* Copyright 2025 The Dapr Authors
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
* Unless required by applicable law or agreed to in writing, software
8+
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
* See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
113
package io.dapr.client.domain;
214

315
import org.junit.jupiter.api.Assertions;
16+
import org.junit.jupiter.api.DisplayName;
417
import org.junit.jupiter.api.Test;
518

619
import java.util.List;
@@ -10,6 +23,7 @@ class TransactionalStateRequestTest {
1023

1124

1225
@Test
26+
@DisplayName("Should create with non empty collections")
1327
void shouldCreateCorrectlyWithNonEmptyCollections() {
1428

1529
State<String> users = new State<>("users");
@@ -25,6 +39,7 @@ void shouldCreateCorrectlyWithNonEmptyCollections() {
2539
}
2640

2741
@Test
42+
@DisplayName("Should create correctly with empty collections")
2843
void shouldCreateCorrectlyWithEmptyCollections() {
2944
TransactionalStateRequest<String> request = new TransactionalStateRequest<>(
3045
List.of(), Map.of()
@@ -34,6 +49,7 @@ void shouldCreateCorrectlyWithEmptyCollections() {
3449
}
3550

3651
@Test
52+
@DisplayName("Should create correctly with null value")
3753
void shouldCreateWhenArgumentIsNull() {
3854
TransactionalStateRequest<String> request = new TransactionalStateRequest<>(
3955
null, null

0 commit comments

Comments
 (0)