Ejemplo n.º 1
0
		public void WhenConfigureIdMoreThanOnceThenUseSameMapper()
		{
			var hbm = new HbmIdbag();
			var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
			ICollectionIdMapper firstInstance = null;
			ICollectionIdMapper secondInstance = null;
			mapper.Id(x => firstInstance = x);
			mapper.Id(x => secondInstance = x);

			firstInstance.Should().Be.SameInstanceAs(secondInstance);
		}
Ejemplo n.º 2
0
        public void WhenConfigureIdMoreThanOnceThenUseSameMapper()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
            ICollectionIdMapper firstInstance  = null;
            ICollectionIdMapper secondInstance = null;

            mapper.Id(x => firstInstance  = x);
            mapper.Id(x => secondInstance = x);

            Assert.That(firstInstance, Is.SameAs(secondInstance));
        }
Ejemplo n.º 3
0
		public void WhenConfigureIdThenCallMapper()
		{
			var hbm = new HbmIdbag();
			var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
			mapper.Id(x => x.Column("catchMe"));

			hbm.collectionid.Columns.Single().name.Should().Be("catchMe");
		}
Ejemplo n.º 4
0
		public void WhenConfigureIdThenCallMapper()
		{
			var hbm = new HbmIdbag();
			var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
			mapper.Id(x => x.Column("catchMe"));

			Assert.That(hbm.collectionid.Columns.Single().name, Is.EqualTo("catchMe"));
		}
Ejemplo n.º 5
0
        public void WhenConfigureIdThenCallMapper()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);

            mapper.Id(x => x.Column("catchMe"));

            Assert.That(hbm.collectionid.Columns.Single().name, Is.EqualTo("catchMe"));
        }
Ejemplo n.º 6
0
        public void WhenConfigureIdThenCallMapper()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);

            mapper.Id(x => x.Column("catchMe"));

            hbm.collectionid.Columns.Single().name.Should().Be("catchMe");
        }