public void ExecuteAsyncWithNullExpression()
        {
            // Arrange
            Mock <ICloudTable> cloudTableMock = MocksFactory.GetCloudTableMock();
            var converter = new TableEntityConverter <Country>();
            var provider  = new TableQueryProvider <Country>(cloudTableMock.Object, converter);

            // Act && Assert
            Assert.Throws <ArgumentNullException>(() => provider.ExecuteAsync(null));
        }
        public void ExecuteAsyncWithNullExpression()
        {
            // Arrange
            Mock<ICloudTable> cloudTableMock = MocksFactory.GetCloudTableMock();
            var converter = new TableEntityConverter<Country>();
            var provider = new TableQueryProvider<Country>(cloudTableMock.Object, converter);

            // Act && Assert
            Assert.Throws<ArgumentNullException>(() => provider.ExecuteAsync(null));
        }
        public async Task CallExecuteAsyncMethodOfQueryProviderTest()
        {
            // Arrange
            TableSet <Country>           tableSet      = GetTableSet();
            TableQueryProvider <Country> queryProvider = GetTableQueryProvider();
            IQueryable <Country>         query         = tableSet.Where(p => p.IsExists == false);

            // Act
            object result = await queryProvider.ExecuteAsync(query.Expression);

            //Assert
            Assert.NotNull(result);
            Assert.True(result is IEnumerable <Country>);

            List <Country> typedResult = ((IEnumerable <Country>)result).ToList();

            Assert.Equal(1, typedResult.Count);
            Assert.Equal(Spain, typedResult[0].Name);
        }