예제 #1
0
		public void CanSetColumnName()
		{
			var hbmId = new HbmId();
			var mapper = new IdMapper(null, hbmId);
			mapper.Column("MyName");
			hbmId.Columns.Single().name.Should().Be("MyName");
		}
예제 #2
0
		public void CanSqlType()
		{
			//NH-3452
			var hbmId = new HbmId();
			var mapper = new IdMapper(null, hbmId);
			mapper.Column(x => x.SqlType("CHAR(10)"));
			Assert.That(hbmId.column[0].sqltype, Is.EqualTo("CHAR(10)"));
		}
예제 #3
0
		public void CanSetPrecision()
		{
			//NH-2824
			var hbmId = new HbmId();
			var mapper = new IdMapper(null, hbmId);
			mapper.Column(x => x.Precision(10));
			Assert.That(hbmId.column[0].precision, Is.EqualTo("10"));
		}
예제 #4
0
		public void CanSetScale()
		{
			//NH-2824
			var hbmId = new HbmId();
			var mapper = new IdMapper(null, hbmId);
			mapper.Column(x => x.Scale(10));
			Assert.That(hbmId.column[0].scale, Is.EqualTo("10"));
		}
예제 #5
0
		public void CanSetColumnName()
		{
			var hbmId = new HbmId();
			var mapper = new IdMapper(null, hbmId);
			mapper.Column("MyName");
			Assert.That(hbmId.Columns.Single().name, Is.EqualTo("MyName"));
		}