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

            IDetachedFlowQuery <UserEntity> query = StatelessSession.DetachedFlowQuery <UserEntity>();

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

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

            var query = StatelessSession.DetachedFlowQuery(() => alias) as DetachedFlowQuery <UserEntity>;

            Assert.That(query != null);

            DetachedCriteria criteria = new CriteriaBuilder()
                                        .Build <UserEntity>(query);

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