Skip to content

Commit

Permalink
RavenDB-18957 Unit test using query from the ticket.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-haddaji-neoventive authored and ppekrol committed Jul 14, 2022
1 parent 54d46cb commit 038e009
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/FastTests/Client/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,26 @@ public void Query_Dictionary_With_Where_Clause()
}
}

[Fact]
public void Query_Dictionary_With_Where_Equality_Clause()
{
using (var store = GetDocumentStore())
{
using (var newSession = store.OpenSession())
{
newSession.Store(new Dictionary<string, object?> { { "Name", "Australia" } }, "continents/1");
newSession.Store(new Dictionary<string, object?> { { "Name", "Europe" } }, "continents/2");
newSession.Store(new Dictionary<string, object?> { { "Name", "America" } }, "continents/3");
newSession.SaveChanges();

var queryResult = newSession.Query<Dictionary<string, object?>>()
.Where(x => ((string?)x["Name"]) == "Australia").ToList();

Assert.Equal(queryResult.Count, 1);
}
}
}

[Fact]
public async Task QueryWithWhere_WhenUsingStringEquals_ShouldWork()
{
Expand Down

0 comments on commit 038e009

Please sign in to comment.