public void ExecuteCollection()
        {
            _queryGeneratorMock
            .Expect(mock => mock.CreateSequenceQuery <Order> (
                        "<dynamic query>",
                        TestDomainStorageProviderDefinition,
                        _someQueryModel,
                        Enumerable.Empty <FetchQueryModelBuilder>()))
            .Return(_collectionExecutableQueryMock);

            var fakeResult = new[] { _someOrder };

            _collectionExecutableQueryMock.Expect(mock => mock.Execute(_queryManagerMock)).Return(fakeResult);

            var result = _queryExecutor.ExecuteCollection <Order> (_someQueryModel);

            _queryGeneratorMock.VerifyAllExpectations();
            _collectionExecutableQueryMock.VerifyAllExpectations();
            Assert.That(result, Is.SameAs(fakeResult));
        }
        public void ExecuteScalar()
        {
            _queryGeneratorMock
            .Expect(mock => mock.CreateScalarQuery <int> ("<dynamic query>", TestDomainStorageProviderDefinition, _someQueryModel))
            .Return(_scalarExecutableQueryMock);

            var fakeResult = 7;

            _scalarExecutableQueryMock.Expect(mock => mock.Execute(_queryManagerMock)).Return(fakeResult);

            var result = _queryExecutor.ExecuteScalar <int> (_someQueryModel);

            _queryGeneratorMock.VerifyAllExpectations();
            _scalarExecutableQueryMock.VerifyAllExpectations();
            Assert.That(result, Is.EqualTo(fakeResult));
        }