public void WhenSetFetchModeToSelectThenResetFetch() { var hbmMapping = new HbmMapping(); var member = typeof(MyClass).GetProperty("Relation"); var mapping = new HbmManyToOne(); var mapper = new ManyToOneMapper(member, mapping, hbmMapping); mapper.Fetch(FetchKind.Select); mapping.fetch.Should().Be(HbmFetchMode.Select); mapping.fetchSpecified.Should().Be.False(); }
public void WhenSetFetchModeToSelectThenResetFetch() { var hbmMapping = new HbmMapping(); var member = typeof(MyClass).GetProperty("Relation"); var mapping = new HbmManyToOne(); var mapper = new ManyToOneMapper(member, mapping, hbmMapping); mapper.Fetch(FetchKind.Select); Assert.That(mapping.fetch, Is.EqualTo(HbmFetchMode.Select)); Assert.That(mapping.fetchSpecified, Is.False); }