Browse files

Adding passing test

  • Loading branch information...
1 parent 55370a4 commit 34108f5c81ebda777219a3ada5a4ac1c139fe694 @ayende ayende committed Aug 25, 2011
Showing with 36 additions and 0 deletions.
  1. +36 −0 Raven.Tests/Bugs/CreatingIndexes.cs
View
36 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.