public void ExecuteStoredProcedure_NoneExistingProcedure_CorrectException() { var procedure = new NoneExistingStoredProcedure(); #if EFCORE Assert.Throws <Microsoft.Data.SqlClient.SqlException>(() => ExecuteStoredProcedure(procedure), "Could not find stored procedure 'NoneExistingStoredProcedure'."); #else Assert.Throws <System.Data.SqlClient.SqlException>(() => ExecuteStoredProcedure(procedure), "Could not find stored procedure 'NoneExistingStoredProcedure'."); #endif }
public void ExecuteStoredProcedure_NoneExistingProcedure_CorrectExceptionMessage() { try { var procedure = new NoneExistingStoredProcedure(); ExecuteStoredProcedure(procedure); } catch (System.Data.SqlClient.SqlException exception) { Assert.AreEqual("Could not find stored procedure 'NoneExistingStoredProcedure'.", exception.Message); } }
public void ExecuteStoredProcedure_NoneExistingProcedure_CorrectExceptionMessage() { try { var procedure = new NoneExistingStoredProcedure(); ExecuteStoredProcedure(procedure); } catch (System.Data.SqlClient.SqlException exception) { Assert.AreEqual("Could not find stored procedure 'NoneExistingStoredProcedure'.", exception.Message); } }
public void ExecuteStoredProcedure_NoneExistingProcedure_CorrectException() { var procedure = new NoneExistingStoredProcedure(); Assert.Throws<System.Data.SqlClient.SqlException>(() => ExecuteStoredProcedure(procedure), "Could not find stored procedure 'NoneExistingStoredProcedure'."); }