This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
477df0a
commit 35e2e0d
Showing
35 changed files
with
334 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/test/java/com/microsoft/azure/spring/data/cosmosdb/common/DynamicContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE in the project root for | ||
* license information. | ||
*/ | ||
|
||
package com.microsoft.azure.spring.data.cosmosdb.common; | ||
|
||
public class DynamicContainer { | ||
private String containerName; | ||
|
||
public DynamicContainer(String containerName) { | ||
this.containerName = containerName; | ||
} | ||
|
||
public String getContainerName() { | ||
return this.containerName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/test/java/com/microsoft/azure/spring/data/cosmosdb/domain/PageableAddress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE in the project root for | ||
* license information. | ||
*/ | ||
package com.microsoft.azure.spring.data.cosmosdb.domain; | ||
|
||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.Document; | ||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.PartitionKey; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import org.springframework.data.annotation.Id; | ||
|
||
import java.util.Objects; | ||
|
||
@Document() | ||
@Data | ||
@AllArgsConstructor | ||
public class PageableAddress { | ||
@Id | ||
private String postalCode; | ||
private String street; | ||
@PartitionKey | ||
private String city; | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final PageableAddress address = (PageableAddress) o; | ||
return Objects.equals(postalCode, address.postalCode) && | ||
Objects.equals(street, address.street) && | ||
Objects.equals(city, address.city); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(postalCode, street, city); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/test/java/com/microsoft/azure/spring/data/cosmosdb/domain/PageableMemo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE in the project root for | ||
* license information. | ||
*/ | ||
package com.microsoft.azure.spring.data.cosmosdb.domain; | ||
|
||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.Document; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* For testing date and enum purpose | ||
*/ | ||
@Document() | ||
@Data | ||
@AllArgsConstructor | ||
public class PageableMemo { | ||
private String id; | ||
private String message; | ||
private Date date; | ||
private Importance importance; | ||
} |
44 changes: 44 additions & 0 deletions
44
src/test/java/com/microsoft/azure/spring/data/cosmosdb/domain/PageablePerson.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE in the project root for | ||
* license information. | ||
*/ | ||
|
||
package com.microsoft.azure.spring.data.cosmosdb.domain; | ||
|
||
import com.microsoft.azure.spring.data.cosmosdb.common.TestConstants; | ||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.Document; | ||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.DocumentIndexingPolicy; | ||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.PartitionKey; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.data.annotation.Version; | ||
|
||
import java.util.List; | ||
|
||
@Document() | ||
@Data | ||
@EqualsAndHashCode(exclude = "_etag") | ||
@NoArgsConstructor | ||
@DocumentIndexingPolicy(includePaths = TestConstants.ORDER_BY_STRING_PATH) | ||
public class PageablePerson { | ||
private String id; | ||
private String firstName; | ||
|
||
@PartitionKey | ||
private String lastName; | ||
private List<String> hobbies; | ||
private List<Address> shippingAddresses; | ||
@Version | ||
private String _etag; | ||
|
||
public PageablePerson(String id, String firstName, String lastName, | ||
List<String> hobbies, List<Address> shippingAddresses) { | ||
this.id = id; | ||
this.firstName = firstName; | ||
this.lastName = lastName; | ||
this.hobbies = hobbies; | ||
this.shippingAddresses = shippingAddresses; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/test/java/com/microsoft/azure/spring/data/cosmosdb/domain/SortedProject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE in the project root for | ||
* license information. | ||
*/ | ||
package com.microsoft.azure.spring.data.cosmosdb.domain; | ||
|
||
import com.microsoft.azure.spring.data.cosmosdb.common.TestConstants; | ||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.Document; | ||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.DocumentIndexingPolicy; | ||
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.PartitionKey; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import org.springframework.data.annotation.Id; | ||
|
||
@Document() | ||
@Data | ||
@AllArgsConstructor | ||
@DocumentIndexingPolicy(includePaths = TestConstants.ORDER_BY_STRING_PATH) | ||
public class SortedProject { | ||
|
||
@Id | ||
private String id; | ||
|
||
private String name; | ||
|
||
@PartitionKey | ||
private String creator; | ||
|
||
private Boolean hasReleased; | ||
|
||
private Long starCount; | ||
|
||
private Long forkCount; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.