mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Corrected some unit tests
--HG-- branch : dev
This commit is contained in:
@@ -189,10 +189,10 @@ namespace Orchard.Tests.Modules.Indexing {
|
|||||||
Assert.That(searchBuilder.Get(3).ContentItemId, Is.EqualTo(3));
|
Assert.That(searchBuilder.Get(3).ContentItemId, Is.EqualTo(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, Ignore("Fix pending")]
|
[Test]
|
||||||
public void ProviderShouldStoreSettings() {
|
public void ProviderShouldStoreSettings() {
|
||||||
_provider.CreateIndex("default");
|
_provider.CreateIndex("default");
|
||||||
Assert.That(_provider.GetLastIndexUtc("default"), Is.EqualTo(LuceneIndexProvider.DefaultMinDateTime));
|
Assert.That(_provider.GetLastIndexUtc("default"), Is.Null);
|
||||||
|
|
||||||
_provider.SetLastIndexUtc("default", new DateTime(2010, 1, 1, 1, 1, 1, 1));
|
_provider.SetLastIndexUtc("default", new DateTime(2010, 1, 1, 1, 1, 1, 1));
|
||||||
Assert.That(_provider.GetLastIndexUtc("default"), Is.EqualTo(new DateTime(2010, 1, 1, 1, 1, 1, 0)));
|
Assert.That(_provider.GetLastIndexUtc("default"), Is.EqualTo(new DateTime(2010, 1, 1, 1, 1, 1, 0)));
|
||||||
|
@@ -140,7 +140,7 @@ namespace Orchard.Tests.Modules.Indexing {
|
|||||||
Assert.That(_searchBuilder.Slice(3, 3).Search().Count(), Is.EqualTo(2));
|
Assert.That(_searchBuilder.Slice(3, 3).Search().Count(), Is.EqualTo(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, Ignore("Fix pending")]
|
[Test]
|
||||||
public void ShouldSortByRelevance() {
|
public void ShouldSortByRelevance() {
|
||||||
_provider.CreateIndex("default");
|
_provider.CreateIndex("default");
|
||||||
_provider.Store("default", _provider.New(1).Add("body", "michael is in the kitchen").Analyze());
|
_provider.Store("default", _provider.New(1).Add("body", "michael is in the kitchen").Analyze());
|
||||||
|
@@ -62,7 +62,7 @@ namespace Orchard.Indexing {
|
|||||||
ISearchBuilder CreateSearchBuilder(string indexName);
|
ISearchBuilder CreateSearchBuilder(string indexName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the date and time when the index was last processed
|
/// Returns the date and time when the index was last processed, or null if the index doesn't exist
|
||||||
/// </summary>
|
/// </summary>
|
||||||
DateTime? GetLastIndexUtc(string indexName);
|
DateTime? GetLastIndexUtc(string indexName);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user