Ejemplo n.º 1
0
        public void EntityType_ReturnsCorrectlyComposedInsertQuery(object entityType, string expectedQuery)
        {
            // Arrange
            var sqlServerQueryComposer = new SqlServerQueryComposer();

            // Act
            var insertQuery = sqlServerQueryComposer.ComposeInsert(entityType.GetType());

            // Assert
            Assert.AreEqual(expectedQuery, insertQuery);
        }
Ejemplo n.º 2
0
        public void EntityTypeAndSelectedProperties_ReturnsCorrectlyComposedInsertQueryContainingAllPropertiesExcludingThePrimaryKey(object entityType, string primaryKeyName, string expectedQuery)
        {
            // Arrange
            var sqlServerQueryComposer = new SqlServerQueryComposer();

            // Act
            var insertQuery = sqlServerQueryComposer.ComposeInsert(entityType.GetType(), primaryKeyName);

            // Assert
            Assert.AreEqual(expectedQuery, insertQuery);
        }