public void CalculateFullColumnList_OneColumnNotFound() { var unionViewDefinition = new UnionViewDefinition( _storageProviderDefinition, new EntityNameDefinition(null, "Test"), new[] { _tableDefinition1, _tableDefinition2 }, _objectIDProperty, _timestampProperty, new[] { _property1, _property2 }, new IIndexDefinition[0], new EntityNameDefinition[0]); var availableColumns = new[] { ColumnDefinitionObjectMother.IDColumn, ColumnDefinitionObjectMother.ClassIDColumn, ColumnDefinitionObjectMother.TimestampColumn, _property1.ColumnDefinition }; var result = unionViewDefinition.CalculateFullColumnList(availableColumns).ToArray(); Assert.That(result.Length, Is.EqualTo(5)); Assert.That(result[0], Is.SameAs(ColumnDefinitionObjectMother.IDColumn)); Assert.That(result[1], Is.SameAs(ColumnDefinitionObjectMother.ClassIDColumn)); Assert.That(result[2], Is.SameAs(ColumnDefinitionObjectMother.TimestampColumn)); Assert.That(result[3], Is.SameAs(_property1.ColumnDefinition)); Assert.That(result[4], Is.Null); }
public void CalculateFullColumnList() { var availableColumns = new[] { ColumnDefinitionObjectMother.IDColumn, ColumnDefinitionObjectMother.ClassIDColumn, ColumnDefinitionObjectMother.TimestampColumn, _property3.ColumnDefinition, ColumnDefinitionObjectMother.CreateColumn("Test"), _property1.ColumnDefinition }; var result = _unionViewDefinition.CalculateFullColumnList(availableColumns).ToArray(); Assert.That(result.Length, Is.EqualTo(6)); Assert.That(result[0], Is.SameAs(ColumnDefinitionObjectMother.IDColumn)); Assert.That(result[1], Is.SameAs(ColumnDefinitionObjectMother.ClassIDColumn)); Assert.That(result[2], Is.SameAs(ColumnDefinitionObjectMother.TimestampColumn)); Assert.That(result[3], Is.SameAs(_property1.ColumnDefinition)); Assert.That(result[4], Is.Null); Assert.That(result[5], Is.SameAs(_property3.ColumnDefinition)); }