public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<ManyToOneMapping>(); testHelper.Check(x => x.Name, "manyToOne").MapsToAttribute("name"); testHelper.Check(x => x.IsNotNullable, true).MapsToAttribute("not-null"); testHelper.VerifyAll(_writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<ClassMapping>(); testHelper.Check(x => x.Name, "class1").MapsToAttribute("name"); testHelper.Check(x => x.TableName, "table1").MapsToAttribute("table"); testHelper.VerifyAll(_classWriter); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<ComponentMapping>(); testHelper.Check(x => x.PropertyName, "EmailAddress").MapsToAttribute("name"); testHelper.Check(x => x.ClassName, "component1").MapsToAttribute("class"); testHelper.VerifyAll(_componentWriter); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<SubclassMapping>(); testHelper.Check(x => x.Name, "mapping1").MapsToAttribute("name"); testHelper.Check(x => x.DiscriminatorValue, "SalaryEmployee").MapsToAttribute("discriminator-value"); testHelper.VerifyAll(_subclassWriter); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<OneToManyMapping>(); testHelper.Check(x => x.ClassName, "class1").MapsToAttribute("class"); testHelper.Check(x => x.ExceptionOnNotFound, false).MapsToAttribute("not-found", HbmNotFoundMode.Ignore); var writer = new HbmOneToManyWriter(); testHelper.VerifyAll(writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<ListMapping>(); testHelper.Check(x => x.Name, "bag1").MapsToAttribute("name"); testHelper.Check(x => x.IsInverse, true).MapsToAttribute("inverse"); testHelper.Check(x => x.IsLazy, true).MapsToAttribute("lazy"); testHelper.VerifyAll(_listWriter); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<BagMapping>(); testHelper.Check(x => x.Name, "bag1").MapsToAttribute("name"); testHelper.Check(x => x.OrderBy, "column1").MapsToAttribute("order-by"); testHelper.Check(x => x.IsInverse, true).MapsToAttribute("inverse"); testHelper.Check(x => x.IsLazy, true).MapsToAttribute("lazy"); testHelper.VerifyAll(_writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<IndexMapping>(); testHelper.Check(x => x.Column, "column1").MapsToAttribute("column"); testHelper.Check(x => x.IndexType, "String").MapsToAttribute("type"); testHelper.Check(x => x.Length, 50).MapsToAttribute("length", "50"); var writer = new HbmIndexWriter(); testHelper.VerifyAll(writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<PropertyMapping>(); testHelper.Check(x => x.Name, "test").MapsToAttribute("name"); testHelper.Check(x => x.Length, 50).MapsToAttribute("length"); testHelper.Check(x => x.IsNotNullable, true).MapsToAttribute("not-null"); testHelper.Check(x => x.ColumnName, "thecolumn").MapsToAttribute("column"); testHelper.Check(x => x.Unique, true).MapsToAttribute("unique"); testHelper.VerifyAll(_writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<JoinedSubclassMapping>(); testHelper.Check(x => x.Name, "mapping1").MapsToAttribute("name"); testHelper.VerifyAll(_subclassWriter); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<IdMapping>(); testHelper.Check(x => x.Name, "id1").MapsToAttribute("name"); testHelper.VerifyAll(_writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<IdGeneratorMapping>(); testHelper.Check(x => x.ClassName, "native").MapsToAttribute("class"); var writer = new HbmIdGeneratorWriter(); testHelper.VerifyAll(writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<ManyToManyMapping>(); testHelper.Check(x => x.ClassName, "class1").MapsToAttribute("class"); var writer = new HbmManyToManyWriter(); testHelper.VerifyAll(writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<ColumnMapping>(); testHelper.Check(x => x.Name, "Column1").MapsToAttribute("name"); testHelper.Check(x => x.Length, 50).MapsToAttribute("length"); testHelper.Check(x => x.IsNotNullable, true).MapsToAttribute("not-null"); testHelper.Check(x => x.IsUnique, true).MapsToAttribute("unique"); testHelper.Check(x => x.UniqueKey, "key").MapsToAttribute("unique-key"); testHelper.Check(x => x.SqlType, "nvarchar").MapsToAttribute("sql-type"); testHelper.Check(x => x.Index, "index1").MapsToAttribute("index"); testHelper.Check(x => x.Check, "checkSomething").MapsToAttribute("check"); var writer = new HbmColumnWriter(); testHelper.VerifyAll(writer); }
public void Should_write_the_attributes() { var testHelper = new HbmTestHelper<DiscriminatorMapping>(); testHelper.Check(x => x.ColumnName, "col1").MapsToAttribute("column"); testHelper.Check(x => x.DiscriminatorType, DiscriminatorType.Char).MapsToAttribute("type", DiscriminatorType.Char.ToString()); testHelper.Check(x => x.Force, true).MapsToAttribute("force"); testHelper.Check(x => x.Formula, "some formula").MapsToAttribute("formula"); testHelper.Check(x => x.Insert, false).MapsToAttribute("insert"); testHelper.Check(x => x.IsNotNullable, false).MapsToAttribute("not-null"); testHelper.Check(x => x.Length, 50).MapsToAttribute("length"); var writer = new HbmDiscriminatorWriter(null); testHelper.VerifyAll(writer); }