public void then_should_not_have_any_arguements() { // given var database = new DatabaseStub(); // when database.ExecuteStoredProcedure("MySpName"); // then Sql executedSql = database.ExecuteSql; executedSql.Arguments.ShouldBeEmpty(); }
public void then_should_call_sp_with_sp_name() { // given var database = new DatabaseStub(); // when database.ExecuteStoredProcedure("MySpName"); // then Sql executedSql = database.ExecuteSql; executedSql.SQL.ShouldContain("EXEC"); executedSql.SQL.ShouldContain("MySpName"); }
public void then_should_include_paramter_in_sql() { // given var database = new DatabaseStub(); // when database.ExecuteStoredProcedure("MySpName", new Parameter("Param1", "Value")); // then Sql executedSql = database.ExecuteSql; executedSql.Arguments.ShouldNotBeEmpty(); executedSql.Arguments.Any(x => x.Equals("Value")).ShouldBeTrue(); executedSql.SQL.ShouldContain("Param1"); }