Corrected some unit tests

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-07-30 09:51:30 -07:00
parent cddc584e6e
commit 7d5969ed86
3 changed files with 4 additions and 4 deletions

View File

@@ -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)));

View File

@@ -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());

View File

@@ -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);