public void Subclassed_Type_Is_Returned_When_Superclass_Is_Used_For_The_Collection()
        {
            using (var mongo = Mongo.Create(TestHelper.ConnectionString()))
            {
                var obj1 = new SubClassedObjectFluentMapped {
                    Title = "Prod1", ABool = true
                };
                mongo.GetCollection <SubClassedObjectFluentMapped>("Fake").Insert(obj1);
                var found = mongo.GetCollection <SuperClassObjectFluentMapped>("Fake").Find();

                Assert.Equal(1, found.Count());
                Assert.Equal(typeof(SubClassedObjectFluentMapped), found.ElementAt(0).GetType());
            }
        }
        public void Subclass_Adheres_To_Superclass_Fluent_Alias()
        {
            using (var mongo = Mongo.Create(TestHelper.ConnectionString()))
            {
                var obj1 = new SubClassedObjectFluentMapped {
                    Title = "Prod1", ABool = true
                };
                var obj2 = new SubClassedObjectFluentMapped {
                    Title = "Prod2", ABool = false
                };

                mongo.GetCollection <SubClassedObjectFluentMapped>("Fake").Insert(obj1);
                mongo.GetCollection <SubClassedObjectFluentMapped>("Fake").Insert(obj2);
                var found = mongo.GetCollection <SuperClassObjectFluentMapped>("Fake").Find();

                Assert.Equal(2, found.Count());
                Assert.Equal(obj1.Id, found.ElementAt(0).Id);
                Assert.Equal("Prod1", found.ElementAt(0).Title);
                Assert.Equal(obj2.Id, found.ElementAt(1).Id);
                Assert.Equal("Prod2", found.ElementAt(1).Title);
            }
        }