private static IEnumerable <TestCaseData> NonQueryStatementFormatCases()
        {
            yield return(new TestCaseData(
                             TSql.NonQueryStatementFormat("text"),
                             new SqlNonQueryCommand("text", new DbParameter[0], CommandType.Text)));

            yield return(new TestCaseData(
                             TSql.NonQueryStatementFormat("text", parameters: null),
                             new SqlNonQueryCommand("text", new DbParameter[0], CommandType.Text)));

            yield return(new TestCaseData(
                             TSql.NonQueryStatementFormat("text", new IDbParameterValue[0]),
                             new SqlNonQueryCommand("text", new DbParameter[0], CommandType.Text)));

            yield return(new TestCaseData(
                             TSql.NonQueryStatementFormat("text", new TestDbParameter()),
                             new SqlNonQueryCommand("text", new[]
            {
                new TestDbParameter().ToDbParameter("@P0")
            }, CommandType.Text)));

            yield return(new TestCaseData(
                             TSql.NonQueryStatementFormat("text {0}", new TestDbParameter()),
                             new SqlNonQueryCommand("text @P0", new[]
            {
                new TestDbParameter().ToDbParameter("@P0")
            }, CommandType.Text)));

            yield return(new TestCaseData(
                             TSql.NonQueryStatementFormat("text", new TestDbParameter(), new TestDbParameter()),
                             new SqlNonQueryCommand("text", new[]
            {
                new TestDbParameter().ToDbParameter("@P0"),
                new TestDbParameter().ToDbParameter("@P1")
            }, CommandType.Text)));

            yield return(new TestCaseData(
                             TSql.NonQueryStatementFormat("text {0} {1}", new TestDbParameter(), new TestDbParameter()),
                             new SqlNonQueryCommand("text @P0 @P1", new[]
            {
                new TestDbParameter().ToDbParameter("@P0"),
                new TestDbParameter().ToDbParameter("@P1")
            }, CommandType.Text)));
        }
 public void NonQueryStatementFormatParameterCountLimitedTo2098()
 {
     Assert.Throws <ArgumentException>(() => TSql.NonQueryStatementFormat("", ParameterCountLimitedExceeded.Instance.All));
 }