コード例 #1
0
		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();
		}
コード例 #2
0
		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);
		}