mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Search-811
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Alfresco Software Limited.
|
||||
* Copyright (C) 2018 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -89,7 +89,7 @@ public class AbstractSearchTest extends RestTest
|
||||
|
||||
file2 = new FileModel("cars.txt", "cars" + title, description, FileType.TEXT_PLAIN, "The landrover discovery is not a sports car ");
|
||||
|
||||
file3 = new FileModel("alfresco.txt", "alfresco" + title, description, FileType.TEXT_PLAIN, "Alfresco text file for search ");
|
||||
file3 = new FileModel("alfresco.txt", "alfresco " + title, "alfresco " + description, FileType.TEXT_PLAIN, "Alfresco text file for search ");
|
||||
|
||||
file4 = new FileModel(unique_searchString, "unique" + title, description, FileType.TEXT_PLAIN, "Unique text file for search ");
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Alfresco Software Limited.
|
||||
* Copyright (C) 2018 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -78,6 +78,7 @@ public class SearchSpellCheckTest extends AbstractSearchTest
|
||||
nodes.getContext().assertThat().field("spellCheck").isNotEmpty();
|
||||
nodes.getContext().getSpellCheck().assertThat().field("suggestions").contains("alfresco");
|
||||
}
|
||||
|
||||
@Test
|
||||
/**
|
||||
* Perform alternative way by setting the value in spellcheck object.
|
||||
@@ -103,6 +104,7 @@ public class SearchSpellCheckTest extends AbstractSearchTest
|
||||
searchReq.setSpellcheck(spellCheck);
|
||||
assertResponse(query(searchReq));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void searchWithSpellcheckerAndCorrectSpelling() throws Exception
|
||||
{
|
||||
@@ -113,7 +115,7 @@ public class SearchSpellCheckTest extends AbstractSearchTest
|
||||
searchReq.setQuery(queryReq);
|
||||
searchReq.setSpellcheck(new RestRequestSpellcheckModel());
|
||||
SearchResponse res = query(searchReq);
|
||||
Assert.assertNull(res.getContext());
|
||||
Assert.assertNull(res.getContext().getSpellCheck());
|
||||
res.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user