Exemple #1
0
 public void ShoulCreateUpdateCommandWithTableSchema()
 {
     FlepperQueryBuilder.Update("dbo", "table")
     .Build()
     .Trim()
     .Should()
     .Be("UPDATE [dbo].[table]");
 }
Exemple #2
0
 public void ShoulCreateUpdateCommand()
 {
     FlepperQueryBuilder.Update("table")
     .Build()
     .Trim()
     .Should()
     .Be("UPDATE [table]");
 }
Exemple #3
0
        public void ShouldCreateUpdateCommandWithColumnAndValue()
        {
            var queryResult = FlepperQueryBuilder.Update("dbo", "table")
                              .Set("column", "value")
                              .BuildWithParameters();

            queryResult
            .Query
            .Trim()
            .Should()
            .Be("UPDATE [dbo].[table] SET [column] = @p0");

            dynamic parameters = queryResult.Parameters;

            Assert.Equal("value", parameters.@p0);
        }