Skip to content

Commit e751790

Browse files
committed
Updates test to return a Task
Updates the Document_ValidateAndThrowAsync_ThrowsOnInvalid test to return a Task to properly await the exception assertion.
1 parent 814b684 commit e751790

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Foundatio.LuceneQueryParser.Tests/QueryValidatorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ public async Task Document_ValidateAsync_WithAllowedFields_Works()
248248
}
249249

250250
[Fact]
251-
public async Task Document_ValidateAndThrowAsync_ThrowsOnInvalid()
251+
public Task Document_ValidateAndThrowAsync_ThrowsOnInvalid()
252252
{
253253
var document = LuceneQuery.Parse("title:hello").Document;
254254
var options = new QueryValidationOptions();
255255
options.AllowedFields.Add("author");
256256

257-
await Assert.ThrowsAsync<QueryValidationException>(() =>
257+
return Assert.ThrowsAsync<QueryValidationException>(() =>
258258
document.ValidateAndThrowAsync(options));
259259
}
260260

0 commit comments

Comments
 (0)