Exemple #1
0
        public void BindForTable_Poco_ReturnsCorrectTable()
        {
            // Arrange
            var attribute      = new MobileTableAttribute();
            var configProvider = CreateConfigProvider("Default", new Uri("https://someuri/"));

            // Act
            var tableBuilder = new MobileTablePocoTableBuilder <TodoItem>(configProvider);
            var table        = tableBuilder.Convert(attribute);

            // Assert
            Assert.NotNull(table);
            Assert.Equal("TodoItem", table.TableName);
        }
Exemple #2
0
        public void BindForTable_Poco_ReturnsCorrectTable()
        {
            // Arrange
            var attribute = new MobileTableAttribute();
            var config    = new MobileAppsConfiguration
            {
                MobileAppUri = new Uri("https://someuri/")
            };

            // Act
            var tableBuilder = new MobileTablePocoTableBuilder <TodoItem>(config);
            var table        = tableBuilder.Convert(attribute);

            // Assert
            Assert.NotNull(table);
            Assert.Equal("TodoItem", table.TableName);
        }
Exemple #3
0
        public void GetValue_PocoWithTableName_ReturnsCorrectTable()
        {
            // Arrange
            var attribute = new MobileTableAttribute
            {
                TableName = "SomeOtherTable"
            };
            var config = new MobileAppsConfiguration
            {
                MobileAppUri = new Uri("https://someuri/")
            };
            // Act
            var tableBuilder = new MobileTablePocoTableBuilder <TodoItem>(config);
            var table        = tableBuilder.Convert(attribute);

            // Assert
            Assert.NotNull(table);
            Assert.Equal("SomeOtherTable", table.TableName);
        }