public void As_WithISelection_SelectionMatchesType()
        {
            // TODO: Getting an ISelection interface from EntitySelection<T> is too annoying to be useful.
            var        target = new EntityExpression <DomainAggregateRow>();
            ISelection query  = new EntitySelection <DomainAggregateRow>();
            var        actual = target.As(query, "myQuery");

            Assert.IsNotNull(actual.Expression);
            Assert.IsInstanceOfType(actual, typeof(EntityExpression <DomainAggregateRow>));
        }
        public void As_ExpressionSelectionActionWithRelation_ExpressionRelationCountMatchesExpected()
        {
            var target = new EntityExpression <DomainAggregateRow>();
            var actual = target.As(
                selection => selection.From(set => set.InnerJoin(row => row.SubContainer.SubContainerId, row => row.SubContainerId)),
                "myQuery");

            Assert.IsNotNull(actual.Expression);
            Assert.AreEqual(1, actual.Expression.Relations.Count());
        }