Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Commit 35e2e0d

Browse files
Updated version to 2.2.4 for release (#525)
* Updated version to 2.2.4 for release * Added PageableEntities for concurrent test issues * Added specific scoping * More testing improvements * Provided bean name * Separated internal class to its own parent class * Testing dynamicContainer bean registration * Removed testing logs * Added new Sorted Project repository * Updated setup() to setUp() because of codacy
1 parent 477df0a commit 35e2e0d

35 files changed

+334
-138
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ If you are using Maven, add the following dependency.
100100
<dependency>
101101
<groupId>com.microsoft.azure</groupId>
102102
<artifactId>spring-data-cosmosdb</artifactId>
103-
<version>2.2.3.FIX1</version>
103+
<version>2.2.4</version>
104104
</dependency>
105105
```
106106

pom.xml

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

77
<groupId>com.microsoft.azure</groupId>
88
<artifactId>spring-data-cosmosdb</artifactId>
9-
<version>2.2.4-SNAPSHOT</version>
9+
<version>2.2.4</version>
1010

1111
<name>Spring Data for Azure Cosmos DB SQL API</name>
1212
<description>Spring Data for Azure Cosmos DB SQL API</description>

samplecode/example/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.microsoft.azure</groupId>
77
<artifactId>spring-data-cosmosdb-samples</artifactId>
8-
<version>2.2.4-SNAPSHOT</version>
8+
<version>2.2.4</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -20,7 +20,7 @@
2020
<dependency>
2121
<groupId>com.microsoft.azure</groupId>
2222
<artifactId>spring-data-cosmosdb</artifactId>
23-
<version>2.2.4-SNAPSHOT</version>
23+
<version>2.2.4</version>
2424
</dependency>
2525

2626
<dependency>

samplecode/pom.xml

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

99
<groupId>com.microsoft.azure</groupId>
1010
<artifactId>spring-data-cosmosdb-samples</artifactId>
11-
<version>2.2.4-SNAPSHOT</version>
11+
<version>2.2.4</version>
1212
<packaging>pom</packaging>
1313

1414
<parent>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE in the project root for
4+
* license information.
5+
*/
6+
7+
package com.microsoft.azure.spring.data.cosmosdb.common;
8+
9+
public class DynamicContainer {
10+
private String containerName;
11+
12+
public DynamicContainer(String containerName) {
13+
this.containerName = containerName;
14+
}
15+
16+
public String getContainerName() {
17+
return this.containerName;
18+
}
19+
}

src/test/java/com/microsoft/azure/spring/data/cosmosdb/core/CosmosTemplateIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public class CosmosTemplateIT {
9494
private ResponseDiagnosticsTestUtils responseDiagnosticsTestUtils;
9595

9696
@Before
97-
public void setup() throws ClassNotFoundException {
97+
public void setUp() throws ClassNotFoundException {
9898
if (!initialized) {
9999
final CosmosDbFactory cosmosDbFactory = new CosmosDbFactory(dbConfig);
100100

src/test/java/com/microsoft/azure/spring/data/cosmosdb/core/CosmosTemplatePartitionIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class CosmosTemplatePartitionIT {
6363
private CosmosDBConfig dbConfig;
6464

6565
@Before
66-
public void setup() throws ClassNotFoundException {
66+
public void setUp() throws ClassNotFoundException {
6767
if (!initialized) {
6868
final CosmosDbFactory cosmosDbFactory = new CosmosDbFactory(dbConfig);
6969
final CosmosMappingContext mappingContext = new CosmosMappingContext();

src/test/java/com/microsoft/azure/spring/data/cosmosdb/core/converter/MappingCosmosConverterUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class MappingCosmosConverterUnitTest {
3838
ApplicationContext applicationContext;
3939

4040
@Before
41-
public void setup() {
41+
public void setUp() {
4242
final CosmosMappingContext mappingContext = new CosmosMappingContext();
4343
final ObjectMapper objectMapper = new ObjectMapper();
4444

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE in the project root for
4+
* license information.
5+
*/
6+
package com.microsoft.azure.spring.data.cosmosdb.domain;
7+
8+
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.Document;
9+
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.PartitionKey;
10+
import lombok.AllArgsConstructor;
11+
import lombok.Data;
12+
import org.springframework.data.annotation.Id;
13+
14+
import java.util.Objects;
15+
16+
@Document()
17+
@Data
18+
@AllArgsConstructor
19+
public class PageableAddress {
20+
@Id
21+
private String postalCode;
22+
private String street;
23+
@PartitionKey
24+
private String city;
25+
26+
@Override
27+
public boolean equals(Object o) {
28+
if (this == o) {
29+
return true;
30+
}
31+
if (o == null || getClass() != o.getClass()) {
32+
return false;
33+
}
34+
final PageableAddress address = (PageableAddress) o;
35+
return Objects.equals(postalCode, address.postalCode) &&
36+
Objects.equals(street, address.street) &&
37+
Objects.equals(city, address.city);
38+
}
39+
40+
@Override
41+
public int hashCode() {
42+
return Objects.hash(postalCode, street, city);
43+
}
44+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE in the project root for
4+
* license information.
5+
*/
6+
package com.microsoft.azure.spring.data.cosmosdb.domain;
7+
8+
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.Document;
9+
import lombok.AllArgsConstructor;
10+
import lombok.Data;
11+
12+
import java.util.Date;
13+
14+
/**
15+
* For testing date and enum purpose
16+
*/
17+
@Document()
18+
@Data
19+
@AllArgsConstructor
20+
public class PageableMemo {
21+
private String id;
22+
private String message;
23+
private Date date;
24+
private Importance importance;
25+
}

0 commit comments

Comments
 (0)