code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
@Override public boolean hasNext() { return iterator.hasNext(); }
@author Roman Puchkovskiy @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
hasNext
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.java
Apache-2.0
@Override public SearchHit<String> next() { String nextString = iterator.next(); return new SearchHit<>("index", "id", null, 1.0f, new Object[0], emptyMap(), null, null, null, null, nextString); }
@author Roman Puchkovskiy @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
next
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.java
Apache-2.0
@BeforeEach void setUp() { indexNameProvider.increment(); personIndexOperations = operations.indexOps(Person.class); personIndexOperations.createWithMapping(); studentIndexOperations = operations.indexOps(Student.class); studentIndexOperations.createWithMapping(); operations.save( // new Person("1", "...
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
setUp
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test @Order(Integer.MAX_VALUE) void cleanup() { operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + '*')).delete(); }
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
cleanup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test // #1891 @DisplayName("should store, retrieve and delete template script") void shouldStoreAndRetrieveAndDeleteTemplateScript() throws JSONException { // we do all in this test because scripts aren't stored in an index but in the cluster and we need to clenaup. var success = operations.putScript(SCRIPT_SEA...
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
shouldStoreAndRetrieveAndDeleteTemplateScript
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test // #1891 @DisplayName("should search with template") void shouldSearchWithTemplate() { var success = operations.putScript(SCRIPT_SEARCH_FIRSTNAME); assertThat(success).isTrue(); var query = SearchTemplateQuery.builder() // .withId(SCRIPT_SEARCH_FIRSTNAME.id()) // .withParams(Map.of("firstName", "...
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
shouldSearchWithTemplate
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test // #2704 @DisplayName("should search with template multisearch") void shouldSearchWithTemplateMultiSearch() { var success = operations.putScript(SCRIPT_SEARCH_FIRSTNAME); assertThat(success).isTrue(); var q1 = SearchTemplateQuery.builder() // .withId(SCRIPT_SEARCH_FIRSTNAME.id()) // .withParams(M...
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
shouldSearchWithTemplateMultiSearch
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test // #2704 @DisplayName("should search with template multisearch including different scripts") void shouldSearchWithTemplateMultiSearchIncludingDifferentScripts() { assertThat(operations.putScript(SCRIPT_SEARCH_FIRSTNAME)).isTrue(); assertThat(operations.putScript(SCRIPT_SEARCH_LASTNAME)).isTrue(); var q1 ...
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
shouldSearchWithTemplateMultiSearchIncludingDifferentScripts
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test // #2704 @DisplayName("should search with template multisearch with multiple classes") void shouldSearchWithTemplateMultiSearchWithMultipleClasses() { assertThat(operations.putScript(SCRIPT_SEARCH_FIRSTNAME)).isTrue(); assertThat(operations.putScript(SCRIPT_SEARCH_LASTNAME)).isTrue(); var q1 = SearchTemp...
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
shouldSearchWithTemplateMultiSearchWithMultipleClasses
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test // #2704 @DisplayName("should search with template multisearch with multiple index coordinates") void shouldSearchWithTemplateMultiSearchWithMultipleIndexCoordinates() { assertThat(operations.putScript(SCRIPT_SEARCH_FIRSTNAME)).isTrue(); assertThat(operations.putScript(SCRIPT_SEARCH_LASTNAME)).isTrue(); ...
Integration tests search template API. @author Peter-Josef Meisch @author Haibo Liu
shouldSearchWithTemplateMultiSearchWithMultipleIndexCoordinates
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java
Apache-2.0
@Test // DATAES-764 public void shouldCallClearScrollOnIteratorClose() { // given List<SearchHit<String>> hits = new ArrayList<>(); hits.add(getOneSearchHit()); hits.add(getOneSearchHit()); hits.add(getOneSearchHit()); SearchScrollHits<String> searchHits = newSearchScrollHits(hits, "1234"); AtomicBool...
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
shouldCallClearScrollOnIteratorClose
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
@Test // #1745 @DisplayName("should call clearScroll when no more data is available") void shouldCallClearScrollWhenNoMoreDataIsAvailable() { List<SearchHit<String>> hits = new ArrayList<>(); hits.add(getOneSearchHit()); SearchScrollHits<String> searchHits = newSearchScrollHits(hits, "1234"); AtomicBoolean c...
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
shouldCallClearScrollWhenNoMoreDataIsAvailable
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
private SearchHit<String> getOneSearchHit() { return new SearchHit<>(null, null, null, 0, null, null, null, null, null, null, "one"); }
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
getOneSearchHit
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
@Test // DATAES-766 public void shouldReturnTotalHits() { // given List<SearchHit<String>> hits = new ArrayList<>(); hits.add(getOneSearchHit()); SearchScrollHits<String> searchHits = newSearchScrollHits(hits, "1234"); // when SearchHitsIterator<String> iterator = StreamQueries.streamResults( // 0, ...
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
shouldReturnTotalHits
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
@Test // DATAES-817 void shouldClearAllScrollIds() { SearchScrollHits<String> searchHits1 = newSearchScrollHits(Collections.singletonList(getOneSearchHit()), "s-1"); SearchScrollHits<String> searchHits2 = newSearchScrollHits(Collections.singletonList(getOneSearchHit()), "s-2"); SearchScrollHits<String> searchHi...
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
shouldClearAllScrollIds
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
@Test // DATAES-831 void shouldReturnAllForRequestedSizeOf0() { SearchScrollHits<String> searchHits1 = newSearchScrollHits(Collections.singletonList(getOneSearchHit()), "s-1"); SearchScrollHits<String> searchHits2 = newSearchScrollHits(Collections.singletonList(getOneSearchHit()), "s-2"); SearchScrollHits<Strin...
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
shouldReturnAllForRequestedSizeOf0
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
@Test // DATAES-831 void shouldOnlyReturnRequestedCount() { SearchScrollHits<String> searchHits1 = newSearchScrollHits(Collections.singletonList(getOneSearchHit()), "s-1"); SearchScrollHits<String> searchHits2 = newSearchScrollHits(Collections.singletonList(getOneSearchHit()), "s-2"); SearchScrollHits<String> s...
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
shouldOnlyReturnRequestedCount
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
private SearchScrollHits<String> newSearchScrollHits(List<SearchHit<String>> hits, String scrollId) { return new SearchHitsImpl<>(hits.size(), TotalHitsRelation.EQUAL_TO, 0, Duration.ofMillis(1), scrollId, null, hits, null, null, null); }
@author Sascha Woo @author Peter-Josef Meisch @author Haibo Liu @author Mohamed El Harrougui
newSearchScrollHits
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java
Apache-2.0
@BeforeEach public void before() { indexNameProvider.increment(); operations.indexOps(ArticleEntity.class).createWithMapping(); operations.indexOps(PipelineAggsEntity.class).createWithMapping(); ArticleEntity article1 = new ArticleEntityBuilder("1").title("article four").subject("computing") .addAuthor(R...
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
before
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Test @Order(java.lang.Integer.MAX_VALUE) void cleanup() { operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete(); }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
cleanup
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Test // DATAES-96 public void shouldReturnAggregatedResponseForGivenSearchQuery() { String aggsName = "subjects"; Query searchQuery = getTermsAggsQuery(aggsName, "subject"); SearchHits<ArticleEntity> searchHits = operations.search(searchQuery, ArticleEntity.class); AggregationsContainer<?> aggregationsConta...
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
shouldReturnAggregatedResponseForGivenSearchQuery
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Test // #1255 @DisplayName("should work with pipeline aggregations") void shouldWorkWithPipelineAggregations() { operations.save( // new PipelineAggsEntity("1-1", "one"), // new PipelineAggsEntity("2-1", "two"), // new PipelineAggsEntity("2-2", "two"), // new PipelineAggsEntity("3-1", "three"), //...
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
shouldWorkWithPipelineAggregations
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Nullable public String getId() { return id; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setId(@Nullable String id) { this.id = id; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
setId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Nullable public String getTitle() { return title; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
getTitle
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setTitle(@Nullable String title) { this.title = title; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
setTitle
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Nullable public String getSubject() { return subject; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
getSubject
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setSubject(@Nullable String subject) { this.subject = subject; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
setSubject
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Nullable public List<String> getAuthors() { return authors; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
getAuthors
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setAuthors(@Nullable List<String> authors) { this.authors = authors; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
setAuthors
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@Nullable public List<java.lang.Integer> getPublishedYears() { return publishedYears; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
getPublishedYears
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setPublishedYears(@Nullable List<java.lang.Integer> publishedYears) { this.publishedYears = publishedYears; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
setPublishedYears
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public int getScore() { return score; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
getScore
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setScore(int score) { this.score = score; }
@author Rizwan Idrees @author Mohsin Husen @author Jonathan Yan @author Artur Konczak @author Peter-Josef Meisch
setScore
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public ArticleEntityBuilder title(String title) { result.setTitle(title); return this; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
title
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public ArticleEntityBuilder subject(String subject) { result.setSubject(subject); return this; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
subject
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public ArticleEntityBuilder addAuthor(String author) { result.getAuthors().add(author); return this; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
addAuthor
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public ArticleEntityBuilder addPublishedYear(Integer year) { result.getPublishedYears().add(year); return this; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
addPublishedYear
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public ArticleEntityBuilder score(int score) { result.setScore(score); return this; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
score
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public ArticleEntity build() { return result; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
build
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public IndexQuery buildIndex() { IndexQuery indexQuery = new IndexQuery(); indexQuery.setId(result.getId()); indexQuery.setObject(result); return indexQuery; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
buildIndex
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public String getId() { return id; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
getId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setId(String id) { this.id = id; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
setId
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public String getKeyword() { return keyword; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
getKeyword
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
public void setKeyword(String keyword) { this.keyword = keyword; }
Simple type to test facets @author Artur Konczak @author Mohsin Husen
setKeyword
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java
Apache-2.0
@ParameterizedTest // DATAES-716 @EnumSource(DateFormat.class) void shouldCreateConvertersForAllKnownFormats(DateFormat dateFormat) { switch (dateFormat) { case weekyear: case weekyear_week: case weekyear_week_day: return; } ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(dat...
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldCreateConvertersForAllKnownFormats
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-716 void shouldCreateConvertersForDateFormatPattern() { // given String pattern = "dd.MM.uuuu"; // when ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(pattern); // then assertThat(converter).isNotNull(); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldCreateConvertersForDateFormatPattern
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-716 void shouldConvertTemporalAccessorToString() { LocalDate localDate = LocalDate.of(2019, 12, 27); ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(DateFormat.basic_date); String formatted = converter.format(localDate); assertThat(formatted).isEqualTo("20191227"); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertTemporalAccessorToString
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-716 void shouldParseTemporalAccessorFromString() { LocalDate localDate = LocalDate.of(2019, 12, 27); ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(DateFormat.basic_date); LocalDate parsed = converter.parse("20191227", LocalDate.class); assertThat(parsed).isEqualTo(local...
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldParseTemporalAccessorFromString
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-792 void shouldConvertLegacyDateToString() { GregorianCalendar calendar = GregorianCalendar .from(ZonedDateTime.of(LocalDateTime.of(2020, 4, 19, 19, 44), ZoneId.of("UTC"))); Date legacyDate = calendar.getTime(); ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(DateFormat.b...
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertLegacyDateToString
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-792 void shouldParseLegacyDateFromString() { GregorianCalendar calendar = GregorianCalendar .from(ZonedDateTime.of(LocalDateTime.of(2020, 4, 19, 19, 44), ZoneId.of("UTC"))); Date legacyDate = calendar.getTime(); ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(DateFormat.b...
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldParseLegacyDateFromString
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-847 void shouldParseEpochMillisString() { Instant instant = Instant.ofEpochMilli(1234568901234L); ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(DateFormat.epoch_millis); Date parsed = converter.parse("1234568901234"); assertThat(parsed.toInstant()).isEqualTo(instant); ...
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldParseEpochMillisString
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-847 void shouldConvertInstantToString() { Instant instant = Instant.ofEpochMilli(1234568901234L); ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(DateFormat.epoch_millis); String formatted = converter.format(instant); assertThat(formatted).isEqualTo("1234568901234"); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertInstantToString
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-953 @DisplayName("should write and read Date with custom format") void shouldWriteAndReadDateWithCustomFormat() { // only seconds as the format string does not store millis long currentTimeSeconds = System.currentTimeMillis() / 1_000; Date date = new Date(currentTimeSeconds * 1_000); Elastic...
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldWriteAndReadDateWithCustomFormat
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // DATAES-953 @DisplayName("should write and read Instant with custom format") void shouldWriteAndReadInstantWithCustomFormat() { // only seconds as the format string does not store millis long currentTimeSeconds = System.currentTimeMillis() / 1_000; Instant instant = Instant.ofEpochSecond(currentTimeSec...
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldWriteAndReadInstantWithCustomFormat
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_date") void shouldConvertBasicDate() { check(ElasticsearchDateConverter.of(DateFormat.basic_date), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicDate
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_date_time") void shouldConvertBasicDateTime() { check(ElasticsearchDateConverter.of(DateFormat.basic_date_time), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicDateTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_date_time_no_millis") void shouldConvertBasicDateTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.basic_date_time_no_millis), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicDateTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_ordinal_date") void shouldConvertBasicOrdinalDate() { check(ElasticsearchDateConverter.of(DateFormat.basic_ordinal_date), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicOrdinalDate
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_ordinal_date_time") void shouldConvertBasicOrdinalDateTime() { check(ElasticsearchDateConverter.of(DateFormat.basic_ordinal_date_time), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicOrdinalDateTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_ordinal_date_time_no_millis") void shouldConvertBasicOrdinalDateTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.basic_ordinal_date_time_no_millis), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicOrdinalDateTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_time") void shouldConvertBasicTime() { check(ElasticsearchDateConverter.of(DateFormat.basic_time), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_time_no_millis") void shouldConvertBasicTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.basic_time_no_millis), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_t_time") void shouldConvertBasicTTime() { check(ElasticsearchDateConverter.of(DateFormat.basic_t_time), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicTTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_t_time_no_millis") void shouldConvertBasicTTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.basic_t_time_no_millis), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicTTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_week_date") void shouldConvertBasicWeekDate() { check(ElasticsearchDateConverter.of(DateFormat.basic_week_date), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicWeekDate
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_week_date_time") void shouldConvertBasicWeekDateTime() { check(ElasticsearchDateConverter.of(DateFormat.basic_week_date_time), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicWeekDateTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert basic_week_date_time_no_millis") void shouldConvertBasicWeekDateTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.basic_week_date_time_no_millis), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertBasicWeekDateTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date") void shouldConvertDate() { check(ElasticsearchDateConverter.of(DateFormat.date), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDate
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_hour") void shouldConvertDateHour() { check(ElasticsearchDateConverter.of(DateFormat.date_hour), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateHour
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_hour_minute") void shouldConvertDateHourMinute() { check(ElasticsearchDateConverter.of(DateFormat.date_hour_minute), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateHourMinute
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_hour_minute_second") void shouldConvertDateHourMinuteSecond() { check(ElasticsearchDateConverter.of(DateFormat.date_hour_minute_second), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateHourMinuteSecond
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_hour_minute_second_fraction") void shouldConvertDateHourMinuteSecondFraction() { check(ElasticsearchDateConverter.of(DateFormat.date_hour_minute_second_fraction), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateHourMinuteSecondFraction
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_hour_minute_second_millis") void shouldConvertDateHourMinuteSecondMillis() { check(ElasticsearchDateConverter.of(DateFormat.date_hour_minute_second_millis), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateHourMinuteSecondMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_optional_time") void shouldConvertDateOptionalTime() { check(ElasticsearchDateConverter.of(DateFormat.date_optional_time), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateOptionalTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #2676 @DisplayName("should convert strict_date_optional_time_nanos") void shouldConvertStrictDateOptionalTime() { check(ElasticsearchDateConverter.of(DateFormat.strict_date_optional_time_nanos), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertStrictDateOptionalTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_time") void shouldConvertDateTime() { check(ElasticsearchDateConverter.of(DateFormat.date_time), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert date_time_no_millis") void shouldConvertDateTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.date_time_no_millis), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertDateTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert epoch_millis") void shouldConvertEpochMillis() { check(ElasticsearchDateConverter.of(DateFormat.epoch_millis), Instant.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertEpochMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert epoch_second") void shouldConvertEpochSecond() { check(ElasticsearchDateConverter.of(DateFormat.epoch_second), Instant.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertEpochSecond
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert hour") void shouldConvertHour() { check(ElasticsearchDateConverter.of(DateFormat.hour), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertHour
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert hour_minute") void shouldConvertHourMinute() { check(ElasticsearchDateConverter.of(DateFormat.hour_minute), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertHourMinute
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert hour_minute_second") void shouldConvertHourMinuteSecond() { check(ElasticsearchDateConverter.of(DateFormat.hour_minute_second), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertHourMinuteSecond
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert hour_minute_second_fraction") void shouldConvertHourMinuteSecondFraction() { check(ElasticsearchDateConverter.of(DateFormat.hour_minute_second_fraction), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertHourMinuteSecondFraction
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert hour_minute_second_millis") void shouldConvertHourMinuteSecondMillis() { check(ElasticsearchDateConverter.of(DateFormat.hour_minute_second_millis), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertHourMinuteSecondMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert ordinal_date") void shouldConvertOrdinalDate() { check(ElasticsearchDateConverter.of(DateFormat.ordinal_date), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertOrdinalDate
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert ordinal_date_time") void shouldConvertOrdinalDateTime() { check(ElasticsearchDateConverter.of(DateFormat.ordinal_date_time), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertOrdinalDateTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert ordinal_date_time_no_millis") void shouldConvertOrdinalDateTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.ordinal_date_time_no_millis), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertOrdinalDateTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert time") void shouldConvertTime() { check(ElasticsearchDateConverter.of(DateFormat.time), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert time_no_millis") void shouldConvertTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.time_no_millis), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert t_time") void shouldConvertTTime() { check(ElasticsearchDateConverter.of(DateFormat.t_time), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertTTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert t_time_no_millis") void shouldConvertTTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.t_time_no_millis), LocalTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertTTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert week_date") void shouldConvertWeekDate() { check(ElasticsearchDateConverter.of(DateFormat.week_date), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertWeekDate
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert week_date_time") void shouldConvertWeekDateTime() { check(ElasticsearchDateConverter.of(DateFormat.week_date_time), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertWeekDateTime
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert week_date_time_no_millis") void shouldConvertWeekDateTimeNoMillis() { check(ElasticsearchDateConverter.of(DateFormat.week_date_time_no_millis), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertWeekDateTimeNoMillis
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert year") void shouldConvertYear() { check(ElasticsearchDateConverter.of(DateFormat.year), Year.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertYear
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert year_month") void shouldConvertYearMonth() { check(ElasticsearchDateConverter.of(DateFormat.year_month), YearMonth.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertYearMonth
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert year_month_day") void shouldConvertYearMonthDay() { check(ElasticsearchDateConverter.of(DateFormat.year_month_day), LocalDate.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertYearMonthDay
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
@Test // #1647 @DisplayName("should convert with combined patterns") void shouldConvertWithCombinedPatterns() { check(ElasticsearchDateConverter.of("basic_date_time ||invalid-pattern"), LocalDateTime.class); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
shouldConvertWithCombinedPatterns
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0
private <T extends TemporalAccessor> void check(ElasticsearchDateConverter converter, Class<T> type) { String formatted = converter.format(zdt); T parsed = converter.parse(formatted, type); assertThat(parsed).isNotNull(); }
@author Peter-Josef Meisch @author Tim te Beek @author Sascha Woo
check
java
spring-projects/spring-data-elasticsearch
src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverterUnitTests.java
Apache-2.0