forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Azure#64 from navalev/roundtrip
Dynamic & static doc datetime roundtrip UTC tests
- Loading branch information
Showing
11 changed files
with
577 additions
and
100 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
sdk/search/azure-search-data/src/test/java/com/azure/search/data/models/Author.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,46 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
package com.azure.search.data.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.Objects; | ||
|
||
public class Author { | ||
@JsonProperty(value = "FirstName") | ||
private String firstName; | ||
|
||
@JsonProperty(value = "LastName") | ||
private String lastName; | ||
|
||
public String firstName() { | ||
return this.firstName; | ||
} | ||
|
||
public Author firstName(String firstName) { | ||
this.firstName = firstName; | ||
return this; | ||
} | ||
|
||
public String lastName() { | ||
return this.lastName; | ||
} | ||
|
||
public Author lastName(String lastName) { | ||
this.lastName = lastName; | ||
return this; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof Author)) return false; | ||
Author author = (Author) o; | ||
return Objects.equals(firstName, author.firstName) && | ||
Objects.equals(lastName, author.lastName); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(firstName, lastName); | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
sdk/search/azure-search-data/src/test/java/com/azure/search/data/models/Book.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,73 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
package com.azure.search.data.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.Date; | ||
import java.util.Objects; | ||
|
||
public class Book { | ||
@JsonProperty(value = "ISBN") | ||
private String ISBN; | ||
|
||
@JsonProperty(value = "Title") | ||
private String title; | ||
|
||
@JsonProperty(value = "Author") | ||
private Author author; | ||
|
||
@JsonProperty(value = "PublishDate") | ||
private Date publishDate; | ||
|
||
public String ISBN() { | ||
return this.ISBN; | ||
} | ||
|
||
public Book ISBN(String ISBN) { | ||
this.ISBN = ISBN; | ||
return this; | ||
} | ||
|
||
public String title() { | ||
return this.title; | ||
} | ||
|
||
public Book title(String title) { | ||
this.title = title; | ||
return this; | ||
} | ||
|
||
public Author author() { | ||
return this.author; | ||
} | ||
|
||
public Book author(Author author) { | ||
this.author = author; | ||
return this; | ||
} | ||
|
||
public Date publishDate() { | ||
return this.publishDate; | ||
} | ||
|
||
public Book publishDate(Date publishDate) { | ||
this.publishDate = publishDate; | ||
return this; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof Book)) return false; | ||
Book book = (Book) o; | ||
return Objects.equals(ISBN, book.ISBN) && | ||
Objects.equals(title, book.title) && | ||
Objects.equals(author, book.author) && | ||
Objects.equals(publishDate, book.publishDate); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(ISBN, title, author, publishDate); | ||
} | ||
} |
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.