public void CanChainMultipleWhereClauses() { var indexedUsers = new RavenQueryInspector<IndexedUser>(new RavenQueryProvider<IndexedUser>(null, null, ravenQueryStatistics), ravenQueryStatistics); var q = indexedUsers .Where(x => x.Age == 3) .Where(x => x.Name == "ayende"); Assert.Equal("Age:3 AND Name:ayende", q.ToString()); }
public void CanUnderstandSimpleAny() { var indexedUsers = new RavenQueryInspector<IndexedUser>(new RavenQueryProvider<IndexedUser>(null, null, ravenQueryStatistics), ravenQueryStatistics); var q = indexedUsers .Where(x => x.Properties.Any(y => y.Key == "first")); Assert.Equal("Key:first", q.ToString()); }