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

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

            yield return(new TestCaseData(
                             TSql.NonQueryProcedure("text", new { }),
                             new SqlNonQueryCommand("text", new DbParameter[0], CommandType.StoredProcedure)));

            yield return(new TestCaseData(
                             TSql.NonQueryProcedure("text", new { Parameter = new SqlParameterValueStub() }),
                             new SqlNonQueryCommand("text", new[]
            {
                new SqlParameterValueStub().ToDbParameter("@Parameter")
            }, CommandType.StoredProcedure)));

            yield return(new TestCaseData(
                             TSql.NonQueryProcedure("text", new { Parameter1 = new SqlParameterValueStub(), Parameter2 = new SqlParameterValueStub() }),
                             new SqlNonQueryCommand("text", new[]
            {
                new SqlParameterValueStub().ToDbParameter("@Parameter1"),
                new SqlParameterValueStub().ToDbParameter("@Parameter2")
            }, CommandType.StoredProcedure)));
        }
 public void NonQueryProcedureParameterCountLimitedTo2098()
 {
     Assert.Throws <ArgumentException>(() => TSql.NonQueryProcedure("", ParameterCountLimitedExceeded.Instance));
 }