Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 145 additions & 38 deletions src/Search/Search.Tests/Search.Tests.csproj

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

161 changes: 161 additions & 0 deletions src/Search/Search.Tests/Tests/GetSearchTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
//
// Copyright (c) Microsoft. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

using Microsoft.Azure.Test.TestCategories;
using Xunit;

namespace Microsoft.Azure.Search.Tests
{
public class GetSearchTests : SearchTests
{
[Fact]
public void CanSearchStaticallyTypedDocuments()
{
Run(TestCanSearchStaticallyTypedDocuments);
}

[Fact]
public void CanSearchDynamicDocuments()
{
Run(TestCanSearchDynamicDocuments);
}

[Fact]
public void SearchThrowsWhenRequestIsMalformed()
{
Run(TestSearchThrowsWhenRequestIsMalformed);
}

[Fact]
public void DefaultSearchModeIsAny()
{
Run(TestDefaultSearchModeIsAny);
}

[Fact]
public void CanSearchWithSearchModeAll()
{
Run(TestCanSearchWithSearchModeAll);
}

[Fact]
public void CanGetResultCountInSearch()
{
Run(TestCanGetResultCountInSearch);
}

[Fact]
public void CanFilter()
{
Run(TestCanFilter);
}

[Fact]
public void CanUseHitHighlighting()
{
Run(TestCanUseHitHighlighting);
}

[Fact]
public void OrderByProgressivelyBreaksTies()
{
Run(TestOrderByProgressivelyBreaksTies);
}

[Fact]
public void SearchWithoutOrderBySortsByScore()
{
Run(TestSearchWithoutOrderBySortsByScore);
}

[Fact]
public void CanSearchWithSelectedFields()
{
Run(TestCanSearchWithSelectedFields);
}

[Fact]
public void CanUseTopAndSkipForClientSidePaging()
{
Run(TestCanUseTopAndSkipForClientSidePaging);
}

[Fact]
public void SearchWithScoringProfileBoostsScore()
{
Run(TestSearchWithScoringProfileBoostsScore);
}

[Fact]
public void CanSearchWithRangeFacets()
{
Run(TestCanSearchWithRangeFacets);
}

[Fact]
public void CanSearchWithValueFacets()
{
Run(TestCanSearchWithValueFacets);
}

[Fact]
[Trait(TestTraits.AcceptanceType, TestTraits.LiveBVT)]
public void CanContinueSearchForStaticallyTypedDocuments()
{
Run(TestCanContinueSearchForStaticallyTypedDocuments);
}

[Fact]
[Trait(TestTraits.AcceptanceType, TestTraits.LiveBVT)]
public void CanContinueSearchForDynamicDocuments()
{
Run(TestCanContinueSearchForDynamicDocuments);
}

[Fact]
[Trait(TestTraits.AcceptanceType, TestTraits.LiveBVT)]
public void CanContinueSearchWithoutTop()
{
Run(TestCanContinueSearchWithoutTop);
}

[Fact]
[Trait(TestTraits.AcceptanceType, TestTraits.LiveBVT)]
public void CanSearchWithMinimumCoverage()
{
Run(TestCanSearchWithMinimumCoverage);
}

[Fact]
public void CanSearchWithDateTimeInStaticModel()
{
Run(TestCanSearchWithDateTimeInStaticModel);
}

protected override SearchIndexClient GetClient()
{
SearchIndexClient client = base.GetClient();
client.UseHttpGetForQueries = true;
return client;
}

protected override SearchIndexClient GetClientForQuery()
{
SearchIndexClient client = base.GetClientForQuery();
client.UseHttpGetForQueries = true;
return client;
}
}
}
124 changes: 124 additions & 0 deletions src/Search/Search.Tests/Tests/GetSuggestTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
//
// Copyright (c) Microsoft. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

using Microsoft.Azure.Test.TestCategories;
using Xunit;

namespace Microsoft.Azure.Search.Tests
{
public class GetSuggestTests : SuggestTests
{
[Fact]
[Trait(TestTraits.AcceptanceType, TestTraits.LiveBVT)]
public void CanSuggestStaticallyTypedDocuments()
{
Run(TestCanSuggestStaticallyTypedDocuments);
}

[Fact]
[Trait(TestTraits.AcceptanceType, TestTraits.LiveBVT)]
public void CanSuggestDynamicDocuments()
{
Run(TestCanSuggestDynamicDocuments);
}

[Fact]
public void SuggestThrowsWhenRequestIsMalformed()
{
Run(TestSuggestThrowsWhenRequestIsMalformed);
}

[Fact]
public void SuggestThrowsWhenGivenBadSuggesterName()
{
Run(TestSuggestThrowsWhenGivenBadSuggesterName);
}

[Fact]
public void FuzzyIsOffByDefault()
{
Run(TestFuzzyIsOffByDefault);
}

[Fact]
public void CanGetFuzzySuggestions()
{
Run(TestCanGetFuzzySuggestions);
}

[Fact]
public void CanFilter()
{
Run(TestCanFilter);
}

[Fact]
public void CanUseHitHighlighting()
{
Run(TestCanUseHitHighlighting);
}

[Fact]
public void OrderByProgressivelyBreaksTies()
{
Run(TestOrderByProgressivelyBreaksTies);
}

[Fact]
public void TopTrimsResults()
{
Run(TestTopTrimsResults);
}

[Fact]
public void CanSuggestWithSelectedFields()
{
Run(TestCanSuggestWithSelectedFields);
}

[Fact]
public void SearchFieldsExcludesFieldsFromSuggest()
{
Run(TestSearchFieldsExcludesFieldsFromSuggest);
}

[Fact]
[Trait(TestTraits.AcceptanceType, TestTraits.LiveBVT)]
public void CanSuggestWithMinimumCoverage()
{
Run(TestCanSuggestWithMinimumCoverage);
}

[Fact]
public void CanSuggestWithDateTimeInStaticModel()
{
Run(TestCanSuggestWithDateTimeInStaticModel);
}

protected override SearchIndexClient GetClient()
{
SearchIndexClient client = base.GetClient();
client.UseHttpGetForQueries = true;
return client;
}

protected override SearchIndexClient GetClientForQuery()
{
SearchIndexClient client = base.GetClientForQuery();
client.UseHttpGetForQueries = true;
return client;
}
}
}
Loading