Esempio n. 1
0
        [InlineData(typeof(IMobileServiceTable <object>), "Item", false)] // object only works for output binding
        public void IsValidQueryType_ValidatesCorrectly(Type parameterType, string tableName, bool expected)
        {
            // Arrange
            var context = new EasyTableContext {
                ResolvedTableName = tableName
            };

            // Act
            bool result = EasyTableQueryBinding.IsValidQueryType(parameterType, context);

            // Assert
            Assert.Equal(expected, result);
        }
Esempio n. 2
0
        public async Task BindAsync_Returns_CorrectValueProvider()
        {
            // Arrange
            var parameter        = EasyTableTestHelper.GetValidInputQueryParameters().Single();
            var expectedType     = typeof(EasyTableQueryValueProvider <TodoItem>);
            var easyTableContext = new EasyTableContext();
            var binding          = new EasyTableQueryBinding(parameter, easyTableContext);

            // Act
            var valueProvider = await binding.BindAsync(null, null);

            // Assert
            Assert.Equal(expectedType, valueProvider.GetType());
        }