Skip to content

Commit

Permalink
Adding passing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Aug 25, 2011
1 parent 55370a4 commit 34108f5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Raven.Tests/Bugs/CreatingIndexes.cs
@@ -0,0 +1,36 @@
using System.ComponentModel.Composition.Hosting;
using System.Linq;
using Raven.Client.Indexes;
using Xunit;

namespace Raven.Tests.Bugs
{
public class CreatingIndexes : LocalClientTest
{
public class AllDocs1 : AbstractIndexCreationTask<object>
{
public AllDocs1()
{
Map = docs => from doc in docs select new { x = 1 };
}
}

public class AllDocs2 : AbstractIndexCreationTask<object>
{
public AllDocs2()
{
Map = docs => from doc in docs select new { };
}
}

[Fact]
public void CanCreateIndexes()
{
using(var store = NewDocumentStore())
{
var container = new CompositionContainer(new TypeCatalog(typeof (AllDocs1), typeof (AllDocs2)));
IndexCreation.CreateIndexes(container, store);
}
}
}
}

0 comments on commit 34108f5

Please sign in to comment.