public void CanCreateStatelessImmediateFlowQuery()
        {
            Assert.That(() => StatelessSession.ImmediateFlowQuery <UserEntity>(), Throws.Nothing);

            IImmediateFlowQuery <UserEntity> query = StatelessSession.ImmediateFlowQuery <UserEntity>();

            Assert.That(query != null);
        }
        public void CanCreateStatelessImmediateFlowQueryWithAlias()
        {
            UserEntity alias = null;

            Assert.That(() => StatelessSession.ImmediateFlowQuery(() => alias), Throws.Nothing);

            IImmediateFlowQuery <UserEntity> query = StatelessSession.ImmediateFlowQuery(() => alias);

            Assert.That(query != null);

            ICriteria criteria = new CriteriaBuilder()
                                 .Build <UserEntity, UserEntity>(QuerySelection.Create(query as IQueryableFlowQuery));

            Assert.That(criteria.Alias, Is.EqualTo("alias"));
        }