Skip to content

Commit 6c1df20

Browse files
committed
added failing test for CollectionInstance.AsList()
1 parent 40fe0d4 commit 6c1df20

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/FluentNHibernate.Testing/ConventionsTests/ApplyingToModel/HasManyCollectionConventionTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,19 @@ public void ShouldSetTableNameProperty()
199199

200200
VerifyModel(x => x.TableName.ShouldEqual("xxx"));
201201
}
202+
203+
[Test]
204+
public void ShouldChangeCollectionTypeToList()
205+
{
206+
Convention(x => { x.AsList(); x.Index.Column("position"); } );
202207

208+
VerifyModel(x =>
209+
{
210+
x.Collection.ShouldEqual(Collection.List);
211+
x.Index.ShouldNotBeNull(); // a list without index will result in wrong xml
212+
});
213+
}
214+
203215
#region Helpers
204216

205217
private void Convention(Action<ICollectionInstance> convention)

0 commit comments

Comments
 (0)