Esempio n. 1
0
        public void BindForQuery_ReturnsCorrectType()
        {
            var attribute      = new MobileTableAttribute();
            var configProvider = CreateConfigProvider("Default", new Uri("https://someuri/"));

            var queryBuilder = new MobileTableQueryBuilder <TodoItem>(configProvider);
            var query        = queryBuilder.Convert(attribute);

            Assert.True(typeof(IMobileServiceTableQuery <TodoItem>).IsAssignableFrom(query.GetType()));
        }
Esempio n. 2
0
        public void BindForQuery_ReturnsCorrectType()
        {
            var attribute = new MobileTableAttribute();
            var config    = new MobileAppsConfiguration
            {
                MobileAppUri = new Uri("https://someuri/")
            };

            var queryBuilder = new MobileTableQueryBuilder <TodoItem>(config);
            var query        = queryBuilder.Convert(attribute);

            Assert.True(typeof(IMobileServiceTableQuery <TodoItem>).IsAssignableFrom(query.GetType()));
        }
Esempio n. 3
0
        public void BindForQuery_WithTableName_ReturnsCorrectType()
        {
            var attribute = new MobileTableAttribute
            {
                TableName = "SomeOtherTable"
            };
            var configProvider = CreateConfigProvider("Default", new Uri("https://someuri/"));

            var queryBuilder = new MobileTableQueryBuilder <TodoItem>(configProvider);
            var query        = queryBuilder.Convert(attribute);

            Assert.NotNull(query);
            Assert.Equal("SomeOtherTable", query.Table.TableName);
        }
Esempio n. 4
0
        public void BindForQuery_WithTableName_ReturnsCorrectType()
        {
            var attribute = new MobileTableAttribute
            {
                TableName = "SomeOtherTable"
            };

            var config = new MobileAppsConfiguration
            {
                MobileAppUri = new Uri("https://someuri/")
            };

            var queryBuilder = new MobileTableQueryBuilder <TodoItem>(config);
            var query        = queryBuilder.Convert(attribute);

            Assert.NotNull(query);
            Assert.Equal("SomeOtherTable", query.Table.TableName);
        }