public void CanSetMetaTypeThroughGenericMethod()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaType<char>();
			Assert.That(hbmAny.MetaType, Is.EqualTo("Char"));
		}
		public void CanSetMetaTypeThroughIType()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaType(NHibernateUtil.Character);
			Assert.That(hbmAny.MetaType, Is.EqualTo("Char"));
		}
 public void CanSetCascade()
 {
     var hbmMapping = new HbmMapping();
     var hbmAny = new HbmAny();
     var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
     mapper.Cascade(Cascade.All);
     hbmAny.cascade.Should().Be("all");
 }
Example #4
0
        public void WhenSetMetaValueWithClassThenThrow()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            Executing.This(() => mapper.MetaValue(typeof(MyReferenceClass), typeof(MyReferenceClass))).Should().Throw <ArgumentOutOfRangeException>();
        }
Example #5
0
		public void CanSetIdTypeThroughType()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.IdType(typeof(long));
			hbmAny.idtype.Should().Be("Int64");
		}
Example #6
0
		public void CanSetMetaTypeThroughIType()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaType(NHibernateUtil.Character);
			hbmAny.MetaType.Should().Be("Char");
		}
Example #7
0
        public void WhenSetMetaValueWithClassThenThrow()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            Assert.That(() => mapper.MetaValue(typeof(MyReferenceClass), typeof(MyReferenceClass)), Throws.TypeOf <ArgumentOutOfRangeException>());
        }
		public void CanSetIdTypeThroughType()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.IdType(typeof(long));
			Assert.That(hbmAny.idtype, Is.EqualTo("Int64"));
		}
 public void AutoCleanInvalidCascade()
 {
     var hbmMapping = new HbmMapping();
     var hbmAny = new HbmAny();
     var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
     mapper.Cascade(Cascade.All | Cascade.DeleteOrphans);
     hbmAny.cascade.Should().Be("all");
 }
Example #10
0
        public void CanSetMetaTypeThroughGenericMethod()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaType <char>();
            Assert.That(hbmAny.MetaType, Is.EqualTo("Char"));
        }
Example #11
0
        public void CanSetUpdate()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Update(false);
            Assert.That(hbmAny.update, Is.False);
        }
Example #12
0
        public void CanSetIdTypeThroughType()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.IdType(typeof(long));
            Assert.That(hbmAny.idtype, Is.EqualTo("Int64"));
        }
Example #13
0
        public void CanSetInsert()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Insert(false);
            Assert.That(hbmAny.insert, Is.False);
        }
Example #14
0
        public void CanSetMetaTypeThroughIType()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaType(NHibernateUtil.Character);
            Assert.That(hbmAny.MetaType, Is.EqualTo("Char"));
        }
Example #15
0
        public void WhenSetSecondMetaValueThenCheckCompatibility()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            Assert.That(() => mapper.MetaValue(5, typeof(MyClass)), Throws.TypeOf <ArgumentException>());
        }
Example #16
0
        public void WhenSetFirstMetaValueThenSetMetaTypeIfNotClass()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            Assert.That(hbmAny.MetaType, Is.EqualTo("Char"));
        }
        public void CanSetMetaTypeThroughIType()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaType(NHibernateUtil.Character);
            hbmAny.MetaType.Should().Be("Char");
        }
        public void CanSetMetaTypeThroughGenericMethod()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaType <char>();
            hbmAny.MetaType.Should().Be("Char");
        }
Example #19
0
        public void WhenDuplicatedMetaValueWithDifferentTypeThenThrow()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            Assert.That(() => mapper.MetaValue('A', typeof(MyClass)), Throws.TypeOf <ArgumentException>());
        }
Example #20
0
        public void CanSetCascade()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Cascade(Mapping.ByCode.Cascade.All);
            Assert.That(hbmAny.cascade, Is.EqualTo("all"));
        }
        public void WhenSetFirstMetaValueThenSetMetaTypeIfNotClass()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            hbmAny.MetaType.Should().Be("Char");
        }
Example #22
0
        public void CanSetIndex()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Index("pizza");
            Assert.That(hbmAny.index, Is.EqualTo("pizza"));
        }
        public void CanSetIndex()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Index("pizza");
            hbmAny.index.Should().Be("pizza");
        }
        public void CanSetLazy()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Lazy(true);
            hbmAny.lazy.Should().Be(true);
        }
        public void AutoCleanInvalidCascade()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Cascade(Cascade.All | Cascade.DeleteOrphans);
            hbmAny.cascade.Should().Be("all");
        }
        public void CanSetCascade()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Cascade(Cascade.All);
            hbmAny.cascade.Should().Be("all");
        }
Example #27
0
        public void WhenDuplicatedMetaValueWithDifferentTypeThenThrow()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            Executing.This(() => mapper.MetaValue('A', typeof(MyClass))).Should().Throw <ArgumentException>();
        }
Example #28
0
        public void WhenNullParameterThenThrow()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            Assert.That(() => mapper.MetaValue(null, typeof(MyReferenceClass)), Throws.TypeOf <ArgumentNullException>());
            Assert.That(() => mapper.MetaValue('A', null), Throws.TypeOf <ArgumentNullException>());
        }
        public void CanSetUpdate()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Update(false);
            hbmAny.update.Should().Be.False();
        }
Example #30
0
        public void CanSetLazy()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Lazy(true);
            Assert.That(hbmAny.lazy, Is.EqualTo(true));
        }
        public void CanSetInsert()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Insert(false);
            hbmAny.insert.Should().Be.False();
        }
Example #32
0
        public void AutoCleanInvalidCascade()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.Cascade(Mapping.ByCode.Cascade.All | Mapping.ByCode.Cascade.DeleteOrphans);
            Assert.That(hbmAny.cascade, Is.EqualTo("all"));
        }
        public void CanSetIdTypeThroughType()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.IdType(typeof(long));
            hbmAny.idtype.Should().Be("Int64");
        }
Example #34
0
        public void WhenSetSecondMetaValueThenCheckCompatibility()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            Executing.This(() => mapper.MetaValue(5, typeof(MyClass))).Should().Throw <ArgumentException>();
        }
Example #35
0
        public void WhenNullParameterThenThrow()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            Executing.This(() => mapper.MetaValue(null, typeof(MyReferenceClass))).Should().Throw <ArgumentNullException>();
            Executing.This(() => mapper.MetaValue('A', null)).Should().Throw <ArgumentNullException>();
        }
Example #36
0
        public void WhenDuplicatedMetaValueThenRegisterOne()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            mapper.MetaValue('A', typeof(MyReferenceClass));
            Assert.That(hbmAny.metavalue, Has.Length.EqualTo(1));
        }
Example #37
0
        public void MetaTypeShouldBeImmutable()
        {
            var hbmMapping = new HbmMapping();
            var hbmAny     = new HbmAny();
            var mapper     = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

            mapper.MetaValue('A', typeof(MyReferenceClass));
            Assert.That(() => mapper.MetaType(NHibernateUtil.Int32), Throws.TypeOf <ArgumentException>());
            Assert.That(() => mapper.MetaType <int>(), Throws.TypeOf <ArgumentException>());
        }
Example #38
0
		public void WhenSetMetaValueWithClassThenThrow()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			Assert.That(() => mapper.MetaValue(typeof(MyReferenceClass), typeof(MyReferenceClass)), Throws.TypeOf<ArgumentOutOfRangeException>());
		}
Example #39
0
		public void CanSetLazy()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.Lazy(true);
			hbmAny.lazy.Should().Be(true);
		}
Example #40
0
		public void WhenSetIdColumnPropertiesThenWorkOnSameHbmColumnCreatedAtCtor()
		{
			const int idColumnIndex = 1;
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			var columnsBefore = hbmAny.Columns.ToArray();
			mapper.Columns(idcm => idcm.Length(10), metacm => { });
			var columnsAfter = hbmAny.Columns.ToArray();
			columnsBefore[idColumnIndex].Should().Be.SameInstanceAs(columnsAfter[idColumnIndex]);
			columnsBefore[idColumnIndex].length.Should().Be("10");
		}
Example #41
0
		public void WhenDuplicatedMetaValueWithDifferentTypeThenThrow()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			Assert.That(() => mapper.MetaValue('A', typeof(MyClass)), Throws.TypeOf<ArgumentException>());
		}
Example #42
0
		public void WhenSetTwoMetaValueThenHasTwoMetaValues()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			mapper.MetaValue('B', typeof(MyClass));
			hbmAny.metavalue.Should().Have.Count.EqualTo(2);
			hbmAny.metavalue.Select(mv => mv.value).Should().Have.SameValuesAs("A", "B");
			hbmAny.metavalue.Select(mv => mv.@class).Satisfy(c => c.Any(clazz => clazz.Contains("MyReferenceClass")));
			hbmAny.metavalue.Select(mv => mv.@class).Satisfy(c => c.Any(clazz => clazz.Contains("MyClass")));
		}
Example #43
0
		public void WhenNullParameterThenThrow()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			Executing.This(() => mapper.MetaValue(null, typeof(MyReferenceClass))).Should().Throw<ArgumentNullException>();
			Executing.This(() => mapper.MetaValue('A', null)).Should().Throw<ArgumentNullException>();
		}
Example #44
0
		public void CanSetMetaTypeThroughType()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaType(typeof(char));
			hbmAny.MetaType.Should().Be("Char");
		}
Example #45
0
		public void CanSetUpdate()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

			mapper.Update(false);
			Assert.That(hbmAny.update, Is.False);
		}
Example #46
0
		public void WhenDuplicatedMetaValueThenRegisterOne()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			mapper.MetaValue('A', typeof(MyReferenceClass));
			Assert.That(hbmAny.metavalue, Has.Length.EqualTo(1));
		}
Example #47
0
		public void WhenSetSecondMetaValueThenCheckCompatibility()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			Assert.That(() => mapper.MetaValue(5, typeof(MyClass)), Throws.TypeOf<ArgumentException>());
		}
Example #48
0
		public void CanSetInsert()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

			mapper.Insert(false);
			hbmAny.insert.Should().Be.False();
		}
Example #49
0
		public void CanSetUpdate()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

			mapper.Update(false);
			hbmAny.update.Should().Be.False();
		}
Example #50
0
		public void IdMetaTypeShouldBeImmutableAfterAddMetaValues()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			Executing.This(() => mapper.IdType(NHibernateUtil.Int32)).Should().NotThrow();
			Executing.This(mapper.IdType<int>).Should().NotThrow();
			Executing.This(mapper.IdType<string>).Should().Throw<ArgumentException>();
			Executing.This(() => mapper.IdType(NHibernateUtil.String)).Should().Throw<ArgumentException>();
		}
Example #51
0
		public void CanSetIndex()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.Index("pizza");
			hbmAny.index.Should().Be("pizza");
		}
Example #52
0
		public void WhenSetFirstMetaValueThenSetMetaTypeIfNotClass()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			hbmAny.MetaType.Should().Be("Char");
		}
Example #53
0
		public void WhenSetTwoMetaValueThenHasTwoMetaValues()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			mapper.MetaValue('B', typeof(MyClass));
			Assert.That(hbmAny.metavalue, Has.Length.EqualTo(2));
			Assert.That(hbmAny.metavalue.Select(mv => mv.value), Is.EquivalentTo(new [] {"A", "B"}));
			Assert.That(hbmAny.metavalue.Any(mv => [email protected]("MyReferenceClass")), Is.True);
			Assert.That(hbmAny.metavalue.Any(mv => [email protected]("MyClass")), Is.True);
		}
Example #54
0
		public void WhenDuplicatedMetaValueWithDifferentTypeThenThrow()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			Executing.This(() => mapper.MetaValue('A', typeof(MyClass))).Should().Throw<ArgumentException>();
		}
Example #55
0
		public void WhenSetMetaValueWithClassThenThrow()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			Executing.This(() => mapper.MetaValue(typeof(MyReferenceClass), typeof(MyReferenceClass))).Should().Throw<ArgumentOutOfRangeException>();
		}
Example #56
0
		public void IdMetaTypeShouldBeImmutableAfterAddMetaValues()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			Assert.That(() => mapper.IdType(NHibernateUtil.Int32), Throws.Nothing);
			Assert.That(() => mapper.IdType<int>(), Throws.Nothing);
			Assert.That(() => mapper.IdType<string>(), Throws.TypeOf<ArgumentException>());
			Assert.That(() => mapper.IdType(NHibernateUtil.String), Throws.TypeOf<ArgumentException>());
		}
Example #57
0
		public void WhenSetSecondMetaValueThenCheckCompatibility()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			Executing.This(() => mapper.MetaValue(5, typeof(MyClass))).Should().Throw<ArgumentException>();
		}
Example #58
0
		public void WhenDuplicatedMetaValueThenRegisterOne()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			mapper.MetaValue('A', typeof(MyReferenceClass));
			mapper.MetaValue('A', typeof(MyReferenceClass));
			hbmAny.metavalue.Should().Have.Count.EqualTo(1);
		}
Example #59
0
		public void WhenSetMetaColumnPropertiesThenWorkOnSameHbmColumnCreatedAtCtor()
		{
			// The first column in the mapping is the MetaValue
			const int metaValueColumnIndex = 0;
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);
			var columnsBefore = hbmAny.Columns.ToArray();
			mapper.Columns(idcm => { }, metacm => metacm.Length(500));
			var columnsAfter = hbmAny.Columns.ToArray();
			columnsBefore[metaValueColumnIndex].Should().Be.SameInstanceAs(columnsAfter[metaValueColumnIndex]);
			columnsBefore[metaValueColumnIndex].length.Should().Be("500");
		}
Example #60
0
		public void CanSetInsert()
		{
			var hbmMapping = new HbmMapping();
			var hbmAny = new HbmAny();
			var mapper = new AnyMapper(null, typeof(int), hbmAny, hbmMapping);

			mapper.Insert(false);
			Assert.That(hbmAny.insert, Is.False);
		}