Skip to content

Commit

Permalink
increment version, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kentico-ericd committed Jun 9, 2022
1 parent 640c674 commit 92a27ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Kentico.Xperience.AlgoliaSearch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<Title>Xperience Algolia Search</Title>
<PackageId>Kentico.Xperience.AlgoliaSearch</PackageId>
<Version>2.2.0</Version>
<Version>2.3.0</Version>
<Authors>Kentico Software</Authors>
<Company>Kentico Software</Company>
<PackageIcon>icon.png</PackageIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ public string GetFilterablePropertyName(PropertyInfo property)
public bool IsIndexingEnabled()
{
var indexingDisabled = ValidationHelper.GetBoolean(appSettingsService[APP_SETTINGS_KEY_INDEXING_DISABLED], false);

if (indexingDisabled)
{
return false;
Expand Down
6 changes: 3 additions & 3 deletions tests/Tests/IAlgoliaRegistrationServiceTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Algolia.Search.Clients;

using CMS.Core;
using CMS.DataEngine;
using CMS.DocumentEngine;
using CMS.SiteProvider;
Expand Down Expand Up @@ -30,9 +31,8 @@ internal class GetIndexSettingsTests : AlgoliaTests
public void GetIndexSettingsTests_SetUp()
{
var mockSearchClient = Substitute.For<ISearchClient>();
var algoliaSearchService = new DefaultAlgoliaSearchService(mockSearchClient);
var mockIndexService = Substitute.For<IAlgoliaIndexService>();
algoliaRegistrationService = new DefaultAlgoliaRegistrationService(algoliaSearchService, new MockEventLogService(), mockSearchClient, mockIndexService);
var algoliaSearchService = new DefaultAlgoliaSearchService(mockSearchClient, Substitute.For<IAppSettingsService>());
algoliaRegistrationService = new DefaultAlgoliaRegistrationService(algoliaSearchService, new MockEventLogService(), mockSearchClient, Substitute.For<IAlgoliaIndexService>());

var attributes = algoliaRegistrationService.GetAlgoliaIndexAttributes(Assembly.GetExecutingAssembly());
foreach (var attribute in attributes)
Expand Down
8 changes: 5 additions & 3 deletions tests/Tests/IAlgoliaSearchServiceTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Algolia.Search.Clients;

using CMS.Core;

using Kentico.Xperience.AlgoliaSearch.Attributes;
using Kentico.Xperience.AlgoliaSearch.Models.Facets;
using Kentico.Xperience.AlgoliaSearch.Services;
Expand Down Expand Up @@ -27,7 +29,7 @@ internal class GetFacetedAttributesTests : AlgoliaTests
[SetUp]
public void GetFacetedAttributesTests_SetUp()
{
algoliaSearchService = new DefaultAlgoliaSearchService(Substitute.For<ISearchClient>());
algoliaSearchService = new DefaultAlgoliaSearchService(Substitute.For<ISearchClient>(), Substitute.For<IAppSettingsService>());
}


Expand Down Expand Up @@ -149,7 +151,7 @@ internal class GetFilterablePropertyNameTests : AlgoliaTests
[SetUp]
public void GetFilterablePropertyNameTests_SetUp()
{
algoliaSearchService = new DefaultAlgoliaSearchService(Substitute.For<ISearchClient>());
algoliaSearchService = new DefaultAlgoliaSearchService(Substitute.For<ISearchClient>(), Substitute.For<IAppSettingsService>());
}


Expand Down Expand Up @@ -184,7 +186,7 @@ internal class OrderSearchablePropertiesTests : AlgoliaTests
[SetUp]
public void OrderSearchablePropertiesTests_SetUp()
{
algoliaSearchService = new DefaultAlgoliaSearchService(Substitute.For<ISearchClient>());
algoliaSearchService = new DefaultAlgoliaSearchService(Substitute.For<ISearchClient>(), Substitute.For<IAppSettingsService>());
}


Expand Down

0 comments on commit 92a27ff

Please sign in to comment.