public void SetFetchMode() { var hbm = new HbmIdbag(); var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Fetch(CollectionFetchMode.Subselect); Assert.That(hbm.fetch, Is.EqualTo(HbmCollectionFetchMode.Subselect)); Assert.That(hbm.fetchSpecified, Is.True); mapper.Fetch(CollectionFetchMode.Join); Assert.That(hbm.fetch, Is.EqualTo(HbmCollectionFetchMode.Join)); Assert.That(hbm.fetchSpecified, Is.True); mapper.Fetch(CollectionFetchMode.Select); Assert.That(hbm.fetch, Is.EqualTo(HbmCollectionFetchMode.Select)); Assert.That(hbm.fetchSpecified, Is.False); }
public void SetFetchMode() { var hbm = new HbmIdbag(); var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Fetch(CollectionFetchMode.Subselect); hbm.fetch.Should().Be(HbmCollectionFetchMode.Subselect); hbm.fetchSpecified.Should().Be.True(); mapper.Fetch(CollectionFetchMode.Join); hbm.fetch.Should().Be(HbmCollectionFetchMode.Join); hbm.fetchSpecified.Should().Be.True(); mapper.Fetch(CollectionFetchMode.Select); hbm.fetch.Should().Be(HbmCollectionFetchMode.Select); hbm.fetchSpecified.Should().Be.False(); }