Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making sure to compare (in code) in the same manner as we compare in …
…Esent for starts with
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
Raven.Tests.MailingList/UsingLoadStartsWithAndDashSepartor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="UsingLoadStartsWithAndDashSepartor.cs" company="Hibernating Rhinos LTD"> | ||
// Copyright (c) Hibernating Rhinos LTD. All rights reserved. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
using System.Threading; | ||
using Raven.Json.Linq; | ||
using Raven.Tests.Common; | ||
using Xunit; | ||
using Xunit.Extensions; | ||
|
||
namespace Raven.Tests.MailingList | ||
{ | ||
public class UsingLoadStartsWithAndDashSeperator : RavenTest | ||
{ | ||
[Theory] | ||
[PropertyData("Storages")] | ||
public void ShouldWork(string storage) | ||
{ | ||
using (var store = NewDocumentStore(requestedStorage: storage)) | ||
{ | ||
|
||
|
||
//store.DocumentDatabase.Documents.Put("delivery-ORT0529.2", null, new RavenJObject(), | ||
// new RavenJObject(), null); | ||
store.DocumentDatabase.Documents.Put("DeliveryReport-1000", null, new RavenJObject(), | ||
new RavenJObject(), null); | ||
|
||
store.DocumentDatabase.Documents.Put("delivery-RT0753.2", null, new RavenJObject(), | ||
new RavenJObject(), null); | ||
|
||
int nextStart = 0; | ||
var docs = store.DocumentDatabase.Documents.GetDocumentsWithIdStartingWith("delivery-", null, null,0, 1024, CancellationToken.None, ref nextStart); | ||
Assert.Equal(1, docs.Length); | ||
} | ||
} | ||
} | ||
} |